if(!defined("_VALID_TTH")) die ("");
$tpl = new TemplatePower("template/contact.htm");
$tpl->prepare();
$page=isset($_GET['page']) ? intval($_GET['page']):1;
// Duong dan host
$tpl->assignGlobal("linkhost","http://".$CONFIG['http_host'].$CONFIG['dir_path']);
//// Quan ly dia chi lien he
$sql="SELECT * FROM catct WHERE id_catct='182' ORDER BY thu_tu ASC, id_catct DESC";
$rs_dm= $DB->query($sql);
if($r_dm=@mysql_fetch_array($rs_dm))
{
$tpl->newBlock("dia_chi");
$tpl->assign("name",$r_dm['name']);
$tpl->assign("noi_dung",$r_dm['noi_dung']);
}
// Hien thi anh quang cao
$sql="SELECT * FROM logo WHERE active='1' AND id_catlg='55' ORDER BY thu_tu ASC";
$db=$DB->query($sql);
while($rs=@mysql_fetch_array($db)){
if($rs["image"]!=""){
$tpl->newBlock("quang_cao");
$tpl->assign("image",$rs['image']);
$tpl->assign("link",$rs['link']);
}
}
//// Về chúng tôi
$sql="SELECT * FROM catct WHERE id_catct='247' AND active=1 ORDER BY thu_tu ASC, id_catct DESC";
$rs_dm= $DB->query($sql);
while($r_dm=@mysql_fetch_array($rs_dm))
{
$tpl->newBlock("noi_dung");
$tpl->assign("noi_dung",$r_dm['noi_dung']);
$tpl->assign("name",$r_dm['name']);
$tpl->assign("image",$r_dm['image']);
}
/// Đối tác
$sql="SELECT * FROM logo WHERE active='1' AND id_catlg='55' ORDER BY thu_tu ASC,id_catlg DESC";
$db=$DB->query($sql);
while($rs=@mysql_fetch_array($db)){
if($rs["image"]!=""){
$tpl->newBlock("doi_tac_new");
$tpl->assign("image",$rs['image']);
$tpl->assign("link",$rs['link']);
$tpl->assign("thu_tu",$rs['thu_tu']);
}
}
$content = getContent('67');
if($content["noi_dung"] != ""){
$tpl->assignGlobal("chao_ngay",$content["noi_dung"]);
}
//Dự án tiêu biểu
$sql_ne="SELECT * FROM news WHERE active='1' AND trang_chu=1 AND id_cat='86' ORDER BY thu_tu ASC, id_news DESC LIMIT 0,4";
$rs_ne=$DB->query($sql_ne);
while($r_ne=@mysql_fetch_array($rs_ne))
{
$tpl->newBlock("tin_ct");
$tpl->assign("name",$r_ne['name']);
$tpl->assign("image",$r_ne['image']);
$tpl->assign("gioi_thieu",cutWord($r_ne['gioi_thieu'],24));
$doiten1=khongdau($r_ne['name']);
$tpl->assign("link_detail","http://".$CONFIG['http_host'].$CONFIG['dir_path']."/chi-tiet/$r_ne[id_cat]-$r_ne[id_news]/".$doiten1.".html");
if($r_ne['image']!=""){
$tpl->newBlock("img_tin");
$tpl->assign("image",$r_ne["image"]);
$tpl->assign("link_detail","http://".$CONFIG['http_host'].$CONFIG['dir_path']."/tt/$r_ne[id_cat]-$r_ne[id_news]-".$doiten1.".html");
}
}
//// Hien thi ho tro truc tuyen
$sql_sp="SELECT * FROM catym WHERE active=1";
$rs_sp=$DB->query($sql_sp);
while($r=@mysql_fetch_array($rs_sp))
{
$tpl->newBlock("hotrotructuyen");
$tpl->assign("name",$r["name"]);
$sql_pos = "SELECT * FROM ym WHERE active=1 and id_catym='".$r["id_catym"]."'";
$rs_pos = $DB->query($sql_pos);
while($r_pos=@mysql_fetch_array($rs_pos)){
$tpl->newBlock("yahoo");
$tpl->assign("link",$r_pos["id"]);
$tpl->assign("email",$r_pos["email"]);
$tpl->assign("name",$r_pos["id"]);
$tpl->assign("phone",$r_pos["phone"]);
$tpl->assign("id_sky",$r_pos["id_sky"]);
}
}
$tpl->printToScreen();
?>