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->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("gui_di",_gui); $tpl->assignGlobal("nhap_email",_nhap_email); $tpl->assign("title",$CONFIG['site_name'.$lang]); $tpl->assign("hotline",$CONFIG['phone']); 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 ""; } } /////////////////////////// //// thong tin cong ty $tpl->assign("xedaponline",$CONFIG['info_cty'.$lang]); //////////////////////////////////// // quang cao $slq_lg="SELECT * FROM logo WHERE active=1 AND id_catlg=36 ORDER BY thu_tu ASC, id_logo DESC"; $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("quangcao"); $tpl->assign("banner",$info); } } //////////////////////////////////// // doi tac $sql="SELECT * FROM logo WHERE active=1 AND id_catlg = 38 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']); } //////////////////////////////////// // huong dan khach hang $sql_sp="SELECT * FROM news WHERE active=1 AND id_cat = 64 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"); // $tpl->assign("link","?act=newsdetail&pid=64&id=".$r_sp['id_news']); } //////////////////////////////////// //Ho tro khach hang $sql="SELECT * FROM news WHERE active=1 AND id_cat=62 ORDER BY thu_tu ASC, id_news DESC LIMIT 3"; $rs=$DB->query($sql); while($r=mysql_fetch_array($rs)){ $tpl->newBlock("hotrokhachhang"); //$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-hotrokhachhang"); $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"); } } //////////////////////////////////// // thong tin cong ty $sql_sp="SELECT * FROM info WHERE active=1 ORDER BY thu_tu ASC, id_info DESC LIMIT 4"; $rs_sp=$DB->query($sql_sp); while($r_sp=mysql_fetch_array($rs_sp)){ $tpl->newBlock("about"); $tpl->assign("name",$r_sp['name'.$lang]); $tpl->assign("link",$config_path."/about/".remove_marks($r_sp['name'.$lang])."-".$r_sp['id_info'].".html"); } //////////////////////////////////// // 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['thanh_toan']){ $tpl->newBlock("thanh_toan"); $tpl->assign("thanh_toan",$CONFIG['thanh_toan'.$lang]); $tpl->assign("hotline",$CONFIG['phone']); } if($CONFIG['gmap']){ $tpl->newBlock("gmap"); $tpl->assign("link",$CONFIG['gmap']); } 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(); ?>