Ejemplo n.º 1
0
 public function getSqft()
 {
     // copy from listing_detail.php
     if ($this->property_type_2 == 42) {
         //property type land
         $sqft = MyFunctionCustom::convertData($this->land_area, 'sqm');
         $sqftcontent = $sqft != 0 && $sqft != '' ? "{$sqft} sqft" : '';
     } else {
         $sqft = $this->floor_area;
         $sqm = $this->floor_area;
         if ($this->floor_area_unit == Listing::FLOOR_UNIT_SQM) {
             $sqft = MyFunctionCustom::convertData($this->floor_area, 'sqm');
         }
         if ($this->floor_area_unit == Listing::FLOOR_UNIT_SQFT) {
             $sqm = MyFunctionCustom::convertData($this->floor_area, 'sqft');
         }
         $tmp = array();
         if ($sqft != 0 && $sqft != '') {
             $tmp[] = "{$sqft} sqft";
         }
         if ($sqm != 0 && $sqm != '') {
             $tmp[] = "{$sqm} sqm (built-up)";
         }
         $sqftcontent = implode(' / ', $tmp);
     }
     $s = Listing::showSqft($sqftcontent, Listing::GetFormatLandArea($this));
     $arr = explode('/', $s);
     return trim(str_replace('sqft', '', $arr[0]));
 }
Ejemplo n.º 2
0
    ?>
                            <span class="type ">
                                <?php 
    echo $text_price;
    ?>
                            </span>
                        <?php 
}
?>
                    </p>
                    <p><?php 
echo "{$sqf} psf (built-up)";
?>
</p>
                    <p><?php 
echo Listing::showSqft($sqftcontent, Listing::GetFormatLandArea($model));
?>
</p>
                    <?php 
$addressTitle = Listing::GetAddressReal($model);
?>
                    <p><?php 
echo $addressTitle;
?>
, Singapore <?php 
echo $model->postal_code;
?>
</p>
                </div>
            </div>