Exemple #1
0
 function getprice($donvi, $donvidat, $money)
 {
     $db =& JFactory::getDBO();
     //		(int)$donvi=$row->price_unit;
     $query = "SELECT id FROM #__jea_price_units where id='{$donvi}'";
     $db->setQuery($query);
     $result = $db->loadObjectList();
     global $PriceUnit;
     foreach ($result as $rowa) {
         $PriceUnit = $rowa->id;
     }
     //		(int)$donvidat=$row->price_area_unit;
     $query = "SELECT id FROM #__jea_price_area_units where id='{$donvidat}'";
     $db->setQuery($query);
     $resulta = $db->loadObjectList();
     //	print_r($result);
     foreach ($resulta as $rowb) {
         $PriceAreaUnit = $rowb->id;
     }
     switch ($PriceUnit) {
         case 2:
             $donvitien = " USD";
             break;
         case 1:
             $donvitien = "";
             break;
         case 3:
             $donvitien = " lượng";
             break;
         default:
             $donvitien = "";
             break;
     }
     switch (@$PriceAreaUnit) {
         case 1:
             $donvidat = "m<sup>2</sup>";
             break;
         case 2:
             $donvidat = "";
             break;
         case 3:
             $donvidat = "tháng";
             break;
         default:
             $donvidat = "";
             break;
     }
     $ddgia = modJeaEmphasisHelper::reFormatPrice($money, $PriceUnit);
     if ($money > 0) {
         if ($donvidat != "") {
             $dx = "/";
         } else {
             $dx = "";
         }
         $hientien = "<strong>" . trim($ddgia . $donvitien) . $dx . $donvidat . "</strong>";
     } else {
         $hientien = "<strong>Thương lượng</strong>";
     }
     return $hientien;
 }
Exemple #2
0
     echo "<strong>" . $row->living_space . "m<sup>2</sup></strong>";
 }
 echo "</td>";
 echo "</tr>";
 echo "</table>";
 echo "</td>";
 echo "</tr>";
 echo "</table>";
 echo "<table>";
 echo "<tr>";
 $pageid = $row->id . modJeaEmphasisHelper::getparamidPaging($params);
 echo "<td nowrap='nowrap' width='100px' style='vertical-align:top' >";
 echo "<center><strong><font color='red'><div id=\"{$pageid}\">" . modJeaEmphasisHelper::getprice($row->price_unit, $row->price_area_unit, $row->price) . "</div></font></strong></center>";
 "</td>";
 echo "<td nowrap='nowrap' style='vertical-align:top'>";
 echo @modJeaEmphasisHelper::getAjaxButton($row->price_unit, $row->price_area_unit, $row->price, $pageid);
 echo "</td>";
 echo "</tr>";
 echo "</table>";
 //		echo "<table>";
 //		echo "<tr>";
 //		echo "<td nowrap='nowrap'colspan=\"2\">";
 //echo  @modJeaEmphasisHelper::getAjaxButton($row->price_unit,$row->price_area_unit,$row->price,$row->id);
 //		"</td>";
 //		echo "</tr>";
 //		echo "</table>";
 //		echo "<tr>";
 //		echo "<td nowrap='nowrap' colspan=\"2\">".
 //		@modJeaEmphasisHelper::getAjaxButton($row->price_unit,$row->price_area_unit,$row->price,$row->id);
 //		"</td>";
 //		echo "</tr>";
$style = $params->get('style', 'emphasis');
if ($paging == 1) {
    $number_per_page = $params->get('number_per_page');
    $ItemidParam = modJeaEmphasisHelper::getparamItemId($params);
    if ($style == "sameItems") {
        $RowSam = modJeaEmphasisHelper::getSamRealItems();
        $rows = $RowSam['rows'];
        $tPage = $RowSam['TotalPage'];
    } else {
        $rowsF = modJeaEmphasisHelper::getList($params);
        $rows = array_slice($rowsF, 0, $number_per_page);
        $tPage = ceil(count($rowsF) / $number_per_page);
    }
} else {
    $rows = modJeaEmphasisHelper::getList($params);
}
$idPaging = $params->get('idPaging');
$measure = $params->get('surface_measure');
$style = $params->get('style', 'emphasis');
$order_by = $params->get('order_by', 'ordering');
$idKind = $params->get('idKind');
global $pagingBDS_title;
// goi ham phan trang
if ($paging == 1) {
    if ($style == "sameItems") {
        $pagingBDS_title = @modJeaEmphasisHelper::phantrang_SamItems($tPage);
    } else {
        $pagingBDS_title = @modJeaEmphasisHelper::phantrang($paging, $tPage, $number_per_page, $idPaging, $style, $order_by, $measure, $idKind, $ItemidParam);
    }
}
require JModuleHelper::getLayoutPath('mod_jea_emphasis');