mod_cache = $cfg_mod_cache; $cache_name = ''; if (($Cache->get_config () AND !$Cache->check_update_schedule ('schedule'))) { $cache_name = $Cache->get_page_id (); if (empty ($cache_name)) { $Cache->cache_onoff (0); } else { if ($str = $Cache->get_cache ($cache_name) != false) { $gmt = ($Cache->option['timezone'] ? ' (GMT' . $Cache->option['timezone'] . ')' : ' (GMT)'); $datetime = $Cache->translate_date (gmdate ($Cache->option['full_date_time_format'], time () + $Cache->option['timezone'] * 3600)) . $gmt; $str = preg_replace ('#()(.*?)()#si', '' . $datetime . '', $str); echo $str; exit (); } } } include './includes/mysql' . PHP_EX; include './includes/template' . PHP_EX; include './includes/home_info' . PHP_EX; $DB = new DBSql (); $Info = new Info (); $Template = new Template ('./templates/' . $Info->option['template']); include './languages/' . $Info->option['language'] . '/lang' . PHP_EX; include './languages/' . $Info->option['language'] . '/lang_home' . PHP_EX; $Lang = new Lang_Home (); $Lang->Lang_Global (); $Template->set_vars (array ('SITENAME' => $Info->option['site_name'], 'SCRIPT_VERSION' => $Info->option['script_version'], 'TEMPLATE_PATH' => './templates/' . $Info->option['template'])); $Info->check_website_close (); include './includes/functions' . PHP_EX; include './includes/functions_home' . PHP_EX; $Func = new Func_Home (); $Info->get_common (); include './modules/global' . PHP_EX; include './modules/' . $Info->get_mod () . PHP_EX; $Template->set_files (array ('header' => $Info->tpl_header . '.tpl', 'main' => $Info->tpl_main . '.tpl', 'footer' => $Info->tpl_footer . '.tpl')); if ($Cache->turn_on) { $Info->option['general_date_day'] = $Lang->data['general_date_day']; $Info->option['general_date_day_short'] = $Lang->data['general_date_day_short']; $Info->option['general_date_month'] = $Lang->data['general_date_month']; $Info->option['general_date_month_short'] = $Lang->data['general_date_month_short']; $Cache->set_cache_content (serialize ($Info->option)); $Cache->set_cache ('option', 'php'); $Cache->reset_cache_content (); $Cache->set_cache_content (serialize ($Func->get_update_schedule ())); $Cache->set_cache ('schedule', 'php'); $DB->close (); if (empty ($cache_name)) { $Cache->option = $Info->option; $cache_name = $Cache->get_page_id (); if (empty ($cache_name)) { $cache_name = 'idx'; } } $Cache->reset_cache_content (); $Cache->set_cache_content ($Template->show ('header', 1)); $Cache->set_cache_content ($Template->show ('main', 1)); $Cache->set_cache_content ($Template->show ('footer', 1)); $Cache->set_cache ($cache_name); echo $Cache->get_cache ($cache_name); } else { $DB->close (); $Template->show (); } ?>