mod_cache = $cfg_mod_cache;
$Cache->begin_cache();
//-------------------------------------------------
/*
//Executed time begin
//------------------------------
include("./includes/debug". PHP_EX);
$Debug = new Debug;
$Debug->start_debug();
//------------------------------
*/
//Database
include("./includes/mysql". PHP_EX);
$DB = new DBSql;
//Setting information
include("./includes/info_home". PHP_EX);
$Info = new Info;
//$Cache->cache_onoff($Info->option['cache_use']);
//Template
include("./includes/template". PHP_EX);
$Template = new Template("./templates/". $Info->option['template']);
//Lang
include("./languages/". $Info->option['language'] ."/lang_main". PHP_EX);
include("./languages/". $Info->option['language'] ."/home/lang_home". PHP_EX);
$Lang = new Lang_Home;
$Lang->Lang_Global();//Construction
//Set global vars
$Template->set_vars(array(
'SITENAME' => $Info->option['site_name'],
"SCRIPT_NAME" => $Info->option['script_name'],
"TEMPLATE_PATH" => './templates/'. $Info->option['template'],
));
$Info->check_website_close();
//Functions
include("./includes/functions". PHP_EX);
include("./includes/functions_home". PHP_EX);
$Func = new Func_Home;
$Info->get_common();
//Run the global file
include("./modules/global". PHP_EX);
//Run the module
include("./modules/". $Info->get_mod() . PHP_EX);
//-----------------------------------------------------
//Ready Template to out put
$Template->set_files(array(
"header" => $Info->tpl_header .".tpl",
"main" => $Info->tpl_main .".tpl",
"footer" => $Info->tpl_footer .".tpl"
));
/*
//Executed time end
//------------------------------
$Debug->end_debug();
//------------------------------
$Template->set_vars(array(
"EXECUTED_TIME" => $Lang->data["stat_time_execute"] . round($Debug->exectime, 4) .'s',
"USED_QUERIES" => $Lang->data["stat_queries_use"]. $DB->query_count,
"GZIP" => ($Info->option['gzip']) ? $Lang->data["stat_gzip_enabled"] : $Lang->data["stat_gzip_disabled"],
"SCRIPT_CACHING" => ($Info->option['cache_use']) ? $Lang->data["stat_cache_enabled"] : $Lang->data["stat_cache_disabled"],
));
*/
if ( $Cache->turn_on ){
//Set cache php
$Cache->end_cache();
}
else{
//Close mysql
$DB->close();
$Template->show();
}
?> |