select("","","","Madonhang='".$iMadonhang."'",""); if (count($aDta_donhang)>0) { $aDta_cartrow = $dta_cartrow->select("","","","Madonhang='".$iMadonhang."'",""); $trans = array( 'id' => $iMadonhang, 'affiliation' => 'Đồ gỗ giá kho', 'revenue' => $aDta_donhang['Tongthanhtien'], 'shipping' => 0, 'tax' => 0 ); $items = array(); foreach ($aDta_cartrow as $key => $value) { $items[] = array( 'sku' => $value['ProId'], 'name' => $value['Ten'], 'price' => $value['Giaban'], 'category' => $value['Ten'], 'quantity' => $value['Soluong'], ); } function getTransactionJs(&$trans) { return " ga('ecommerce:addTransaction', { 'id': '{$trans['id']}', 'affiliation': '{$trans['affiliation']}', 'revenue': '{$trans['revenue']}', 'shipping': '{$trans['shipping']}', 'tax': '{$trans['tax']}' });"; } function getItemJs(&$transId, &$item) { return " ga('ecommerce:addItem', { 'id': '$transId', 'name': '{$item['name']}', 'sku': '{$item['sku']}', 'category': '{$item['category']}', 'price': '{$item['price']}', 'quantity': '{$item['quantity']}' }); "; } $result .= ''; } $xtpl->assign('ANALYTICSJSECOMMERCE', $result); }else{ $xtpl->assign('ANALYTICSJSECOMMERCE', $result); }*/ $xtpl->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('RATING', $rating); $xtpl->assign('NUM', $num); $xtpl->assign('METAINDEX', $metaindex); $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('FOOTER', $aDta_config[0]['Footer' . $_SESSION['lang']]); $xtpl->assign('HOTLINE', $aDta_config[0]['Hotline']); $xtpl->assign('HOTLINECALL', layso($aDta_config[0]['Hotline'])); $xtpl->assign('HOTLINEMB', $aDta_config[0]['Hotlinemb']); $xtpl->assign('HOTLINEMBCALL', layso($aDta_config[0]['Hotlinemb'])); $xtpl->assign('STYLE', file_get_contents('style.php').file_get_contents('sua-css-moi.php')); $xtpl->assign('TUKHOA', '
' . $aDta_config[0]['Tukhoa'] . '
'); $xtpl->assign('LISTKEY', '
' . $aDta_config[0]['Hotro'] . '
'); $email = explode(',', $aDta_config[0]['Email']); $xtpl->assign('EMAIL', $email[0]); $xtpl->assign('SOCIAL', removedir($aDta_config[0]['Social'])); $xtpl->assign('BOTTOM', $aDta_config[0]['Bottom']); $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', '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); include "components/popup/popup.php"; $xtpl->assign('POPUP', $HTMLPopup); $sa = ''; if ($_GET['page'] == "dta_sanpham" && isset($_GET['id'])) { $checktin = xulylinktintuc($_GET['id']); if($checktin==1) $sa.=''; } $sa.=''; $xtpl->assign('SCRIPTACTION',$sa); // Gán biến $sosphome = $aDta_config[0]['Sosphome']; $sosp = $aDta_config[0]['Sosp']; $sosptin = $aDta_config[0]['Sosptin']; //unset($_SESSION['cartsave']); if ($mobile_browser > 0 and $mobileshow == 1) { // mobile // $menumobile = '' . $lang_titmenu . ''; // $xtpl->assign('MOBILEICON', '
' . $menumobile . '
'); $xtpl->assign('MENUMOBILE', ''); include "components/linemenu/linemenu.php"; $xtpl->assign('LINEMENU', $HTMLLinemenu); include "components/menutop/menutop.php"; $xtpl->assign('MENUTOP', $HTMLMenutop); /* include "components/menubot/menubot.php"; $xtpl->assign('MENUBOT', $HTMLMenubot); include "components/timkiem/timkiem.php"; $xtpl->assign('TIMKIEM', $HTMLTimkiem); include "components/giohang/giohang.php"; $xtpl->assign('GIOHANG', $HTMLGiohang); include "components/leftmenu/leftmenu.php"; $xtpl->assign('LEFTMENU', $HTMLLeftmenu); include "components/spnoibat/spnoibat.php"; $xtpl->assign('SPNOIBAT', $HTMLSpnoibat); include "components/spbanchay/spbanchay.php"; $xtpl->assign('SPBANCHAY', $HTMLSpbanchay);*/ //include "components/middleadv/middleadv.php"; $xtpl->assign('MIDDLEADV', $HTMLMiddleadv); //include "components/logothuonghieu/logothuonghieu.php"; $xtpl->assign('LOGOTHUONGHIEU', '
' . $HTMLLogothuonghieu . '
'); //$xtpl->assign('CSSMOBILE', ''); //$xtpl->assign('JSMOBILE', ''); } else { //include "components/menubottom/menubottom.php"; $xtpl->assign('MENUBOTTOM',$HTMLMenubottom); include "components/giohang/giohang.php"; $xtpl->assign('GIOHANG', $HTMLGiohang); include "components/thuonghieu/thuonghieu.php"; $xtpl->assign('THUONGHIEU', $HTMLThuonghieu); //$xtpl->assign('CSSMOBILE', ''); //$xtpl->assign('JSMOBILE', ''); //include "components/dangnhap/dangnhap.php"; $xtpl->assign('DANGNHAP',$HTMLDangnhap); include "components/menutop/menutop.php"; $xtpl->assign('MENUTOP', $HTMLMenutop); $xtpl->assign('MENUMOBILE', ''); //include "components/menuvip/menuvip.php"; $xtpl->assign('MENUVIP',$HTMLMenuvip); include "components/mailletter/mailletter.php"; $xtpl->assign('MAILLERTTER', $HTMLMailletter); include "components/timkiem/timkiem.php"; $xtpl->assign('TIMKIEM', $HTMLTimkiem); include "components/linemenu/linemenu.php"; $xtpl->assign('LINEMENU', $HTMLLinemenu); include "components/support/support.php"; $xtpl->assign('SUPPORT', $HTMLSupport); include "components/leftmenu/leftmenu.php"; $xtpl->assign('LEFTMENU', $HTMLLeftmenu); include "components/menubot/menubot.php"; $xtpl->assign('MENUBOT', $HTMLMenubot); include "components/spbanchay/spbanchay.php"; $xtpl->assign('SPBANCHAY', $HTMLSpbanchay); //include "components/spnoibat/spnoibat.php"; //$xtpl->assign('SPNOIBAT', $HTMLSpnoibat); include "components/logothuonghieu/logothuonghieu.php"; //$xtpl->assign('LOGOTHUONGHIEU', '
' . $HTMLLogothuonghieu . '
'); include "components/thongtincon/thongtincon.php"; $xtpl->assign('THONGTINCON', $HTMLThongtincon); include "components/middleadv/middleadv.php"; $xtpl->assign('MIDDLEADV', $HTMLMiddleadv); } include "components/tinkhac/tinkhac.php"; $xtpl->assign('TINKHAC',$HTMLTinkhac); 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/danhmuc/danhmuc.php"; $xtpl->assign('DANHMUC', $HTMLDanhmuc); include "components/menutuchon/menutuchon.php"; $xtpl->assign('MENUTUCHON',$HTMLMenutuchon); include "components/leftadv/leftadv.php"; $xtpl->assign('LEFTADV', $HTMLLeftadv); $xtpl->assign('INTROHOME', '
'.$aDta_config[0]['Home'].'
'); $xtpl->assign('BGSLIDE', 'bgslide'); } else { if(strpos($Likelink,'index.php')==true) { if($_GET['page']=='dta_sanpham') { $Likelink = to_url(); } if($_GET['page']=='dta_chitietsanpham') { $iId = $_GET['id']; //echo $iId; $Likelink = to_url().$iId.'.html'; } } $page = "modules/" . $aFolderName[$_GET['page']] . "/" . $_GET['page'] . ".php"; if (is_file($page)) { include "$page"; $xtpl->assign('CONTENT', '
' . $HTMLContent . '
'); } $xtpl->assign('HIDEMENU', 'hidemenu'); $xtpl->assign('MGTOP10', 'mt10'); //$xtpl->assign('JSMENULEFT', ''); } if (isset($_GET['page']) and $_GET['page'] == "dta_chitietsanpham") { if(getkieu($_GET['id'])==1){ $xtpl->assign('HIDEHOTLINE', 'hide'); $ordermb = '
Mua ngay Giao hàng tận nơi
Trả góp 0% Hotline 091.520.0214
'; $xtpl->assign('ORDERMB',$ordermb); } } if ($_GET['page'] == "dta_chitietsanpham" and getkieu($_GET['id'])==2) { if(strpos($Likelink,'index.php')==true) { if($_GET['page']=='dta_sanpham') { $Likelink = to_url(); } if($_GET['page']=='dta_chitietsanpham') { $iId = $_GET['id']; //echo $iId; $Likelink = to_url().$iId.'.html'; } } $metanew = ''; $xtpl->assign('METANEW',$metanew); } // Xu ly remarketing //echo $_GET['page'].'
'.$_GET['tukhoa']; //echo $_GET['id']; if (!isset($_GET['page']) || $_GET['page'] == "") { $viewhome = ""; }else{ if($_GET['page']=='dta_sanpham') { $viewhome = ""; } if($_GET['page']=='dta_chitietsanpham') { $aGetsp = $dta_sanpham->select('', '', '', 'Kieu=1 and Url="'.$_GET['id'].'"'); //echo count($aGetsp); $viewhome = ""; } elseif($_GET['page']=='cart') { $iMax=maxposcart(); if ($iMax>0) { $tongtien = 0; $listcon = ""; for ($i = 0; $i < $iMax; $i++) { $iPid = $_SESSION['cartsave'][$i]['SanphamId']; $tongtien+=$_SESSION['cartsave'][$i]['Thanhtien']; $listcon .="'".$iPid."',"; } $listcon = substr($listcon,0,-1); $listid = "[".$listcon."]"; } $viewhome = ""; } elseif($_GET['page']=='thanhcong') { $iMadonhang = $_GET['id']; $aDta_donhang=$dta_cart->select("","","","Madonhang='".$iMadonhang."'",""); if (count($aDta_donhang)>0) { $aDta_cartrow = $dta_cartrow->select("","","","Madonhang='".$iMadonhang."'",""); $iLine = count($aDta_cartrow); $listcon = ""; for($i=0;$i<$iLine;$i++) { $pId = $aDta_cartrow[$i]['ProId']; $listcon .="'".$pId."',"; } $listcon = substr($listcon,0,-1); $listid = "[".$listcon."]"; $viewhome = ""; } } else{ $viewhome = ""; } } $xtpl->assign('VIEWHOME',$viewhome); if(isset($_POST['btnRegister']) && $_POST['btnRegister']=='Gửi đăng ký') { $ten=addslashes($_POST['sTen']); $phone=addslashes($_POST['sPhone']); $tieude=addslashes($_POST['sTieude']); $noidung=addslashes($_POST['sNoidung']); $ngaydang = date('H:i:s d-m-Y', time()); $sapxep = date('Ymdhis', time()); $dta_dangky->insert("Ten,Phone,Tieude,Noidung,Ngaydang,Sapxep","'$ten','$phone','$tieude','$noidung','$ngaydang','$sapxep'"); echo ""; } /*$aCap1 = $dta_loaisp->select('', '', '', 'Phanloai=1', 'Vitri asc'); for ($i = 0; $i < count($aCap1); $i++) { $dta_loaisp->update('Count=5', 'Id=' . $aCap1[$i]['Id']); }*/ /* $aCap1 = $dta_sanpham->select('', '', '', 'Kieu=1 and Id=16', 'Vitri asc'); $mota = $aCap1[0]['Motangan']; $aCap2 = $dta_sanpham->select('', '', '', 'Kieu=1 and Id!=16', 'Vitri asc'); for ($i = 0; $i < count($aCap2); $i++) { $dta_sanpham->update("Motangan='$mota'", 'Id=' . $aCap2[$i]['Id']); }*/ /*$aCap2 = $dta_sanpham->select('', '', '', 'Kieu=1', 'Vitri asc'); for ($i = 0; $i < count($aCap2); $i++) { $loaisp = $aCap2[$i]['LoaispId']; $sId = $aCap2[$i]['Id']; $dta_mcat->insert("CatId,ProId","'$loaisp','$sId'"); }*/ /*$aCap2 = $dta_sanpham->select('', '', '', '', 'Vitri asc'); for ($i = 0; $i < count($aCap2); $i++) { $giabanint = $aCap2[$i]['Id']; $dta_sanpham->update("Item='$giabanint'", 'Id=' . $aCap2[$i]['Id']); }*/ $xtpl->parse('MAIN'); $xtpl->out('MAIN'); include 'file_css_sua.php'; include './tra-gop/script-to.php'; }else{ if($_SERVER['REQUEST_URI'] == '/googledef26bb1c1f92e7d.html'){ echo 'google-site-verification: googledef26bb1c1f92e7d.html'; } if($_SERVER['REQUEST_URI'] == '/menu-categories'){ include './menu-mobile.php'; } }