$tpl=new TemplatePower("template/footer.htm");
$tpl->prepare();
$config_path = "http://".$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 "";
}
}
/////////////////////////////////////
$tpl->printToScreen();
?>