0)) { session_id($_SERVER['HTTP_X_ENCAGE_PHPSESSID']); session_start(); } else if (isset($_POST["HTTP_X_ENCAGE_PHPSESSID"]) && (strlen($_POST['HTTP_X_ENCAGE_PHPSESSID']) > 0)) { session_id($_POST["HTTP_X_ENCAGE_PHPSESSID"]); session_start(); } elseif (session_id() == '') { session_start(); } $_SESSION['api'] = false; $_SESSION['logsorttime'] = $_SESSION['logsort'] = $_SESSION['logging'] = array (); function logging($text = "",$file = __FILE__,$function = __FUNCTION__,$line = __LINE__,$start = 1) { } function view_microtime($text = "",$file = __FILE__) { global $sLOADSTART, $sLASTLOAD; $text = strtolower($text); // logging($text, $file); // $sLOADNOW = getmicrotime(); // $sLOADDELTA = ($sLOADNOW - $sLASTLOAD) * 1000; // $_SESSION['logging']['sequence']['regular'][] = $sLASTLOAD . " + " . $sLOADDELTA . " = " . $sLOADNOW . ":" . $text; // $_SESSION['logging']['sequence']['advanced'][] = array ( // "lastload" => $sLASTLOAD, // "loadnow" => $sLOADNOW, // "duration" => $sLOADDELTA, // "action" => $text, // "file" => $file ); // $_SESSION['logging']['actions'][$text]['time'] = $sLOADNOW; // $_SESSION['logging']['actions'][$text]['duration'] = $sLOADDELTA; // $_SESSION['logging']['actions'][$text]['file'] = $file; // $_SESSION['logging']['actions'][$text]['count'] ++; // // $_SESSION['logsort'][] = array('time'=> $tmp, 'text'=> $text); // // $_SESSION['logsorttime'][] = $tmp; // $sLASTLOAD = $sLOADNOW; // echo ".
"; } $sLOADSTART = getmicrotime(); $sLASTLOAD = $sLOADSTART; logging("Start", __FILE__, __FUNCTION__, __LINE__, 1); require_once ('NXT.url'); if (! @mysql_query("SELECT pCommonID FROM " . $sgPrefix . "_common")) { ob_clean(); session_start(); $_SESSION['setup'] = true; include ('setup/index.php'); exit(); } /* $qPublish = 'SELECT MAX(DateLastEdit) as lastmodified FROM ' . $sgPrefix . '_publish'; $rP = mysql_fetch_assoc(mysql_query($qPublish)); $qPublish = 'SELECT MAX(DateLastEdit) as lastmodified FROM ' . $sgPrefix . '_content'; $rC = mysql_fetch_assoc(mysql_query($qPublish)); $qPublish = 'SELECT MAX(DateLastEdit) as lastmodified FROM ' . $sgPrefix . '_images'; $rI = mysql_fetch_assoc(mysql_query($qPublish)); $qPublish = 'SELECT MAX(DateLastEdit) as lastmodified FROM ' . $sgPrefix . '_files'; $rF = mysql_fetch_assoc(mysql_query($qPublish)); $qPublish = 'SELECT MAX(DateLastEdit) as lastmodified FROM ' . $sgPrefix . '_link'; $rL = mysql_fetch_assoc(mysql_query($qPublish)); $qPublish = 'SELECT MAX(DateLastEdit) as lastmodified FROM ' . $sgPrefix . '_templateset_template'; $rTST = mysql_fetch_assoc(mysql_query($qPublish)); if (!$_SESSION['lastmodified']) { $_SESSION['lastmodified'] = 0; } $lastmodified = max(array ( $_SESSION['lastmodified'], $rP['lastmodified'], $rC['lastmodified'], $rI['lastmodified'], $rF['lastmodified'], $rL['lastmodified'], $rTST['lastmodified'] )); header("Cache-Control: post-check=5, pre-check=5"); header("Cache-Control: max-age=3600", false); header("Expires: " . date('r', (time() + 5))); header("Last-modified: " . gmdate('r', $lastmodified)); header("Content-Type: text/html"); if ($_SERVER["HTTP_IF_MODIFIED_SINCE"]) { $t = strtotime($_SERVER["HTTP_IF_MODIFIED_SINCE"]); if ($t >= $lastmodified) { header('HTTP/1.0 304 Not Modified'); exit(); } } */ if (file_exists('redirect.php')) { include('redirect.php'); } if ($_SESSION['global']['side'] != "front") { $_SESSION['global']['side'] = "front"; } include ('functions.php'); include ('system/license_check.php'); loadPackage('translate'); loadPackage('system.post'); systemHandlePost(); if (isset($_SESSION['saStats'])) unset($_SESSION['saStats']); $_SESSION['global']['PageRequest'] ++; $_SESSION['sSwitch'] = ! $_SESSION['sSwitch']; include ("system/login.php"); if ($_SESSION['siUser']) { $EncageRights->update(); } loadPackage('department.get'); $log = @mysql_fetch_assoc(mysql_query("SELECT enabled FROM " . $sgPrefix . "_log WHERE fUser='" . mysql_real_escape_string($_SESSION['siUser']) . "'")); if ($log['enabled']) { $_SESSION['logenabled'] = true; } else { $_SESSION['logenabled'] = false; } include ("system/payment.php"); if (isset($_GET['viewMode'])) { $_SESSION['sViewMode'] = ( int ) $_GET['viewMode']; } //view_microtime("Start finding rights"); //rights_update(); if (is_banned()) { loadPackage('system.error'); show_error(403.6); } if ($_SESSION['global']['adminvisit']) { if ($_SESSION['global']['PageRequest'] == $_SESSION['LoginAtPageRequest']) { $sgNiveauID = ""; $view = false; } } //include('system/eatcookie.php'); { if (substr($_SERVER["REQUEST_URI"], 0, 4) == '/go/') { header("HTTP/1.1 301 Moved Permanently"); header("Location: ".get_root_url(). substr($_SERVER["REQUEST_URI"], 3)); exit; } else { $page = explode('?', $_SERVER["REQUEST_URI"]); $page = $page[0]; } $PathInfo = preg_replace("|^/|", "", $page); $PathInfo = explode(".", $PathInfo); $sgPageType = preg_split("#[?/]#", $PathInfo[1]); // $PathInfo[1] = $sgPageType[1]; $PathInfo[1] = implode("/", array_slice($sgPageType, 1)); $sgPageType = $_SESSION['global']['sgPageType'] = $_SESSION['sgPageType'] = $sgPageType[0]; if (strlen($PathInfo[0])) { $temp .= $PathInfo[0]; } if (strlen($PathInfo[1])) { $temp .= '/'.$PathInfo[1]; } if (strlen($PathInfo[2])) { $temp .= '.'.$PathInfo[2]; } $PathInfo = $temp; $PathInfo = explode("/", $PathInfo); $_SESSION['global']['sgPathInfo'] = $PathInfo; $_SESSION['systemAppearanceCount'] = 0; $_SESSION[0]['AppearanceCount'] = 0; unset($_SESSION['Appearance']); if ($_SESSION['global']['sgPathInfo'][0] == 'medium') { /** * @todo Heeft nog aandacht nodig */ logging("medium override", __FILE__, __FUNCTION__, __LINE__, 1); loadPackage('medium.set'); switch ($_SESSION['global']['sgPathInfo'][1]) { case 'set' : { $_SESSION['global']['medium']['override'] = 'always'; if (isset($_SESSION['global']['sgPathInfo'][2]) && (strlen($_SESSION['global']['sgPathInfo'][2]) > 0)) { $_SESSION['global']['medium']['medium'] = $_SESSION['global']['sgPathInfo'][2]; } if (strlen($_SESSION['global']['medium']['medium']) > 0) { switch (true) { case is_administrator() === true : { setMedium($_SESSION['global']['medium']['medium']); } break; case $_SESSION['siUser'] == '' : { if (file_exists("center.php")) { //chdir('..'); define('LOGIN_FORCE_FRONTEND', true); include ("center.php"); } } break; default : { unset($_SESSION['global']['medium']['override']); unset($_SESSION['global']['medium']['medium']); setMedium(); } } array_shift($_SESSION['global']['sgPathInfo']); } } break; case 'unset' : { unset($_SESSION['global']['medium']['override']); unset($_SESSION['global']['medium']['medium']); setMedium(); } break; default : { $_SESSION['global']['medium']['override'] = 'once'; setMedium($_SESSION['global']['sgPathInfo'][1]); } break; } array_shift($_SESSION['global']['sgPathInfo']); array_shift($_SESSION['global']['sgPathInfo']); logging("medium override", __FILE__, __FUNCTION__, __LINE__, 2); } if ($_SESSION['global']['sgPathInfo'][0] == 'language') { logging("language override", __FILE__, __FUNCTION__, __LINE__, 1); if ($_SESSION['LANGUAGE_CODE'] != $_SESSION['global']['sgPathInfo'][1]) { $rLanguage = mysql_fetch_assoc(mysql_query("SELECT * FROM " . get_prefix() . "_language WHERE active=1 AND code='" . mysql_real_escape_string($_SESSION['global']['sgPathInfo'][1]) . "'")); if ($rLanguage) { $_SESSION['LANGUAGE_CODE'] = $rLangauge['code']; $_SESSION['siLanguage'] = $rLanguage['iLanguage']; $_SESSION['global']['language'][$_SESSION['MEDIA']]['LANGUAGE_CODE'] = $rLanguage['code']; $_SESSION['global']['language'][$_SESSION['MEDIA']]['siLanguage'] = $rLanguage['iLanguage']; } } array_shift($_SESSION['global']['sgPathInfo']); array_shift($_SESSION['global']['sgPathInfo']); $lastNiv = get_friendly_url_by_niveau($_SESSION['global']['override']['pNiveauID'], false, $_SESSION['siLanguage']); if (!$lastNiv) { $lastNiv = get_root_url(); } header("HTTP/1.1 303 See Other"); header("Location: ".$lastNiv); logging("language override", __FILE__, __FUNCTION__, __LINE__, 2); exit; } if ($_SESSION['global']['sgPathInfo'][0] == 'panel') { $_SESSION['global']['ThemePanelId'] = $_SESSION['global']['sgPathInfo'][1]; array_shift($_SESSION['global']['sgPathInfo']); array_shift($_SESSION['global']['sgPathInfo']); } else { $_SESSION['global']['ThemePanelId'] = null; } if (! isset($_SESSION['global']['media']) || (count($stMedia) != count($_SESSION['global']['media']))) { logging("get media", __FILE__, __FUNCTION__, __LINE__, 1); $stMedia = array (); $qMedia = "SELECT LOWER(name) as name FROM " . get_prefix() . "_media WHERE 1"; $qMedia = mysql_unbuffered_query($qMedia); while ( $rMedia = mysql_fetch_assoc($qMedia) ) { $stMedia[$rMedia['name']] = $rMedia['name']; } $stMedia['html'] = "web"; $stMedia['web'] = "web"; $_SESSION['global']['media'] = $stMedia; logging("get media", __FILE__, __FUNCTION__, __LINE__, 2); } $sObjectNames = array ( 'module', 'article', 'image', 'document', 'link' ); // var_dump($sgPageType); // var_dump($stMedia);exit; $_SESSION['global']['url']['sgLinkID'] = array (); switch (true) { case $sgPageType === "plugin" : { logging('sgPageType === "plugin"', __FILE__, __FUNCTION__, __LINE__, 1); $i = 1; $_SESSION['global']['sgPathInfo'] = $PathInfo; if (is_numeric($_SESSION['global']['sgPathInfo'][0])) { $q = mysql_query("SELECT * FROM " . $sgPrefix . "_module_installation, " . $sgPrefix . "_modules WHERE iModule=fModule AND pModuleInstallationID='" . $_SESSION['global']['sgPathInfo'][0] . "'"); } else { $q = mysql_query("SELECT * FROM " . $sgPrefix . "_module_installation, " . $sgPrefix . "_modules WHERE iModule=fModule AND LOWER(name) LIKE '" . strtolower(str_replace('_', '%', $_SESSION['global']['sgPathInfo'][0])) . "' GROUP BY iModule HAVING COUNT(iModuleInstallation) = 1"); } $resultModuleInstallation = mysql_fetch_assoc($q); if ($resultModuleInstallation) { loadPackage('module.plugin'); load_plugin($resultModuleInstallation['iModuleInstallation']); } logging('sgPageType === "plugin"', __FILE__, __FUNCTION__, __LINE__, 2); exit(); } break; case $sgPageType === "api" : { logging('sgPageType === "api"', __FILE__, __FUNCTION__, __LINE__, 1); $i = 1; $_SESSION['global']['url']['sgLinkID'] = $_SESSION['global']['sgPathInfo'] = $PathInfo; if (is_numeric($_SESSION['global']['sgPathInfo'][0])) { $q = mysql_query("SELECT * FROM " . $sgPrefix . "_module_installation, " . $sgPrefix . "_modules WHERE iModule=fModule AND pModuleInstallationID='" . $_SESSION['global']['sgPathInfo'][0] . "'"); } else { $q = mysql_query("SELECT * FROM " . $sgPrefix . "_module_installation, " . $sgPrefix . "_modules WHERE iModule=fModule AND LOWER(AppDir)='" . strtolower($_SESSION['global']['sgPathInfo'][0]) . "' GROUP BY iModule HAVING COUNT(iModuleInstallation) = 1"); } if (mysql_num_rows($q) == 0) { $q = mysql_query("SELECT * FROM " . $sgPrefix . "_module_installation, " . $sgPrefix . "_modules WHERE iModule=fModule AND LOWER(name)='" . strtolower($_SESSION['global']['sgPathInfo'][0]) . "' GROUP BY iModule HAVING COUNT(iModuleInstallation) = 1"); } $resultModuleInstallation = mysql_fetch_assoc($q); if ($resultModuleInstallation) { loadPackage('module.api'); set_appearance($PathInfo[0]); load_api($resultModuleInstallation['iModuleInstallation']); unset_appearance(); } logging('sgPageType === "api"', __FILE__, __FUNCTION__, __LINE__, 2); exit(); } break; case $sgPageType === "export" : case $sgPageType === "import" : { logging('sgPageType === "import/export"', __FILE__, __FUNCTION__, __LINE__, 1); $i = 1; $_SESSION['global']['sgPathInfo'] = $PathInfo; if ($sgPageType == "export") $where = " AND public=1"; if (is_numeric($_SESSION['global']['sgLinkNiveauID'])) { $q = mysql_query("SELECT * FROM " . $sgPrefix . "_module_installation, " . $sgPrefix . "_modules WHERE iModule=fModule AND pModuleInstallationID='" . $_SESSION['global']['sgLinkNiveauID'] . "'" . $where); } else { $q = mysql_query("SELECT * FROM " . $sgPrefix . "_module_installation, " . $sgPrefix . "_modules WHERE iModule=fModule AND LOWER(AppDir)='" . strtolower($_SESSION['global']['sgLinkNiveauID']) . "'" . $where . " GROUP BY iModule HAVING COUNT(iModuleInstallation) = 1"); } $resultModuleInstallation = mysql_fetch_assoc($q); if ($resultModuleInstallation) { $const_table = $sgPrefix . "_" . $resultModuleInstallation['tablename']; $_SESSION[siModuleInstallation] = $resultModuleInstallation['iModuleInstallation']; $_SESSION[pMIID] = $resultModuleInstallation['pModuleInstallationID']; $_SESSION['fPartner'] = $resultModuleInstallation['fPartner']; include_function(sgROOTDIR . "modules/" . $resultModuleInstallation['AppDir'] . "/custom/_functions"); include_function(sgROOTDIR . "modules/" . $resultModuleInstallation['AppDir'] . "/_functions"); include (sgROOTDIR . "modules/" . $resultModuleInstallation['AppDir'] . "/info.txt"); if (file_exists(sgROOTDIR . "modules/" . $resultModuleInstallation['AppDir'] . "/custom/_" . $sgPageType . "/index.php")) { include (sgROOTDIR . "modules/" . $resultModuleInstallation['AppDir'] . "/custom/_" . $sgPageType . "/index.php"); } } unset($_SESSION['siModuleInstallation'], $_SESSION['pMIID']); logging('sgPageType === "import/export"', __FILE__, __FUNCTION__, __LINE__, 2); exit(); } break; case in_array($sgPageType, array_keys($stMedia)) === true : { logging('sgPageType === "media"', __FILE__, __FUNCTION__, __LINE__, 1); if ($_SESSION['MEDIA'] != $_SESSION['global']['media'][$sgPageType]) { loadPackage('medium.set'); if (isset($_SESSION['global']['media'][$sgPageType]) && (strlen($_SESSION['global']['media'][$sgPageType]) > 0)) { $_SESSION['global']['medium']['override'] = 'once'; setMedium($sgPageType); // $_SESSION['global']['medium']['medium'] = $_SESSION['global']['media'][$sgPageType]; // $_SESSION['global']['medium']['override'] = 'always'; // setMedium($_SESSION['global']['medium']['medium']); } } logging('sgPageType === "media"', __FILE__, __FUNCTION__, __LINE__, 2); } break; } if (isset($_GET['HTTP_USER_AGENT']) && (strlen($_GET['HTTP_USER_AGENT']) > 0)) { loadPackage('medium.set'); logging("medium override HTTP_USER_AGENT", __FILE__, __FUNCTION__, __LINE__, 1); $_SESSION['global']['medium']['override'] = 'once'; setMedium(); logging("medium override HTTP_USER_AGENT", __FILE__, __FUNCTION__, __LINE__, 2); } logging("initialize", __FILE__, __FUNCTION__, __LINE__, 1); $sgNiveauID = $_SESSION['global']['sgPathInfo'][0]; if (! $sgNiveauID and $_SESSION['global']['redirect_homepage'] and ! $_POST and ! $_GET) { $rDomain = mysql_fetch_assoc(mysql_query("SELECT * FROM " . get_prefix() . "_domain WHERE iDomain='" . mysql_real_escape_string($_SESSION['global']['redirect_homepage']) . "'")); if ($rDomain) { $add = ''; if ($rDomain['determine_language']) { $x = determine_language(); if ($x) { $rLang = mysql_fetch_assoc(mysql_query("SELECT code FROM " . get_prefix() . "_language WHERE active=1 AND iLanguage='" . mysql_real_escape_string($x) . "'")); $add = '/language/' . $rLang[code] . '.html'; } else { $rLang = mysql_fetch_assoc(mysql_query("SELECT code FROM " . get_prefix() . "_language WHERE active=1 ORDER BY listorder ASC LIMIT 1")); if ($rLang) { $add = '/language/' . $rLang[code]; } } } session_write_close(); Header("Location: " . $rDomain[URL] . $add); exit; } } $submedium = explode("-", $_SESSION['MEDIA']); $submedium = $submedium[0]; logging("initialize " . $_SESSION['MEDIA'], __FILE__, __FUNCTION__, __LINE__, 1); switch ($submedium) { case 'wii' : case 'ps3' : case 'pda' : case 'pos' : case 'mobile' : case 'web' : case 'pos' : case 'windowsmediacenter' : case 'flash' : case 'psp' : case 'imode' : { loadPackage('medium.init.site'); initSite(); } break; case 'rss' : { loadPackage('medium.init.rss'); initRSS(); } break; case 'tv' : { loadPackage('medium.init.tv'); initTV(); } break; case 'kiosk' : { loadPackage('medium.init.kiosk'); initKiosk(); } break; case 'horizon' : { loadPackage('medium.init.horizon'); initHorizon(); } break; case 'bluetooth' : case 'narrowcasting' : case 'gadget' : { } break; } logging("initialize " . $_SESSION['MEDIA'], __FILE__, __FUNCTION__, __LINE__, 2); $_SESSION['siLanguage'] = $_SESSION['global']['language'][$_SESSION['MEDIA']]['siLanguage']; $_SESSION['LANGUAGE_CODE'] = $_SESSION['global']['language'][$_SESSION['MEDIA']]['LANGUAGE_CODE']; $_SESSION['global']['url'] = array (); if (! $view and ! $_SESSION['global']['adminvisit']) include ('system/stats.php'); $_SESSION['HOMEPAGE'] = $sgNiveauID ? false : true; $i = 0; // if (($_SESSION['global']['override']['pPublishID'] == $_SESSION['global']['sdPublishID']) && (is_numeric($_SESSION['global']['sgNiveauID']) && is_numeric($_SESSION['global']['sgPublishID']))) { // if (is_numeric($_SESSION['global']['sgNiveauID']) && is_numeric($_SESSION['global']['sgPublishID'])) { // $i = 2; // } elseif (is_numeric($_SESSION['global']['sgNiveauID']) && ) { // $i = 1; // } // // var_dump($sgPublishID); if (! is_numeric($_SESSION['global']['sgPathInfo'][0]) && ($_SESSION['global']['sgPathInfo'][0] != "")) { $i = 0; } elseif ((is_null($_SESSION['global']['sdPublishID']) || ($_SESSION['global']['override']['pPublishID'] != $_SESSION['global']['sdPublishID'])) && (is_numeric($_SESSION['global']['sgNiveauID'])) && (is_numeric($_SESSION['global']['sgPublishID']))) { $i = 2; } elseif (is_numeric($_SESSION['global']['sgNiveauID'])) { $i = 1; } // $i = 2; // var_dump($i); for(; $i < count($_SESSION['global']['sgPathInfo']); $i ++) { $sgLinkID[] = $_SESSION['global']['sgPathInfo'][$i]; $temp = explode('-',$_SESSION['global']['sgPathInfo'][$i]); $_SESSION['global']['url']['sgLinkID'][] = $temp[0]; unset($temp); } loadPackage('appearance'); logging("initialize", __FILE__, __FUNCTION__, __LINE__, 2); include (get_root_dir() . "system/drillmenu.php"); } header("Content-Type: text/html"); if (($_SESSION['firstvisit'] === false) && !$_SESSION['siUser']) { $queryScheduler = mysql_query("SELECT MAX(lastcheck) as lastmodified, MIN(lastcheck+frequency) as nextcheck FROM " . $sgPrefix . "_scheduler LEFT JOIN " . $sgPrefix . "_module_installation ON iModuleInstallation=fModuleInstallation LEFT JOIN " . $sgPrefix . "_modules ON iModule=fModule WHERE locked=0"); $rScheduler = mysql_fetch_assoc($queryScheduler); $qLastModified = mysql_query('SELECT MAX(DateLastEdit) as lastmodified FROM ' . $sgPrefix . '_system'); $rLastModified = mysql_fetch_assoc($qLastModified); $lastmodified = max(array($rScheduler['lastmodified'], $rLastModified['lastmodified'])); if ($rScheduler['nextcheck'] < time()) { $lastmodified = time(); } if (count($_POST) || (OvalonCache::getCreationDate($_SERVER['REQUEST_URI'], $_SESSION['siMedia'], $_SESSION['siSite'], $_SESSION['siDomain']) < $lastmodified)) { if (count($_POST)) { OvalonCache::removeFromCacheContaining($_SESSION['siMedia'], $_SESSION['siSite'], $_SESSION['siDomain']); } else { OvalonCache::removeFromCache($_SERVER['REQUEST_URI'], $_SESSION['siMedia'], $_SESSION['siSite'], $_SESSION['siDomain']); } } else { $c = OvalonCache::getValue($_SERVER['REQUEST_URI'], $_SESSION['siMedia'], $_SESSION['siSite'], $_SESSION['siDomain']); if ($c !== false) { header("Last-modified: ".date('r', $lastmodified)); if ($_SERVER["HTTP_IF_MODIFIED_SINCE"]) { $t = strtotime($_SERVER["HTTP_IF_MODIFIED_SINCE"]); if ($t >= $lastmodified) { header('HTTP/1.0 304 Not Modified'); exit(); } } echo $c; exit(); } } } else { $_SESSION['firstvisit'] = false; } loadPackage('common'); if (empty($_SESSION['SCHEDULER_TYPE'])) { $_SESSION['SCHEDULER_TYPE'] = get_common("SCHEDULER_TYPE"); // if (empty($_SESSION['SCHEDULER_TYPE'])) { // $_SESSION['SCHEDULER_TYPE'] = 'ajax'; // common_update("SCHEDULER_TYPE", 'ajax'); // } } if ($_SESSION['SCHEDULER_TYPE'] == 'site') { include ('system/scheduler.php'); } //HEADER("Pragma: no-cache"); if ($_POST['sfAction'] == 'system.translate.update') { include ("system/translateupdate.php"); } //exit; if (isset($_GET['code'])) $_SESSION['code'] = $_GET['code']; if ($_SESSION['force_admin'] and (($_SESSION[$KEYFILE] != "") && ! $view && ! $sgNiveauID && $_SESSION['global']['adminvisit'])) { $_SESSION['global']['side'] = "back"; $_SESSION['force_admin'] = false; ob_clean(); include ('interface/index.php'); exit(); } if ($_SESSION['global']['side'] != "front") { $_SESSION['global']['side'] = "front"; } logging("rights_exceptions", __FILE__, __FUNCTION__, __LINE__, 1); loadPackage('rights.exception'); rights_exceptions(); logging("rights_exceptions", __FILE__, __FUNCTION__, __LINE__, 2); if ($_SESSION['LICENSE_EXPIRED']) { loadPackage('license'); view_license_expired(); exit(); } logging("theme", __FILE__, __FUNCTION__, __LINE__, 1); loadPackage('theme.get'); if ((! $_SESSION['siMedia']) or ((($_SESSION['MEDIA_STYLE'] & 2) == 2) and ! get_theme())) { if ($_SESSION['siUser']) { if (! $_SESSION['siMedia']) { $page = 'nomedia'; } else { $page = 'notheme'; } } $_popup = 1; $forceform = true; $popup = 0; ob_clean(); include (get_root_dir() . 'center.php'); exit(); } logging("theme", __FILE__, __FUNCTION__, __LINE__, 2); loadPackage('medium.check'); logging("start media " . $_SESSION['MEDIA_DIR'], __FILE__, __FUNCTION__, __LINE__, 1); if (file_exists("media/" . $_SESSION['MEDIA_DIR'] . "/index.php")) { include ("media/" . $_SESSION['MEDIA_DIR'] . "/index.php"); } else { $Medium = $_SESSION['MEDIA']; $subMedium = explode('-', $Medium); $mainMedium = $subMedium[0]; unset($subMedium[0]); $subMedium = implode('-', $subMedium); $medium = $mainMedium . "-" . $subMedium; include ("media/" . $mainMedium . "/index.php"); } logging("start media " . $_SESSION['MEDIA_DIR'], __FILE__, __FUNCTION__, __LINE__, 2); logging("medium override once", __FILE__, __FUNCTION__, __LINE__, 1); switch ($_SESSION['global']['medium']['override']) { case 'once' : { loadPackage('medium.set'); if (strlen($_SESSION['global']['medium']['medium']) > 0) { setMedium($_SESSION['global']['medium']['medium']); } else { setMedium(); } } break; } logging("start media medium override once", __FILE__, __FUNCTION__, __LINE__, 2); if ($admincentervisit != 1) { logging("update stats", __FILE__, __FUNCTION__, __LINE__, 1); loadPackage('system.stats'); systemUpdateStats(); logging("update stats", __FILE__, __FUNCTION__, __LINE__, 2); } logging("Start", __FILE__, __FUNCTION__, __LINE__, 2); //var_dump($_SESSION['logenabled']); if ($_SESSION['logenabled']) { loadPackage('log'); systemSaveLog(); mysql_query("UPDATE " . get_prefix() . "_log SET enabled=0 WHERE fUser='" . mysql_real_escape_string($_SESSION['siUser']) . "'"); $_SESSION['logenabled'] = false; } if ($_SESSION['global']['override'] != false) { unset_appearance(); unset_appearance(); } $ob = ''; while ( count(ob_list_handlers()) > 1 ) { $ob .= ob_get_clean(); } $ob .= ob_get_contents(); /* $ob = preg_replace("/>[\t|\s]*<", $ob); $ob = str_replace("\r\n", "", $ob); $ob = str_replace("\r", "", $ob); $ob = str_replace("\n", "", $ob); */ //shutdown functions if (function_exists('translateupdate')) { translateupdate(); } systemHandlePost($ob); //var_dump($_SESSION); if (!$_SESSION['siUser']) { OvalonCache::addToCache($ob, $_SERVER['REQUEST_URI'], $_SESSION['siMedia'], $_SESSION['siSite'], $_SESSION['siDomain']); } session_write_close(); ?>