compile_check = true; $GLOBALS['smarty']->debugging = false; if(isset($_GET['do']) && $_GET['do'] == 'debug') { $GLOBALS['smarty']->debugging = true; } include('includes/lib.php'); set_lang(); if(!isset($_GET['pg']) || !isset($GLOBALS['pg'])) { $_pg = getSettings('index_'.$GLOBALS['lang']); list($k, $v) = explode('=', $_pg); $_GET[$k] = $v; $GLOBALS[$k] = $v; $first_load = true; } else { $first_load = false; } include('modules/config.php'); include('modules/objects.php'); loadLibs(); loadInits(); include('includes/dictionary.php'); include_once('modules/users/login.php'); main_users_login(); $GLOBALS['isManage']='no'; $theme_path = $GLOBALS['rootpath2'].'/themes/'.getSettings('template'); $theme_url = $GLOBALS['root_domain'].'/themes/'.getSettings('template'); foreach ($GLOBALS['language_ids'] as $la_id) { $lang_links[$GLOBALS['language_title'][$la_id]] = languageLink($la_id); } $GLOBALS['smarty']->assign('first_load', $first_load); $GLOBALS['smarty']->assign('rss_link', $GLOBALS['root_domain'].'/modules/news/rss.php?lang='.$GLOBALS['lang']); $GLOBALS['smarty']->assign('copyright', getSettings('Copy_'.$GLOBALS['lang'])); $GLOBALS['smarty']->assign('lang_links', $lang_links); $GLOBALS['smarty']->assign('theme_url', $theme_url); $GLOBALS['smarty']->assign('theme_path', $theme_path); $GLOBALS['smarty']->assign('page_id', $GLOBALS['pg']); if(isset($GLOBALS['menu_id'])) { $GLOBALS['smarty']->assign('menu_id', $GLOBALS['menu_id']); } content(); loadModule('menu(0 normal)'); $GLOBALS['smarty']->assign('language_id', $GLOBALS['lang']); $GLOBALS['smarty']->assign('language_title', $GLOBALS['language_title'][$GLOBALS['lang']]); $GLOBALS['smarty']->display($theme_path.'/templates/index.tpl'); mysql_close($GLOBALS['_mysql_connection']); ?>