Exemple #1
0
require SERVER_ROOT . '/classes/debug.class.php';
//Require the debug class
require SERVER_ROOT . '/classes/mysql.class.php';
//Require the database wrapper
require SERVER_ROOT . '/classes/cache.class.php';
//Require the caching class
require SERVER_ROOT . '/classes/encrypt.class.php';
//Require the encryption class
require SERVER_ROOT . '/classes/time.class.php';
//Require the time class
require SERVER_ROOT . '/classes/paranoia.class.php';
//Require the paranoia check_paranoia function
require SERVER_ROOT . '/classes/regex.php';
require SERVER_ROOT . '/classes/util.php';
$Debug = new DEBUG();
$Debug->handle_errors();
$Debug->set_flag('Debug constructed');
$DB = new DB_MYSQL();
$Cache = new CACHE($MemcachedServers);
$Enc = new CRYPT();
// Autoload classes.
require SERVER_ROOT . '/classes/classloader.php';
// Note: G::initialize is called twice.
// This is necessary as the code inbetween (initialization of $LoggedUser) makes use of G::$DB and G::$Cache.
// TODO: remove one of the calls once we're moving everything into that class
G::initialize();
//Begin browser identification
$Browser = UserAgent::browser($_SERVER['HTTP_USER_AGENT']);
$OperatingSystem = UserAgent::operating_system($_SERVER['HTTP_USER_AGENT']);
//$Mobile = UserAgent::mobile($_SERVER['HTTP_USER_AGENT']);
$Mobile = in_array($_SERVER['HTTP_HOST'], array('m.' . NONSSL_SITE_URL, 'm.' . NONSSL_SITE_URL));