<li class="last">Listed on <?php if ($model->status_listing == STATUS_LISTING_ACTIVE) { echo date('M d,Y', strtotime($model->date_listed)); } ?> </li> </ul> </div> <div style="float:right; width: 400px;"> <ul class="list-2"> <li class="first" style="color:#E2BE3F;font-weight: bold;"><?php echo "S\$" . Yii::app()->format->Price($model->price); ?> </li> <li><?php echo ActiveRecord::getInfoRecord('ProMasterFloor', $model->floor_area, 'name'); ?> </li> <li> <?php if (!empty($model->of_bedroom)) { echo '<span class="ico-bed">' . $model->of_bedroom . '</span> '; } if (!empty($model->of_bathrooms)) { echo '<span class="ico-shower">' . $model->of_bathrooms . '</span> '; } ?> </li> <li class="last"><a target='_blank' href="<?php echo Yii::app()->createAbsoluteUrl('site/listingdetail', array('slug' => $model->slug)); ?>
public static function getViewDetailTenure($model) { $res = ActiveRecord::getInfoRecord('ProMasterTenure', $model->tenure, 'name'); return $res; }
<?php if ($model->type_selling == 'Tenancy') { $arrData = array('type_enquiry', array('name' => 'Property Name or Address', 'value' => $model->address), array('name' => 'property_type_id', 'type' => 'html', 'value' => $PropertyTypeList), 'postal_code', array('name' => 'location_id', 'type' => 'raw', 'value' => isset($model->location->name) ? $model->location->name : ''), 'unit', 'tenure', 'floor_area', array('name' => '# of Bedrooms', 'value' => $model->bedrooms), array('name' => '# of bathrooms', 'value' => $model->bathrooms), array('name' => 'type_selling', 'value' => !empty($model->type_selling) ? $model->type_selling : ''), array('name' => 'Tenancy expiry date', 'value' => date('d-m-Y', strtotime($model->tenancy_expiry_datepicker)) . ' - ' . $model->tenancy_expiry_date), array('name' => 'monthly_rental_amount', 'value' => !empty($model->monthly_rental_amount) ? $model->monthly_rental_amount : ''), 'furnished', 'price', 'official_bank_val', array('name' => 'remark', 'type' => 'raw', 'value' => !empty($model->remark) ? $model->remark : ''), 'name', array('name' => 'nric', 'value' => !empty($model->nric) ? $model->nric : ''), 'email', 'phone', array('name' => 'Country', 'value' => ActiveRecord::getInfoRecord('AreaCode', $model->country_id, 'area_name')), array('name' => 'description', 'type' => 'html', 'value' => nl2br(strip_tags($model->description))), 'created_date:dateTime'); } else { $arrData = array('type_enquiry', array('name' => 'Property Name or Address', 'value' => $model->address), array('name' => 'property_type_id', 'type' => 'html', 'value' => $PropertyTypeList), 'postal_code', array('name' => 'location_id', 'type' => 'raw', 'value' => isset($model->location->name) ? $model->location->name : ''), 'unit', 'tenure', 'floor_area', array('name' => '# of Bedrooms', 'value' => $model->bedrooms), array('name' => '# of bathrooms', 'value' => $model->bathrooms), array('name' => 'type_selling', 'value' => !empty($model->type_selling) ? $model->type_selling : ''), 'name', array('name' => 'nric', 'value' => !empty($model->nric) ? $model->nric : ''), 'email', 'phone', array('name' => 'Country', 'value' => ActiveRecord::getInfoRecord('AreaCode', $model->country_id, 'area_name')), array('name' => 'description', 'type' => 'html', 'value' => nl2br(strip_tags($model->description))), 'created_date:dateTime'); } $this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => $arrData));
<?php if ($model->rent_type == 'Tenant') { $furnishing_include = json_decode($model->furnishing_include, true); if (is_array($furnishing_include) && count($furnishing_include) > 0) { $arr = CHtml::listData(ProMasterFurnishingIncluded::model()->findAllByAttributes(array("id" => array_unique($furnishing_include))), 'name', 'name'); $furnishing_include = '- ' . implode('<br>- ', $arr); } else { $furnishing_include = ''; } $arrayData = array('type_enquiry', 'rent_type', array('name' => 'property_type_id', 'type' => 'html', 'value' => $PropertyTypeList), array('name' => 'location_list_id', 'type' => 'EngageDistrict'), 'price', 'bedrooms', 'floor_size', 'move_in_date', 'of_persons_staying', array('name' => 'remark', 'type' => 'raw', 'value' => !empty($model->remark) ? $model->remark : ''), 'name', 'email', 'occupation', 'phone', array('name' => 'Country', 'value' => ActiveRecord::getInfoRecord('AreaCode', $model->country_id, 'area_name')), array('name' => 'description', 'type' => 'html', 'value' => nl2br(strip_tags($model->description))), 'created_date:dateTime'); } else { $arrayData = array('type_enquiry', array('name' => 'Property Name or Address', 'value' => $model->address), 'rent_type', array('name' => 'property_type_id', 'type' => 'html', 'value' => $PropertyTypeList), array('name' => 'location_list_id', 'type' => 'EngageDistrict'), 'postal_code', 'floor_area', 'unit', 'tenure', array('name' => '# of Bedrooms', 'value' => $model->bedrooms), array('name' => '# of bathrooms', 'value' => $model->bathrooms), 'availability', 'furnished', array('name' => 'remark', 'type' => 'raw', 'value' => !empty($model->remark) ? $model->remark : ''), 'name', array('name' => 'nric', 'value' => !empty($model->nric) ? $model->nric : ''), 'email', 'phone', array('name' => 'Country', 'value' => ActiveRecord::getInfoRecord('AreaCode', $model->country_id, 'area_name')), array('name' => 'description', 'type' => 'html', 'value' => nl2br(strip_tags($model->description))), 'created_date:dateTime'); } $this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => $arrayData));
* --------------------------------------------- */ public static function sendMailEnquiryGlobalToAdmin($model) { $aBody = array('{NAME}' => $model->name, '{EMAIL}' => $model->email, '{PHONE}' => $model->phone, '{COUNTRY}' => ActiveRecord::getInfoRecord('AreaCode', $model->country_id, 'area_name'), '{REMARK}' => $model->remark, '{ENQUIRY}' => Yii::app()->controller->renderPartial('application.modules.admin.views.globalEnquiry._enquiry', array('model' => $model), true)); $aSubject = array('{NAME}' => $model->name, '{EMAIL}' => $model->email); CmsEmail::sendmail(EMAIL_ENQUIRY_GLOBAL, $aSubject, $aBody, Yii::app()->params['adminEmail']);
<?php $this->breadcrumbs = array('Company Listing Management' => array('index'), 'view '); ?> <div class="box-1 space-3"> <div class="title"><h3>View listing detail</h3></div> <div class="content space-5 tempt"> <?php $this->widget('zii.widgets.CDetailView', array('data' => $model, 'id' => 'table-company-detail', 'attributes' => array('property_address', 'display_title', 'display_address', array('name' => 'location_id', 'value' => ActiveRecord::getInfoRecord('ProLocation', $model->location_id, 'name')), array('name' => 'property_type', 'value' => ActiveRecord::getInfoRecord('ProPropertyType', $model->property_type, 'name')), array('name' => 'type', 'value' => $model->type == 1 ? 'Sale' : 'Rent'), 'asking_price', 'asking_psf', 'bed_rooms', 'bath_rooms', 'building_name', 'contact_name_no', array('name' => 'Listed By', 'value' => ActiveRecord::getInfoRecord('Users', $model->user_id, 'username')), array('name' => 'dnc_expiry_date', 'value' => date('d-M-Y', strtotime($model->dnc_expiry_date))), array('name' => 'Listed Date', 'value' => date('d-M-Y', strtotime($model->created_date))), array('name' => 'remarks', 'type' => 'html')))); ?> </div> </div>