Exemplo n.º 1
0
$mainframe =& JFactory::getApplication('site');
// ham bo sung
include_once 'libraries' . DS . 'js' . DS . 'ham-tien-ich-php.php';
include_once 'libraries' . DS . 'unisonlib' . DS . 'com_jea_lib.php';
$keytown_id = $_REQUEST['keytown_id'];
$keykind_id = $_REQUEST['keykind_id'];
$keytype_id = $_REQUEST['keytype_id'];
$keyprice = $_REQUEST['keyprice'];
$slht = $_REQUEST['slht'];
$id = $_REQUEST['id'];
$khoanggia = $_REQUEST['khoanggia'];
$keyarea_id = $_REQUEST['keyarea_id'];
$page = $_REQUEST['i'];
$app =& JFactory::getApplication();
$CunTemp = $app->getTemplate();
@($RowSam = getSamLand($keytown_id, $keykind_id, $keytype_id, $tigia, $slht, $id, $khoanggia, $keyarea_id, $realtor, $price, $page));
$rows = $RowSam['rows'];
//$RowSam['TotalPage'];
//print_r($page);
foreach ($rows as $row) {
    if ($row->kind_id == '1') {
        $row->itemid = '&Itemid=10';
    } elseif ($row->kind_id == '2') {
        $row->itemid = '&Itemid=11';
    } elseif ($row->kind_id == '3') {
        $row->itemid = '&Itemid=12';
    } elseif ($row->kind_id == '4') {
        $row->itemid = '&Itemid=13';
    }
}
require_once JPATH_BASE . DS . 'modules' . DS . 'mod_jea_emphasis' . DS . 'helper.php';
Exemplo n.º 2
0
 function paging_bds($keyvnprice)
 {
     $price_unit = $this->row->price_unit;
     if ($price_unit == 1) {
         $tigia = 1;
     } else {
         if ($price_unit == 2) {
             $tigia = 19505;
         } else {
             $tigia = 30000000;
         }
     }
     $price = $this->row->price;
     $slht = $this->params->get('bdslqhienthi');
     $keyarea_id = $this->row->area_id;
     $id = $this->row->id;
     if ($this->params->get('bdslqtown') == 1) {
         $keytown_id = $this->row->town_id;
     } else {
         $keytown_id = 0;
     }
     if ($this->params->get('bdslqkind') == 1) {
         $keykind_id = $this->row->kind_id;
     } else {
         $keykind_id = 0;
     }
     if ($this->params->get('bdslqtype') == 1) {
         $keytype_id = $this->row->type_id;
     } else {
         $keytype_id = 0;
     }
     //		$keysprice=1;
     if ($this->params->get('bdslqkhoanggia') != NULL) {
         $khoanggia = $this->params->get('bdslqkhoanggia');
     }
     $RowSam = @getSamLand($keytown_id, $keykind_id, $keytype_id, $tigia, $slht, $id, $khoanggia, $keyarea_id, $realtor, $price, $page);
     $TotalPage = $RowSam['TotalPage'];
     echo "<input id='currentnext_{$id}' type=\"hidden\" name=\"currentnext_{$id}\" value=\"1\"/>";
     echo "<img src=\"./images/button_pre.gif\" alt=\"\" onclick=\"return bdsphantrang({$keytown_id} ,{$keykind_id},{$keytype_id},{$keyvnprice},{$slht},{$id},{$khoanggia},{$keyarea_id},{$TotalPage},0,'tranga')\" />";
     echo "<span style=\"color:#FFFFFF ;font-weight: bold;font:13px Arial;padding-left:0px; vertical-align:top \" id=\"hienthitrang_{$id}\"> 1/{$TotalPage} </span>";
     echo "<img src=\"./images/button_next.gif\" alt=\"\" onclick=\"return bdsphantrang({$keytown_id} ,{$keykind_id},{$keytype_id},{$keyvnprice},{$slht},{$id},{$khoanggia},{$keyarea_id},{$TotalPage},1,'tranga')\" />";
 }
Exemplo n.º 3
0
 function getSamRealItems()
 {
     /* thuc hien chuyen gia tri cho getsamland*/
     $tigia = 1;
     $idElement = 132;
     $slht = $this->params->get('bdslqhienthi');
     $proid = JFactory::getURI()->getVar("proid");
     $db =& JFactory::getDBO();
     $query = "SELECT * FROM #__jea_properties WHERE id = {$proid}";
     $db->setQuery($query);
     $result = $db->loadObjectList();
     foreach ($result as $row) {
         $id = $row->id;
         $keyarea_id = $row->area_id;
         $keyvnprice = $row->price;
         if ($this->params->get('bdslqtown') == 1) {
             $keytown_id = $row->town_id;
         } else {
             $keytown_id = 0;
         }
         if ($this->params->get('bdslqkind') == 1) {
             $keyskind_id = $row->kind_id;
         } else {
             $keyskind_id = 0;
         }
         if ($this->params->get('bdslqtype') == 1) {
             $keystype_id = $row->type_id;
         } else {
             $keystype_id = 0;
         }
     }
     if ($this->params->get('bdslqkhoanggia') != NULL) {
         $khoanggia = $this->params->get('bdslqkhoanggia');
     }
     @($RowSam = getSamLand($keytown_id, $keykind_id, $keytype_id, $tigia, $slht, $id, $khoanggia, $keyarea_id, $realtor, $price));
     return $RowSam;
 }