/** * __construct * * Class constructor * */ public function __construct() { //load in settings.ini file self::$settings_ini = "settings.ini.php"; $this->setSettings('general', parse_ini_file(APP_PATH . '/config/' . self::$settings_ini, true)); //these updates really need to be moved into installer //but are here for when people pull form git //check for old 2.0 settings config here.... if (!isset(self::$_settings->general['settings'])) { //for legacy 2.0 upgrade support $this->upgradeSettings(true); } //check for upgrade for 2.1 here.... //we only do this if no install folder is present mate if ($this->checkInstaller() == true && self::$_settings->general['settings']['version'] == "2.1") { $this->upgradeSettings21to22(); } //get the date and timezone //date_default_timezone_set("UTC"); date_default_timezone_set(self::$_settings->general['settings']['timezone']); //if no log date is set then use todays date self::$current_date = isset($_GET['logdate']) && !empty($_GET['logdate']) ? $_GET['logdate'] : date("Y-m-d"); //mobile status self::$isMobile = false; }
include_once 'class.Utility.php'; if (DEBUG) { $memory_usage['utility'] = memory_get_usage(); } /* Initialize LoadAvg Utility Class */ /* Initialize LoadAvg */ include_once 'class.LoadAvg.php'; $loadavg = new LoadAvg(); if (DEBUG) { $memory_usage['loadavg'] = memory_get_usage(); } //http://mobiledetect.net/ require_once 'Mobile_Detect.php'; $detect = new Mobile_Detect(); if ($detect->isMobile()) { LoadAvg::$isMobile = true; } /* Initialize LoadAvg Charts module */ include_once 'class.Modules.php'; $loadModules = new LoadModules(); if (DEBUG) { $memory_usage['modules'] = memory_get_usage(); } /* Initialize LoadAvg Charts module */ include_once 'class.Plugins.php'; $loadPlugins = new loadPlugins(); if (DEBUG) { $memory_usage['plugins'] = memory_get_usage(); } /* initialize timer */ include_once 'class.Timer.php';