logging) require_once($root . 'sys/logger.php'); if($CFG->benchmark && !$benchmark) { require_once($CFG->gcmo . 'system/Benchmark.class.php'); $benchmark = new Benchmark(); } //if($CFG->cache) require_once('sys/cache.php'); header("Content-type: text/html; charset=utf-8"); if($_SERVER['REQUEST_URI']=='/login' || ($_POST['login'] && $_SERVER['REQUEST_URI']=='/index.php')) { $_GET['cmod'] = 'DefaultPage'; $_GET['key'] = 'login'; } require_once("sys/common.php"); if($benchmark) $benchmark->mark('included common'); //$smarty->assignByRef('menu', $menu); $smarty->assignByRef('page', $page); if($_SERVER['REQUEST_URI']=='/404notfound') header($CFG->http_404); else header($CFG->http_200); /* ***************** */ include('App.class.php'); $app = new App(); $app->init(); if($benchmark) $benchmark->mark('start output'); $smarty->display('header.tpl'); $app->output(); $smarty->display('footer.tpl'); /* ***************** */ $data = ob_get_clean(); if($cache && $cache->testURI()) { if($cache->isCachedURI($_SERVER['REQUEST_URI'])) { $cache->saveURI($data, $_SERVER['REQUEST_URI']); } } require_once('sys/cache.php'); if($cache) { $cache->applyPlugins($data); $cache->finalise(); } echo $data; if($benchmark) $benchmark->mark('end', true, true); ?>