Exemplo n.º 1
0
$info['img'] = JURI::base() . $tempImage['min_url'];
//load template
if ($info['duong_pho'] != '') {
    $phay = ', ';
}
if ($info['quan_huyen'] != '') {
    $phay1 = ', ';
}
$diachi = $info['duong_pho'] . $phay . $info['quan_huyen'] . $phay1 . $info['tinh_thanh'];
if ($info['du_an'] != '') {
    $phay2 = ', ';
}
if ($info['luot_xem'] == '') {
    $info['luot_xem'] = 1;
}
$link = ilandCommonUtils::getPropertyLink($info['alias'], $info['id']);
$tieude = $info['loai_giao_dich'] . ' ' . $info['loai_bds'] . ', ' . $info['du_an'] . $phay2 . $info['quan_huyen'] . ', ' . $info['tinh_thanh'];
$kinhdo = $info['kinh_do'];
$vido = $info['vi_do'];
if ($info['loai_giao_dich_id'] == 1) {
    $mess = file_get_contents('components/com_mapbds/views/mapbds/tmpl/info.html');
} else {
    $mess = file_get_contents('components/com_mapbds/views/mapbds/tmpl/infothue.html');
}
$mess = str_replace('%img%', $info['img'], $mess);
$mess = str_replace('%ngu%', $info['phong_ngu'], $mess);
$mess = str_replace('%tam%', $info['phong_tam'], $mess);
$mess = str_replace('%title%', $tieude, $mess);
$mess = str_replace('%diachi%', $diachi, $mess);
$mess = str_replace('%gianguyencan%', $gianguyencan, $mess);
$mess = str_replace('%giam2%', $giam2, $mess);
Exemplo n.º 2
0
 function boSungThongTinBDS($propertyList, $templatePath, $moduleId, $tempalateName = NULL)
 {
     $propertyListCount = count($propertyList);
     for ($i = 0; $i < $propertyListCount; $i++) {
         // lay link va hinh anh thumbnail
         $tempImage = ilandCommonUtils::getPropertyThumbnail($propertyList[$i]['id']);
         $propertyList[$i]['image'] = $tempImage['min_url'];
         if (empty($propertyList[$i]['alias'])) {
             $propertyList[$i]['alias'] = unicode($propertyList[$i]['tieu_de']);
         }
         $propertyList[$i]['link'] = ilandCommonUtils::getPropertyLink($propertyList[$i]['alias'], $propertyList[$i]['id']);
         // lay template tien te
         $propertyList[$i]['tien_te_HTML'] = ilandCommonUtils::fetchCurrencyTemplate($propertyList[$i], $templatePath, $moduleId, $tempalateName);
         if (!empty($propertyList[$i]['ngay_dang'])) {
             $propertyList[$i]['ngay_dang'] = date('d-m-Y', $propertyList[$i]['ngay_dang']);
         }
         if (!empty($propertyList[$i]['ngay_chinh_sua'])) {
             $propertyList[$i]['ngay_chinh_sua'] = date('d-m-Y', $propertyList[$i]['ngay_chinh_sua']);
         }
         $propertyList[$i]['dia_chi'] = ilandCommonUtils::ketHopDiaChi($propertyList[$i]['so_nha'], $propertyList[$i]['duong_pho'], $propertyList[$i]['phuong_xa'], $propertyList[$i]['quan_huyen'], $propertyList[$i]['tinh_thanh']);
         $propertyList[$i]['gia_m2'] = ilandCommonUtils::reFormatPrice($propertyList[$i]['gia_m2']);
         $propertyList[$i]['gia_nguyen_can'] = ilandCommonUtils::reFormatPrice($propertyList[$i]['gia_nguyen_can']);
         /*									 
         			if($propertyList[$i]['don_vi_dien_tich_id']==1||$propertyList[$i]['don_vi_dien_tich_id']==3){
         				$propertyList[$i]['gia_nguyen_can'] =  ilandCommonUtils::layGiaNguyenCan( array('dien_tich_su_dung'=>$propertyList[$i]['dien_tich_su_dung'],
         											 									'gia'=>$propertyList[$i]['gia']) );
         			}
         			else if($propertyList[$i]['don_vi_dien_tich_id']==2||$propertyList[$i]['don_vi_dien_tich_id']==4){
         				$propertyList[$i]['gia_m2'] =  ilandCommonUtils::layGiaM2( array('dien_tich_su_dung'=>$propertyList[$i]['dien_tich_su_dung'], 
         											 									'gia'=>$propertyList[$i]['gia']) );
         			}
         			* 
         */
         $propertyList[$i]['gia'] = ilandCommonUtils::layGiaTien(array('don_vi_tien_id' => $propertyList[$i]['don_vi_tien_id'], 'don_vi_dien_tich_id' => $propertyList[$i]['don_vi_dien_tich_id'], 'gia' => $propertyList[$i]['gia']));
         //$propertyList[$i]['gia'] = ilandCommonUtils::reFormatPrice($propertyList[$i]['gia']);
         $propertyList[$i]['luot_xem'] = ilandCommonUtils::demLuotXemBDS($propertyList[$i]['id']);
     }
     return $propertyList;
 }