private function setActualPageTree($sAction) { switch ($sAction) { case "": $this->aPageTree = self::getPageTree(cCfg::getDefaultPage('id')); break; default: $page = self::getLngPageData($sAction, 'url'); /// page is published /// if ($page['published'] == '1') { $this->aPageTree = self::getPageTree($page['id']); } break; } if (!count($this->aPageTree)) { $page = self::getPageData(cCfg::$sPageNotFound, 'name'); $this->aPageTree = self::getPageTree($page['id']); } }
public function logout() { $userid = cCfg::getUserData('id'); $sess = session_id(); if ($userid !== false && $sess) { $where = array(array('session', '=', $sess), 'AND', array('ip', '=', $_SERVER['REMOTE_ADDR'])); $result = cDb::delete('core_authentications', $where); } $this->clearSessions(); header('Location: ' . cBuildIndex::getActionUrl(cCfg::getDefaultPage('name'))); }
if (!session_id()) { @session_start(); } require_once "core/core_defines.inc.php"; require_once "core/global_fce.php"; require_once "custom_defines.inc.php"; $Logs = new cLogs("index.php"); $Logs->on(); $Logs->addLog($_POST, "POST"); $DB = new cDb(); $connection = $DB->connect(); if ($connection) { $CFG = new cCfg(); if (!isset($_GET['_pageAction_'])) { if (is_string($CFG->getDefaultPage('path'))) { header("Location: " . $CFG->getDefaultPage('path')); } else { if (!ADMIN_PAGE_ACCESS_AUTHORIZIED) { header("Location: " . HTTP_PATH . "admin"); } } } $action = get_magic_quotes_gpc() ? $_GET['_pageAction_'] : addslashes($_GET['_pageAction_']); //$Logs->addLog($action,"_pageAction_"); $CORE = new cBuildIndex($action); if (MK_DEBUG) { $CORE->addCssToHead("core/logs.css"); } $Authent = new cAuthentication(); $Authent->authenticate();