dbQuery ("set names utf8"); $user = new flexibleAccess(); if ( $_GET['logout'] == 1 ) $user->logout('http://'.$_SERVER['HTTP_HOST']."/"); $thisHost = explode('.', strtolower($_SERVER['SERVER_NAME'])); $curlang = "en";// ((count($thisHost) == 3) && $thisHost[0] != "www" && $thisHost[0] != "" && $thisHost[0] != "new") ? $thisHost[0] : $cfg->{'default_lang'}; if (!$m) $m = $_GET['m']; if (eregi('/', $m)) die ("Error 432"); $fi = ($_GET['fi']) ? $_GET['fi'] : $m; if (eregi('/', $fi)) die ("Error 433"); if ($app['login_failed']) { $m = "pages"; $p = "login"; } $tpl->assign('subpanel_left', "general"); if (file_exists("mods/$m/$fi.php")) include ("mods/$m/$fi.php"); else die("Error 921"); $tpl->assign('panel', $app['panel'] ? $app['panel'] : "two_cols"); $tpl->assign('subpanel', $app['subpanel'] ? $app['subpanel'] : ""); $tpl->assign('header_ext', $app['header_ext'] ? $app['header_ext'] : "header_general"); $tpl->assign('seo_desc', $app['seo_desc'] ? $app['seo_desc'] : $cfg["seo_desc"]); $tpl->assign('seo_title', $app['seo_title'] ? $app['seo_title'] : $cfg["seo_title"]); $tpl->assign('seo_keywords', $app['seo_keywords'] ? $app['seo_keywords'] : $cfg["seo_keywords"]); $tpl->assign('headerpromos', $app['headerpromos'] ? $app['headerpromos'] : ""); $tpl->assign('js', $app['js'] ? $app['js'] : ""); $tpl->assign('user_loaded', $user->is_loaded()); $tpl->assign('section', $app['section']); if ($user->is_loaded()) { $tpl->assign('current_user', $user->userData); if ($user->get_property("type_of_user") == _USER_ADMIN) { $tpl->assign('path', $_SERVER['REQUEST_URI']); } } $tpl->assign('warn_info', $app['warn_info']); $tpl->assign('notifications', $app['notifications']); if ($app['ajax_response']) { header('Content-Type: text/html; charset=UTF-8'); header("Cache-Control: no-cache"); header("Pragma: no-cache"); $app['ajax_response'] = ereg_replace("\n", "", $app['ajax_response']); $app['ajax_response'] = ereg_replace("\r", "", $app['ajax_response']); echo $app['ajax_response']; return; } if (!$app['no_template']) $tpl->display('templates/'.($app['template'] ? $app['template'] : "main").'.tpl'); //echo phpinfo(); ?>