function __construct(&$params = null) { parent::__construct($params); $this->_cache =& $GLOBALS['_CONF']; $this->_cache = array(); if (defined('TM_STATIC')) { $this->static = true; } if ($params == 1) { $this->static = false; } if (!$this->static) { $db =& $this->using('db'); $cf = $db->find_all(array('conf' => array('table' => 'conf'))); if ($cf) { foreach ($cf as $c) { $c = $c['conf']; $this->_cache["{$c['class']}/{$c['keyname']}"] = $this->cast_type($c['keyvalue'], $c['keytype']); if ($c['class'] == 'core') { $define = 'C_' . strtoupper($c['keyname']); $value = $this->_cache["{$c["class"]}/{$c["keyname"]}"]; if (!defined($define)) { define($define, $value); } } } } } }
public function __construct(&$params = null) { parent::__construct(&$params); $conf =& $this->using('conf'); $lang = $conf->get('core/locale', 'en', 's'); locale($lang); }
function __construct(&$params = null) { parent::__construct($params); $this->lifetime = 3600 * 24 * 30; if ($this->encryption) { if (!$this->key) { $this->key = md5($_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']); } foreach ($_COOKIE as $i => $v) { if ($i != 'PHPSESSID') { $v = $this->decrypt(base64_decode($v)); } $_COOKIE[$i] = $v; } } }
public function __construct(&$params = null) { parent::__construct($params); extract($this->using('cookie', 'misc')); session_set_cookie_params($cookie->lifetime, $cookie->path, $cookie->domain); session_start(); if ($this->encryption) { $sess_key = preg_replace('/[^a-zA-Z0-9]/', '', $cookie->get('sess_key')); if (strlen($sess_key) != 12) { $cookie->set('sess_key', $sess = $misc->random_string(12)); } if (strlen($sess_key) == 12 && isset($_SESSION['data']) && isset($_SESSION['pass']) && $_SESSION['pass'] == md5(TM_UNIQUE_STR)) { $bf = new Crypt_Blowfish($sess_key); $data = @unserialize(function_exists('gzuncompress') && $this->compress ? @gzuncompress($bf->decrypt($_SESSION['data'])) : $bf->decrypt($_SESSION['data'])); $_SESSION = $data ? $data : array(); } else { $_SESSION = array(); } } }
public function __construct(&$params = null) { parent::__construct($params); $this->param =& $this->using('param'); }
public function __construct(&$params = null) { parent::__construct($params); }
/** * Constructor. **/ function __construct(&$parent = null) { parent::__construct($parent); }