} session_start(); } $file = cmsROOT . 'core/baseFunctions.php'; if (!is_readable($file)) { die(sprintf($errorTPL, 'Fatal Error - 404', 'We have been unable to locate/read the baseFunctions file.')); } else { require_once $file; } //kill magic quotes completely if (get_magic_quotes_gpc() != false) { //strip all the global arrays recursiveArray($_POST, 'stripslashes'); recursiveArray($_GET, 'stripslashes'); recursiveArray($_COOKIE, 'stripslashes'); recursiveArray($_REQUEST, 'stripslashes'); } //set the default timezone if (function_exists('date_default_timezone_set')) { //This gets set to GMT, this is due to CMS handling dates automatically date_default_timezone_set('Europe/London'); } /** // //-- Classes Setup // **/ require_once cmsROOT . 'core/classes/class.coreobj.php'; // AUTOLOADER, I Choose You! // directories to use for the autoloading, these get glob'd over after // $dirs = Core_Classes_coreObj::addClassDirs(array(
/** * Escapes a string ready for the database * * @version 1.0 * @since 1.0.0 * @author xLink * * @param mixed $string * * @return mixed */ public function escape($string) { if (function_exists('mysql_real_escape_string') && $this->link_id) { if (is_array($string)) { recursiveArray($string, 'mysql_real_escape_string'); return $string; } return mysql_real_escape_string($string); } else { if (is_array($string)) { recursiveArray($string, 'mysql_escape_string'); return $string; } return mysql_escape_string($string); } }