assign('URL', $Likelink);
$xtpl->assign('TIEUDE', $title);
$xtpl->assign('KEYWORD', $keyword);
$xtpl->assign('DESCRIPTION', $description);
$xtpl->assign('WEBLINK', $weblink);
$xtpl->assign('LOGO', $logo);
$xtpl->assign('THEH1', $theh1);
$xtpl->assign('NOINDEX', $noindex);
$xtpl->assign('CANONICAL', $cannonical);
$xtpl->assign('RATING', $rating);
$xtpl->assign('NUM', $num);
$xtpl->assign('FACEBOOKID', $aDta_config[0]['FacebookId']);
$xtpl->assign('FACEBOOKAPP', $aDta_config[0]['FacebookApp']);
//$xtpl->assign('HOTRO', $aDta_config[0]['Hotro']);
$xtpl->assign('GIOLAM', $aDta_config[0]['Giolam']);
$xtpl->assign('CODE', $aDta_config[0]['Code']);
$xtpl->assign('BOTTOM', $aDta_config[0]['Bottom']);
$xtpl->assign('FOOTER', removedir($aDta_config[0]['Footer' . $_SESSION['lang']]));
$xtpl->assign('HOTLINE', $aDta_config[0]['Hotline']);
$xtpl->assign('HOTLINECALL',layso($aDta_config[0]['Hotline']));
$xtpl->assign('HOTLINE1', $aDta_config[0]['Hotline1']);
$xtpl->assign('HOTLINECALL1',layso($aDta_config[0]['Hotline1']));
$xtpl->assign('TUKHOA', '
' . $aDta_config[0]['Tukhoa'] . '
');
$email = explode(',', $aDta_config[0]['Email']);
$xtpl->assign('EMAIL', $email[0]);
$xtpl->assign('DIACHI', removedir($aDta_config[0]['Home']));
//$xtpl->assign('SOCIAL', removedir($aDta_config[0]['Social']));
$xtpl->assign('SLOGAN', removedir($aDta_config[0]['Slogan']));
$xtpl->assign('WEBSITE', $weblink);
$xtpl->assign('COPYRIGHT', $aDta_config[0]['Copyright']);
$xtpl->assign('THANHTOAN', removedir($aDta_config[0]['Thanhtoan']));
$xtpl->assign('FACEBOOKBOX', getfacebox($aDta_config[0]['Facebook']));
$xtpl->assign('FACEBOOK', $aDta_config[0]['Facebook']);
//echo $aDta_config[0]['Facebook'];
$xtpl->assign('CHUNGNHAN', $lang_chungnhan);
($aDta_config[0]['Youtube'] != "") ? $xtpl->assign('YOUTUBE', '') : $xtpl->assign('YOUTUBE', '');
$xtpl->assign('VIEWPORT', $viewport);
$xtpl->assign('SIZEHTML', $sizehtml);
$xtpl->assign('MWIDTH', $mwidth);
$xtpl->assign('MOBILECSS', $mobilecss);
$css = '/skins/style1.css';
$css_html.=file_get_contents($_SERVER['DOCUMENT_ROOT'].$css);
//$css_html.=file_get_contents($website.$css);
// Gán biến
$sosphome = $aDta_config[0]['Sosphome'];
$sosp = $aDta_config[0]['Sosp'];
$sosptin = $aDta_config[0]['Sosptin'];
//unset($_SESSION['cartsave']);
//$aDta_sanpham=$dta_sanpham->select('','dta_mcat','ProId',"Trangthai=1 and Kieu=1 and CatId IN ('2','3','4','64','70','71')",'Vitri desc','0,100','F.Id');
//echo count($aDta_sanpham); die;
//$aDta_sanpham=$dta_sanpham->select('',$listtable,'ProId','Trangthai=1 and Kieu=1'.$keyLoaisp,$dksort,'0,'.testslsp($aDta_loaisp[$a]['Count']),'F.Id');
// Mobile
include "include/mobile.php";
if ($mobile_browser > 0 and $mobileshow == 1) {
include "components/menutuchon/menutuchon.php"; $xtpl->assign('MENUTUCHON',$HTMLMenutuchon);
include "components/menumobile/menumobile.php"; $xtpl->assign('MENUMOBILE', $HTMLMenumobile);
} else {
include "components/linemenu/linemenu.php"; $xtpl->assign('LINEMENU', $HTMLLinemenu);
include "components/menutop/menutop.php"; $xtpl->assign('MENUTOP', $HTMLMenutop);
include "components/leftmenu/leftmenu.php"; $xtpl->assign('LEFTMENU', $HTMLLeftmenu);
}
include "components/logothuonghieu/logothuonghieu.php"; $xtpl->assign('LOGOTHUONGHIEU', '' . $HTMLLogothuonghieu . '
');
include "components/timkiem/timkiem.php"; $xtpl->assign('TIMKIEM', $HTMLTimkiem);
include "components/giohang/giohang.php"; $xtpl->assign('GIOHANG', $HTMLGiohang);
include "components/tinnoibat/tinnoibat.php"; $xtpl->assign('TINNOIBAT',$HTMLTinnoibat);
if (!isset($_GET['page']) || $_GET['page'] == "") // NOI DUNG O TRANG CHU
{
include "components/home/home.php"; $xtpl->assign('HOME', $HTMLHome);
include "components/slide/slide.php"; $xtpl->assign('SLIDE', $HTMLSlide);
include "components/spbanchay/spbanchay.php"; $xtpl->assign('SPBANCHAY', $HTMLSpbanchay);
//include "components/middleadv/middleadv.php"; $xtpl->assign('MIDDLEADV', $HTMLMiddleadv);
$xtpl->assign('JSMAIN', '');
if($aDta_config[0]['Hotro']!=''){
$chuky = ''.$aDta_config[0]['Hotro'].'
';
$xtpl->assign('CHUKYTOP', $chuky);
}
if($aDta_config[0]['Social']!=''){
$chuky = ''.$aDta_config[0]['Social'].'
';
$xtpl->assign('CHUKYBOT', $chuky);
}
} else {
$page = "modules/" . $aFolderName[$_GET['page']] . "/" . $_GET['page'] . ".php";
if (is_file($page)) {
include "$page";
if (isset($_GET['page']) and $_GET['page'] == "dta_chitietsanpham" ) {
if(getkieu($_GET['id'])==1 or getkieu($_GET['id'])==5)
{
$xtpl->assign('DETAILHIDE', 'showdetail');
}
$css = '/skins/chitiet.css';
$css_html.=file_get_contents($_SERVER['DOCUMENT_ROOT'].$css);
//$css_html.=file_get_contents($website.$css);
$xtpl->assign('JSMAIN', '');
}else{
$xtpl->assign('JSMAIN', '');
}
$xtpl->assign('CONTENT', $HTMLContent);
}
$xtpl->assign('HIDEMENU', 'hidemenu');
$xtpl->assign('MGTOP10', 'mt10');
}
$xtpl->assign('CSS',$css_html);
if(isset($_SESSION['cartsave']))
$xtpl->assign('COUNTGIOHANG',count($_SESSION['cartsave']));
else
$xtpl->assign('COUNTGIOHANG','0');
/*if ($_GET['page'] == "dta_chitietsanpham" and getkieu($_GET['id'])==2)
{
$metanew = '';
}*/
/*elseif(strpos($Likelink, '&trang') !== false)
{
$chia = explode('&trang=', $Likelink);
$metanew = '';
}else{
$metanew = '';
}
$xtpl->assign('METANEW',$metanew);*/
//echo $_SESSION['popupmain']; die;
if($aDta_config[0]['Popup']==1 and !isset($_SESSION['popupmain']) and $_SESSION['popupmain']=="")
{
$xtpl->assign('POPUPMAIN','');
$_SESSION['popupmain'] = "OK";
}
$hours = date('H');
$htmlhotline = ''; $htmlzalo = ''; $htmlhotdes = '';
if($hours>=12 and $hours<21)
{
$aDta_nv=$supersql->select('','dta_nhanvien','','Trangthai=1 and Thoigian=1','Id desc');
for($i=0;$i'.$phone.' - '.$aDta_nv[$i]['Ten'].'';
$htmlhotline .= '
'.$aDta_nv[$i]['Ten'].'
'.$phone.'
';
$htmlzalo .= ''.$phone.' - '.$aDta_nv[$i]['Ten'].'';
}
}else{
$aDta_nv=$supersql->select('','dta_nhanvien','','Trangthai=1 and Thoigian=2','Id desc');
for($i=0;$i'.$phone.' - '.$aDta_nv[$i]['Ten'].'';
$htmlhotline .= '
'.$aDta_nv[$i]['Ten'].'
'.$phone.'
';
$htmlzalo .= ''.$phone.' - '.$aDta_nv[$i]['Ten'].'';
}
}
$xtpl->assign('HOTLINEMAIN',$htmlhotline);
$xtpl->assign('HOTLINEDESK',$htmlhotdes);
$xtpl->assign('ZALOMAIN',$htmlzalo);
$xtpl->parse('MAIN');
$xtpl->out('MAIN');