This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* ExternalCMS Class | |
* | |
* This class abstracts the functionality of intergrating HL cms based sites with external CMS's | |
* How did this happen? Were there no other options? WHY AM I WRITING THIS?! | |
* | |
* @author Phil Sturgeon | |
*/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
/** | |
* @author Philip Sturgeon | |
* @created 04/06/2009 | |
*/ | |
class REST { | |
private $CI; // CodeIgniter instance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getCorrectIndex(i, date) | |
{ | |
// find out what day of the week it is | |
var day_of_the_week = date.substr(0,3); | |
// define what days correspond to which array indices | |
var days = new Object(); | |
days.Mon = [0,5,10,15,20]; | |
days.Tue = [1,6,11,16,21]; | |
days.Wed = [2,7,12,17,22]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
/** | |
* CodeIgniter | |
* | |
* An open source application development framework for PHP 4.3.2 or newer | |
* | |
* @package CodeIgniter | |
* @author ExpressionEngine Dev Team | |
* @copyright Copyright (c) 2008, EllisLab, Inc. | |
* @license http://codeigniter.com/user_guide/license.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Prowl | |
{ | |
var $username = ''; | |
var $password = ''; | |
var $application = 'CI Prowl'; | |
/** | |
* Constructor - Sets Preferences |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$array = array( | |
'Appt with my IFA: cxzcsdf Wed. 10:30', | |
'Transfer some cas\\zh to my SIPP ready to invest in R&M Global Opportunities on launch'."\n", | |
'Research and switch from my gilts fund to an emerging markets fund' | |
); | |
$serialized = serialize($array); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
v0.9.8 Documentation | |
-------------------- | |
Dont worry guys this will be broken down into page hierarchy, just filling out the content while I work out how to lay it all out. | |
Modules | |
PyroCMS is broken down into modules. A module can be frontend only (shows only to the public on the user-facing part of the site) and some might be |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$g=$_GET;$c=@$g['c']?$g['c']:'Home'; | |
if(!@include"c/$c.php")die('fail'); | |
$m=method_exists($c,$m=@$g['m'])?$m:'index'; | |
$o=new$c();$o->$m($g); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MY_Loader extends CI_Loader { | |
function image($file_path, $mime_type_or_return = 'image/png') | |
{ | |
$this->load->helper('file'); | |
$image_content = read_file($file_path); | |
// Image was not found | |
if($image_content === FALSE) |