server['cgi_host'] = HOST; $sql->server['cgi_user'] = USER; $sql->server['cgi_pass'] = PASS; $sql->server['cgi_database'] = NAME; $sql->connect_to_db(); $m = array() ; require PATH."counter.php"; //global $library; //$library = new library_functions; //connect(0); global $db; $db = new connect_server(); $parent = new pubclass($sql, $parent_id, '', ''); require PATH."view/objects/parent_cat.class.php"; $parent_cat = new parent_cat(); //# Banner advertising require PATH."view/objects/banner.php"; $banner = new banner(); //header $showBannerHeader = $banner->getBannerByCatID("vietnam","header01",1,733,150); //menu left $showBannerLeft1 = $banner->getBannerByCatID("vietnam","left01",1,img_width_bannerLeft,img_height_bannerLeft); $showBannerLeft2 = $banner->getBannerByCatID("vietnam","left02",1,img_width_bannerLeft,img_height_bannerLeft); $showBannerLeft3 = $banner->getBannerByCatID("vietnam","left03",1,img_width_bannerLeft,img_height_bannerLeft); //menu right $showBannerRight1 = $banner->getBannerByCatID("vietnam","right01",1,img_width_bannerRight,img_height_bannerRight); $showBannerRight2 = $banner->getBannerByCatID("vietnam","right02",1,img_width_bannerRight,img_height_bannerRight); $showBannerRight3 = $banner->getBannerByCatID("vietnam","right03",1,img_width_bannerRight,img_height_bannerRight); $showBannerRight4 = $banner->getBannerByCatID("vietnam","right04",1,img_width_bannerRight,img_height_bannerRight); $showBannerRight5 = $banner->getBannerByCatID("vietnam","right05",1,img_width_bannerRight,img_height_bannerRight); //session_register('parent_cat'); $_SESSION['parent_cat'] = $parent_id; //# menu left $showMenuLeft = ''; $display = ($parent_id=='gt0011') ? '' : 'none'; $showMenuLeft .='
  '.$language[$_SESSION['lang']]['mn_intro_namhouse'].'
  '.$language[$_SESSION['lang']]['mn_intro_business'].'
  '.$language[$_SESSION['lang']]['mn_intro_org'].'
  '.$language[$_SESSION['lang']]['mn_intro_contact'].'
'; $showMenuLeft .= ''; $display = ($parent_id=='gt0011') ? '' : 'none'; $showMenuLeft .='
  '.$language[$_SESSION['lang']]['mn_properties_rental'].'
  '.$language[$_SESSION['lang']]['mn_properties_landlord'].'
'; $showMenuLeft .= $parent_cat->getMenu($parent_id, $count); //# title category //$titleCateegoryName = ($parent_cat->getCategoryByID('news_vn',$parent_id)) ? ' '.$parent_cat->getCategoryByID('news_vn',$parent_id) : ''; //$titleCateegoryName .= ($parent_cat->getChildNameByID('news_vn',$parent_id,$child_id)) ? ' '.$parent_cat->getChildNameByID('news_vn',$parent_id,$child_id) : ''; $titleCateegoryName = ' '.$language[$_SESSION['lang']]['namhouse_trade']; require PATH."view/objects/news.class.php"; $news = new news(); //# Show feature menu left $cFeature = $parent->getChildCat("parent_id='gt0017'"); //Thiết kế kiến trúc $arrFeatures= $sql->getListByColum('news_id,child_id,news_title,news_smallimg,news_bigimg,news_new',$news, "parent_id='gt0017' AND child_id='".$cFeature["child_id"][0]."' AND news_active=1 ORDER BY news_dateadd DESC LIMIT 2,6"); $showFeatures = ''; $arrBigFeature = array(); $v=0; foreach ($arrFeatures as $f){ $arrBigFeature[$v] = path_bigimg.$f->news_bigimg; $img = ''; $strEnc = encode_all('m0=&m1=news_vn_detail&m2=gt0017&m3='.$f->child_id.'&m4=&m5='.$f->news_id.''); list($width, $height, $type, $attr) = getimagesize(path_bigimg.$f->news_bigimg); $l = ''; $cutString = $sql->ReturnStringCut($f->news_title,50); $linkdetail = ''; $showFeatures .=''; $v++; } $showFeatures .= '
'.$linkdetail.$l.$img.''.$linkdetail.$cutString.''; if($f->news_new==1) $showFeatures .=' '; $showFeatures .='
'.$linkdetail.'
'; //# Search $_REQUEST['info1']=''; $_REQUEST['info2']=''; $_REQUEST['info3']=''; require PATH."view/search.class.php"; $search = new search(); $locationCombo = $search->returnComboParent("location","location_id, location_name","location_active = 1","location_order ASC", $_REQUEST["info1"]); $propertiesCombo = $search->returnComboParent("childsub_cat","childsub_id, childsub_name","child_id='subvn21' AND childsub_active=1","childsub_name ASC", $_REQUEST["info2"]); $squareCombo = $search->returnComboParent("news","square_id , square_id","news_active= 1 AND square_id!=''","square_id ASC", $_REQUEST["info3"]); /** * SEO add 09-09-2009 : 09:41 PM */ /* $titleP = $parent->getParentName(); $titleC = $parent->getChildName(); $titleCategory = !empty($titleC) ? $titleP.', '.$titleC : $titleP; $title = $parent->getProductTitleByID($m5); $getTitle = !empty($title) ? $title.', '.$titleCategory : $titleCategory; */ $titleSEO = $language[$_SESSION['lang']]['namhouse_trade_id']; $page_id = 'namhouse_trade_id'; $cond = 'SELECT N.*, dscr.* FROM '.PAGE.' AS N JOIN '.PAGE_DS.' AS dscr ON N.page_id=dscr.page_id AND N.page_id="'.$page_id.'" AND dscr.lang_code="'.$_SESSION['lang'].'" AND N.page_type="N" AND N.avail=1'; //echo $cond; $row = $sql->getOneStatment($cond); require PATH."templates/header.html"; require PATH."templates/cms_page.html"; require PATH."templates/footer.html"; if(isset($news)) unset($news); if (isset($search)) unset($search); if(isset($search)) unset($search); if(isset($news)) unset($news); unset($banner); unset($parent_cat); unset($parent); //unset($library); unset($db); unset($sql); //END controllers