prepare(); $config_path = "https://".$CONFIG["http_host"].$CONFIG["dir_path"]; $tpl->assignGlobal("config_path",$config_path); $tpl->assignGlobal("thiet_ke_boi",_thiet_ke_boi); $tpl->assign("hotline",$CONFIG['phone']); $tpl->assignGlobal("huong_dan_khach_hang",_huong_dan_khach_hang); $tpl->assignGlobal("chinh_sach_uu_dai",_chinh_sach_uu_dai); $tpl->assignGlobal("thong_tin_cong_ty",_thong_tin_cong_ty); $tpl->assignGlobal("ho_tro_khach_hang",_ho_tro_khach_hang); $tpl->assignGlobal("chinh_sach_khach_hang",_chinh_sach_khach_hang); $tpl->assignGlobal("goc_tu_van",_goc_tu_van); $tpl->assignGlobal("gui_di",_gui); $tpl->assignGlobal("nhap_email",_nhap_email); $tpl->assign("title",$CONFIG['site_name'.$lang]); if($_REQUEST['sendmail']){ $a=array(); $a['email']=$_REQUEST['email']; $sql = "SELECT * FROM email WHERE email LIKE '%".$a['email']."%'"; $_rs = $DB->query($sql); $count = mysql_num_rows($_rs); if($count){ $tpl->newBlock("success"); $tpl->assign("value",_email_da_co); echo ""; } else{ $b=$DB->compile_db_insert_string($a); $sql="INSERT email (".$b['FIELD_NAMES'].") VALUES (".$b['FIELD_VALUES'].")"; $DB->query($sql); $tpl->newBlock("success"); $tpl->assign("value",_gui_mail_thanh_cong); echo ""; } } //Tai sao ban chon chung toi $sql="SELECT * FROM news WHERE active=1 AND id_cat=113 ORDER BY thu_tu ASC, id_news DESC LIMIT 4"; $rs=$DB->query($sql); while($r=mysql_fetch_array($rs)){ $tpl->newBlock("thongtinchinhsach"); //$tpl->assign("name",$r['name']); $tpl->assign("name",$r['name'.$lang]); $tpl->assign("gioi_thieu",$r['gioi_thieu'.$lang]); $tpl->assign("link",$config_path."/newsdetail/".remove_marks($r['name'])."-".$r['id_cat']."-".$r['id_news'].".html"); $i = 1 - $i; if($r['image']){ $tpl->newBlock("img-thongtinchinhsach"); $tpl->assign("image",$r['image']); $tpl->assign("name",$r['name']); $tpl->assign("link",$config_path."/newsdetail/".remove_marks($r['name'])."-".$r['id_cat']."-".$r['id_news'].".html"); } } // huong dan khach hang $sql_sp="SELECT * FROM news WHERE active=1 AND id_cat = 103 ORDER BY thu_tu ASC, id_news DESC LIMIT 8"; $rs_sp=$DB->query($sql_sp); while($r_sp=mysql_fetch_array($rs_sp)){ $tpl->newBlock("f-hdkh"); $tpl->assign("name",cut_string($r_sp['name'.$lang],35)); $tpl->assign("link",$config_path."/newsdetail/".remove_marks($r_sp['name'])."-".$r_sp['id_cat']."-".$r_sp['id_news'].".html"); } // Dich vu $sql_sp="SELECT * FROM news WHERE active=1 AND id_cat = 104 ORDER BY thu_tu ASC, id_news DESC LIMIT 8"; $rs_sp=$DB->query($sql_sp); while($r_sp=mysql_fetch_array($rs_sp)){ $tpl->newBlock("dichvunganha"); $tpl->assign("name",cut_string($r_sp['name'.$lang],35)); $tpl->assign("link",$config_path."/newsdetail/".remove_marks($r_sp['name'])."-".$r_sp['id_cat']."-".$r_sp['id_news'].".html"); // $tpl->assign("link","?act=newsdetail&pid=64&id=".$r_sp['id_news']); } ///////////////////////////////////// // doi tac $sql="SELECT * FROM logo WHERE active=1 AND id_catlg = 67 ORDER BY thu_tu ASC, id_logo DESC"; $rs=$DB->query($sql); while($r=mysql_fetch_array($rs)){ $tpl->newBlock("doitac"); $tpl->assign("name",$r['name']); $tpl->assign("link",$r['link']); $tpl->assign("image",$r['image']); } // ho tro khach hang $tpl->newBlock("support"); $tpl->assign("link_google",$CONFIG['facebook']); $tpl->assign("link_face",$CONFIG['facebook']); $tpl->assign("link_twitter",$CONFIG['facebook']); $tpl->assignGlobal("gio_mo_cua",$CONFIG['gio_mo_cua']); if($CONFIG['diachi_cty']){ $tpl->newBlock("address"); $tpl->assign("address",$CONFIG['diachi_cty'.$lang]); } if($CONFIG['info_cty']){ $tpl->newBlock("info_cty"); $tpl->assign("info_cty",$CONFIG['info_cty'.$lang]); } if($CONFIG['thanh_toan']){ $tpl->newBlock("thanh_toan"); $tpl->assign("thanh_toan",$CONFIG['thanh_toan'.$lang]); } if($CONFIG['thanh_toan_eng']){ $tpl->newBlock("thanh_toan_eng"); $tpl->assign("thanh_toan_eng",$CONFIG['thanh_toan_eng'.$lang]); } if($CONFIG['phone']){ $tpl->newBlock("sp24"); $tpl->assign("phone",$CONFIG['phone']); $tpl->assign("email",$CONFIG['site_email']); } // truot trai $slq_lg="SELECT * FROM logo WHERE active=1 AND id_catlg=31 ORDER BY thu_tu ASC, id_logo DESC LIMIT 1"; $rs_lg=$DB->query($slq_lg); while($r_lg = mysql_fetch_array($rs_lg)){ if($r_lg['image']){ $image_info = @getimagesize($CONFIG['upload_image_path'].$r_lg['image']); if (get_file_extension($r_lg['image'])=='swf' || get_file_extension($r_lg['image'])=='SWF'){ $info=' '; } else{ if($r_lg['link']) $info="".$r_lg["; else $info="".$r_lg["; } $tpl->newBlock("adv-left"); $tpl->assign("banner",$info); } } // truot phai $slq_lg="SELECT * FROM logo WHERE active=1 AND id_catlg=32 ORDER BY thu_tu ASC, id_logo DESC LIMIT 1"; $rs_lg=$DB->query($slq_lg); while($r_lg = mysql_fetch_array($rs_lg)){ if($r_lg['image']){ $image_info = @getimagesize($CONFIG['upload_image_path'].$r_lg['image']); if (get_file_extension($r_lg['image'])=='swf' || get_file_extension($r_lg['image'])=='SWF'){ $info=' '; } else{ if($r_lg['link']) $info="".$r_lg["; else $info="".$r_lg["; } $tpl->newBlock("adv-right"); $tpl->assign("banner",$info); } } if($CONFIG['gmap']){ $tpl->newBlock("map"); $tpl->assign("map",$CONFIG['gmap']); } $tpl->printToScreen(); ?>