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 | |
spl_autoload_register('seed_autoload'); | |
function seed_autoload($class_name) { | |
$the_class_name = from_camel_case($class_name); | |
if(file_exists(MODEL_DIR .'/' .$the_class_name .'.class.php')) | |
require_once MODEL_DIR .'/' .$the_class_name .'.class.php'; | |
} |
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 5.1.6 or newer | |
* | |
* @package CodeIgniter | |
* @author ExpressionEngine Dev Team | |
* @copyright Copyright (c) 2008 - 2011, 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
function dump_object(array) { | |
var pad_char = ' ', pad_val = 2; | |
function repeat_char(len, pad_char) { | |
var str = ''; | |
for (var i = 0; i < len; i++) { | |
str += pad_char; | |
} | |
return str; | |
}; |
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 | |
$img = imagecreatetruecolor(200, 200); | |
// allocate some colors | |
$white = imagecolorallocate($img, 255, 255, 255); | |
$red = imagecolorallocate($img, 255, 0, 0); | |
$green = imagecolorallocate($img, 0, 255, 0); | |
$blue = imagecolorallocate($img, 0, 0, 255); | |
$blue1 = imagecolorallocate($img, 102, 104, 230); |
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 | |
function _check_email($email, $strict = false) { | |
if ( filter_var($email, FILTER_VALIDATE_EMAIL) ) { | |
if ( $strict && function_exists("getmxrr") ) { | |
list($prefix, $domain) = split("@",$email); | |
return @getmxrr($domain, $maxhost); | |
} | |
return true; | |
} | |
return false; |