'Hết hàng', 1 => 'Còn hàng' ); $global_class = FSFactory::getClass('FsGlobal'); $config = $global_class->get_all_config(); if ($raw){ ob_start(); loadMainContent($module); $main_content = ob_get_contents(); ob_end_clean(); echo $main_content; }else{ /* Đếm số người truy cập */ //require(PATH_BASE.'libraries/counter.php'); $createCache = false; if(USE_CACHE && !isset($_SESSION['cart'])){ $requestUri = $_SERVER['REQUEST_URI']; $fileCache = PATH_BASE.'cache/'.$module.(IS_MOBILE?'-m':'').'-'.md5($module.'-'.$requestUri).'.html'; if(file_exists($fileCache) && ((time() - filemtime($fileCache)) < 600)){ require($fileCache);die; }else{ $createCache = true; } } require(PATH_BASE.'libraries/templates.php'); global $tmpl; $tmpl = new Templates(); /* Phiên bản mobile */ if(IS_MOBILE) $tmpl->tmpl_name = 'mobile'; ob_start(); loadMainContent($module); $main_content = ob_get_contents(); ob_end_clean(); if ($print){ require(PATH_BASE.'templates/'.$tmpl->tmpl_name.'/print.php'); die; } ob_start(); require(PATH_BASE.'templates/'.$tmpl->tmpl_name.'/index.php'); $all_website_content = ob_get_contents(); ob_end_clean(); ob_start(); $tmpl->loadHeader(); echo $all_website_content; if(USE_BENMARCH){ echo '