/** * @return CAdminPanel */ function CAdminPanel($_fileName = null) { if (null !== $_fileName) { $_newFileName = basename($_fileName); if (strlen($_newFileName) > 3) { define('AP_INDEX_FILE', $_newFileName); } } $this->_cfg = array(); CAdminPanel::InitConstans(); CAdminPanel::InitVersion(); $this->_logo = $this->GetLogoType(); defined('AP_INDEX_FILE') || define('AP_INDEX_FILE', AP_INDEX_FILE_TEMP); $_rp = CAdminPanel::RootPath(); if (strtolower(AP_INDEX_FILE) == 'install.php' && @file_exists($_rp . '/install.php') && isset($_SESSION[AP_SESS_GOODORBAD]) && $_SESSION[AP_SESS_GOODORBAD]) { if (false) { @header('Location: install.php'); exit; } $_SESSION[AP_SESS_INSTALL] = true; } $GLOBALS[AP_START_TIME] = ap_Utils::Microtime(); $GLOBALS[AP_DB_COUNT] = $GLOBALS[AP_WM_COUNT] = $GLOBALS[AP_WM_TIME] = 0; include $_rp . '/core/xmldocument.php'; include $_rp . '/core/plugin.php'; include $_rp . '/core/screens.php'; $this->_isInstall = isset($_SESSION[AP_SESS_INSTALL]); if (isset($_GET['logout']) || $this->_isInstall && (!isset($_GET['mode']) && !isset($_GET['check']))) { $_SESSION = array(); @header('Location: ' . AP_INDEX_FILE . '?login'); } if (isset($_GET['enable']) && strlen($_GET['enable']) > 0) { if ($_GET['enable'] == 'off' && isset($_SESSION[AP_SESS_ENABLE])) { unset($_SESSION[AP_SESS_ENABLE]); } else { if (isset($_SESSION[AP_SESS_ENABLE])) { $_SESSION[AP_SESS_ENABLE][$_GET['enable']] = true; } else { $_SESSION[AP_SESS_ENABLE] = array($_GET['enable'] => true); } } } $this->_initPath(); /* custom class file load */ if (defined('AP_DATA_FOLDER') && @file_exists(AP_DATA_FOLDER . '/custom/custom_data_class.php')) { require_once AP_DATA_FOLDER . '/custom/custom_data_class.php'; } include $_rp . '/core/custom.php'; $this->_initSettings(); $this->_init(); }