Пример #1
0
             }
         }
     }
 }
 public function actionCheckPropertyType()
 {
     $response = array();
     if ($_POST) {
         $property = ProPropertyType::findParentById($_POST['id']);
         if (isset($property)) {
             if ($property->id == SHOP_HOUSE || $property->id == LAND_SIZE || $property->id == BUILT_UP_SIZE || $property->id == RETAIL || $property->id == LANDED_HOUSE) {
                 $response['msg'] = 'ok';
             } else {
                 $response['msg'] = 'not_ok';
             }
         } else {
             $response['msg'] = 'ok';
         }
Пример #2
0
        return array('captcha' => array('class' => 'CCaptchaAction', 'backColor' => 0xffffff), 'page' => array('class' => 'CViewAction'));
    }
    /*
	 * @author Lam Huynh
	 */
    public function actionIndex()
    {
        if (empty($_GET)) {
            $this->redirect(Yii::app()->createAbsoluteUrl('site/home'));
        }
        // build breadscrumb
        $searchParams = array('index');
        $breadcrumbs = array();
        // property type (child)
        if (isset($_GET['property_type_code'])) {
            $typeIds = $_GET['property_type_code'];
            if ($typeIds && ($type = ProPropertyType::model()->findByPk(current($typeIds)))) {
                $searchParams['property_type_code[]'] = $type->id;
                $breadcrumbs[$type->name] = $searchParams;
            }
        }
        // district
        if (isset($_GET['location'])) {
            $locationIds = $_GET['location'];
            if ($locationIds && ($location = ProLocation::model()->findByPk(current($locationIds)))) {
                $searchParams['location[]'] = $location->id;
                $breadcrumbs[$location->name] = $searchParams;
            }
        }
        // buidling name
        if (isset($_GET['building']) && ($building = $_GET['building'])) {
            $searchParams['building'] = $building;
            $breadcrumbs[$building] = $searchParams;
        }
        // listing type: sale/rent
        if (isset($_GET['listing_for']) && ($listingFor = $_GET['listing_for'])) {
            $typeText = $listingFor == 'for_rent' ? "For Rent" : "For Sale";
            $searchParams['listing_for'] = $listingFor;
            $breadcrumbs[$typeText] = $searchParams;
        }
        $this->breadcrumbs = $breadcrumbs;
        Yii::app()->theme = 'onehome';
        Yii::app()->clientScript->coreScriptPosition = CClientScript::POS_BEGIN;
Пример #3
0
" value="<?php 
    echo $parent_id;
    ?>
" <?php 
    echo $ParentChecked;
    ?>
 />
                <label class="parent_lb" for="choose_<?php 
    echo $parent_id;
    ?>
"><?php 
    echo $parent_text;
    ?>
</label>
                <?php 
    $aListSub = ProPropertyType::getListOptionByParent($parent_id);
    ?>
                <?php 
    if (count($aListSub)) {
        ?>
                <ul id="choosetype<?php 
        echo $parent_id;
        ?>
" class="">
                    <?php 
        foreach ($aListSub as $subId => $subName) {
            ?>
                    <?php 
            $SubChecked = '';
            if (in_array($subId, $aChooseRadio)) {
                $SubChecked = 'checked="1"';
Пример #4
0
	</div>
    
	<div class="row">
		<?php 
echo $form->label($model, 'status', array('label' => Yii::t('translation', 'Status')));
?>
		<?php 
echo $form->dropDownList($model, 'status', CmsFormatter::$statusVar, array('empty' => 'Select'));
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'parent_id');
?>
		<?php 
echo ProPropertyType::getDropDownList('ProPropertyType[parent_id]', 'ProPropertyType_parent_id', $model->parent_id, true);
?>
	</div>

	<div class="row buttons" style="padding-left: 159px;">
		        <?php 
$this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'label' => Yii::t('translation', 'Search'), 'type' => 'null', 'size' => 'small'));
?>
	</div>

<?php 
$this->endWidget();
?>

</div><!-- search-form -->
Пример #5
0
<?php

$this->breadcrumbs = array('Bank  Evaluation Report' => array('index'), $model->property_name_or_address);
$menus = array(array('label' => 'Bank Evaluation Report', 'url' => array('index')), array('label' => 'Delete', 'url' => array('delete'), 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Are you sure you want to delete this item?')));
$this->menu = ControllerActionsName::createMenusRoles($menus, $actions);
$PropertyTypeList = ProPropertyType::FormatViewProperyType($model);
?>

<h1>View Bank Evaluation Report: <?php 
echo $model->property_name_or_address;
?>
</h1>

<?php 
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('property_name_or_address', 'postal_code', array('name' => 'unit_from', 'value' => $model->unit_from . " - {$model->unit_to}"), array('name' => 'location_id', 'value' => ProLocation::getNameWithDistrict($model->location_id)), array('name' => 'property_type_id', 'type' => 'html', 'value' => $PropertyTypeList), 'tenure', array('name' => 'furnished', 'value' => $model->furnished ? $model->furnished->name : ""), 'of_bedroom_from', 'of_bathrooms_from', 'type_selling', 'floor_area', array('name' => 'tenancy_expiry_date', 'type' => 'TenancyExpiryDate', 'value' => $model), 'monthly_rental_amount', array('name' => 'target_price', 'type' => 'NumberOnly'), 'remark', 'nric', 'fullname', 'contact_no', 'email', 'target_price:Price')));
Пример #6
0
	<div class="row">
		<?php 
echo $form->label($model, 'type_enquiry');
?>
        <?php 
echo $form->dropDownList($model, 'type_enquiry', ProGlobalEnquiry::$arrType, array('empty' => ''));
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'property_type_id');
?>
        <?php 
echo $form->dropDownList($model, 'property_type_id', ProPropertyType::getListDataPropertyType(), array('empty' => ''));
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'name');
?>
		<?php 
echo $form->textField($model, 'name', array('size' => 60, 'maxlength' => 100));
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'email');
Пример #7
0
<div class="c1">
    <?php 
include '_form_c1_address.php';
?>
    
    <div class="row">
        <?php 
echo Yii::t('translation', $form->labelEx($model, 'property_type_1'));
?>
        <?php 
echo ProPropertyType::getDropDownSelectGroup('Listing[property_type_1]', 'Listing_property_type_1', $model->property_type_1, 'All property types', 'w-250');
?>
        <?php 
echo $form->error($model, 'property_type_1');
?>
    </div>
    <div class="row">
        <?php 
echo Yii::t('translation', $form->labelEx($model, 'unit_from'));
?>
        <div class="group-1">
            <?php 
echo $form->textField($model, 'unit_from', array('class' => '  w-60', 'placeholder' => '', 'style' => ''));
?>
            -
             <?php 
echo $form->textField($model, 'unit_to', array('class' => '   w-60', 'placeholder' => '', 'style' => ''));
?>
            <!--<span style="color:gray;"><i>Unit number will not be showed in your details.</i> </span>-->
        </div>
        <div class="clear" style='clear: both;'></div>
Пример #8
0
	</div>
	<div class="row">
		<?php 
echo $form->label($model, 'location_id');
?>
		<?php 
echo $form->dropDownList($model, 'location_id', ProLocation::getListDataLocation(), array('empty' => 'Select District', 'class' => "select_bank"));
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'property_type_id');
?>
		<?php 
echo ProPropertyType::getDropDownSelectGroup('BankRequest[property_type_id]', 'BankRequest_property_type_id', $model->property_type_id, 'Select Property Type', 'select_bank');
?>
	</div>

	<div class="row buttons" style="padding-left: 211px;">
            <?php 
$this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'label' => Yii::t('translation', 'Search'), 'type' => 'null', 'size' => 'small'));
?>
	</div>

<?php 
$this->endWidget();
?>

</div><!-- search-form -->
<style>
<div class="display_none">
<?php 
$sr_parent = ProPropertyType::getListOptionParent(array('normal_select' => 1));
foreach ($sr_parent as $parent_id => $parent_name) {
    ?>
    <?php 
    echo ProPropertyType::getOptionSelectGroupByParent($parent_id, "ad_nb_replace_{$parent_id}", "ad_nb_replace_{$parent_id}", "", "Select", "ad_nb_replace_{$parent_id}");
    ?>
    <?php 
    // echo CHtml::dropDownList('maximum_bedroom', '', 1, array('empty' => 'Select', 'class'=>"sr_replace$parent_id"));
}
?>
    
<!-- for dropdown list parent property type need add more attributes to option tag -->    
<?php 
$arrModelParentPro = ProPropertyType::getListOptionParent(array('model_only' => 1));
foreach ($arrModelParentPro as $item) {
    ?>
<span class="group_show_parent_<?php 
    echo $item->id;
    ?>
"><?php 
    echo $item->group_show;
    ?>
</span>
<?php 
}
?>
<!-- for dropdown list parent property type need add more attributes to option tag -->    
    
</div>
Пример #10
0
 public function run()
 {
     $property_type = ProPropertyType::model()->findForSearch();
     $this->render("property_search", array('property_type' => $property_type));
 }
Пример #11
0
 /**  use for FE search and Member module
  * @Author: ANH DUNG Apr 07, 2014
  * @Todo: render ra select group cho property type
  * @Param: $name select
  * @Param: $id model user
  * @Param: $value value selected
  * @Param: $hasEmpty is string for empty value: ex: Select, All property types
  * @Return: string html select
  */
 public static function getOptionSelectGroupByParent($parent_id, $name, $id, $value = '', $hasEmpty = '', $classSelect = null)
 {
     $criteria = new CDbCriteria();
     $criteria->compare('t.status', STATUS_ACTIVE);
     //        $criteria->compare('t.parent_id', $parent_id);
     $criteria->order = 'parent_id ASC, name asc';
     $aPropertyType = ProPropertyType::model()->findAll($criteria);
     $strSelect = '<select  class="' . $classSelect . '" name=' . $name . ' id=' . $id . '>';
     $mPropertyType = new ProPropertyType();
     if (trim($hasEmpty) != '') {
         $strSelect .= "<option value=''>{$hasEmpty}</option>";
     }
     $mPropertyType->buildSelectGroup($parent_id, $aPropertyType, $value);
     $strSelect .= $mPropertyType->strOptionGroup;
     $strSelect .= '</select>';
     return $strSelect;
 }
Пример #12
0
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     try {
         $model = ProPropertyType::model()->findByPk($id);
         if ($model === null) {
             Yii::log("The requested page does not exist.");
             throw new CHttpException(404, 'The requested page does not exist.');
         }
         return $model;
     } catch (Exception $e) {
         Yii::log("Exception " . print_r($e, true), 'error');
         throw new CHttpException("Exception " . print_r($e, true));
     }
 }
Пример #13
0
		<?php 
echo $form->labelEx($model, 'price_sign');
?>
		<?php 
echo $form->dropDownList($model, 'price_sign', ProPropertyType::getListOptionPriceSign(), array());
?>
		<?php 
echo $form->error($model, 'price_sign');
?>
	</div>
	<div class="row">
		<?php 
echo $form->labelEx($model, 'price_sign_position');
?>
		<?php 
echo $form->dropDownList($model, 'price_sign_position', ProPropertyType::getListOptionPriceSignPosition(), array());
?>
		<?php 
echo $form->error($model, 'price_sign_position');
?>
	</div>


	<div class="row <?php 
echo $hide_type;
?>
">
		<?php 
echo $form->labelEx($model, 'type');
?>
		<?php 
Пример #14
0
 protected static function parsePropType($value)
 {
     $data = CHtml::listData(ProPropertyType::model()->findAll(), 'id', 'name');
     return array_search(strtolower($value), array_map('strtolower', $data));
 }
Пример #15
0
<!-- box -->
<div class="box-1 space-3 _box_sale_detail">
    <div class="title"><h3>TRANSACTED PROPERTY DETAILS</h3></div>
    <div class="form-type content"> 
        <div class=" clearfix">
            <div class="col-1">
                    <?php 
include "_box_property_detail_auto.php";
?>
                    <div class="in-row clearfix">
                        <?php 
echo $form->labelEx($mTransactions->mPropertyDetail, 'property_type_id', array('class' => 'lb'));
?>
                        <div class="group-4">
                            <?php 
echo ProPropertyType::getDropDownSelectGroup('ProTransactionsPropertyDetail[property_type_id]', 'ProTransactionsPropertyDetail_property_type_id', $mTransactions->mPropertyDetail->property_type_id, 'Select');
?>
                            <?php 
echo $form->error($mTransactions->mPropertyDetail, 'property_type_id');
?>
                        </div>                        
                    </div>
                    <div class="in-row clearfix">
                        <?php 
echo $form->labelEx($mTransactions->mPropertyDetail, 'house_blk_no', array('class' => 'lb'));
?>
                        <div class="group-4">
                            <?php 
echo $form->textField($mTransactions->mPropertyDetail, 'house_blk_no', array('class' => 'text ad_blk_no'));
?>
                            <?php 
Пример #16
0
 /**
  * PHAM DUY TOAN
  *
  * Email : ghostkissboy12@gmail.com
  * Check company list
  */
 public static function checkCompanyListingWithId($id, &$mListing)
 {
     $criteria = new CDbCriteria();
     $criteria->compare('t.id', $id);
     $criteria->compare('t.listing_type_transaction', ProTransactionsPropertyDetail::VAR_COMPANY);
     $model = Listing::model()->find($criteria);
     if (is_null($model)) {
         Yii::app()->request->redirect(Yii::app()->createAbsoluteUrl('/member/site/dashboard'));
     }
     $mListing->listing_type = $model->listing_type;
     $mListing->property_name_or_address = $model->property_name_or_address;
     $mListing->postal_code = $model->postal_code;
     $mListing->postal_code_tmp = $model->postal_code_tmp;
     $mListing->postal_code_xy = $model->postal_code_xy;
     $mListing->property_type_1 = $model->property_type_1;
     $mParentPropertyType = ProPropertyType::findParentById($model->property_type_1);
     if ($mParentPropertyType) {
         $mListing->property_type_2 = $mParentPropertyType->id;
     }
     $mListing->price = $model->price;
     $mListing->unit_from = $model->unit_from;
     $mListing->unit_to = $model->unit_to;
     $mListing->floor_area = $model->floor_area;
     $mListing->company_listing_user_created = $model->user_id;
     $mListing->display_title = $model->display_title;
     $mListing->display_address = $model->display_address;
 }
                            <?php 
echo $form->label($model, 'submitted_date', array('class' => 'lb'));
?>
                            <?php 
$this->widget('zii.widgets.jui.CJuiDatePicker', array('model' => $model, 'attribute' => 'submitted_date', 'options' => array('showAnim' => 'fold', 'dateFormat' => ActiveRecord::getDateFormatSearch(), 'changeMonth' => true, 'changeYear' => true, 'showOn' => 'button', 'buttonImage' => Yii::app()->theme->baseUrl . '/img/calendar-ico.png', 'buttonImageOnly' => true), 'htmlOptions' => array('class' => 'text w-7', 'style' => 'float:left')));
?>
 
                            
                        </div>
                        <div class="in-row clearfix">
                            <?php 
echo $form->label($model, 'property_type_id', array('class' => 'lb'));
?>
                            <div class="group-5">
                                <?php 
echo ProPropertyType::getDropDownSelectGroup('ProTransactionsSaveCommission[property_type_id]', 'ProTransactionsSaveCommission', '', 'Select');
?>
                            </div>
                        </div>
                    </div>
                    <div class="col-2">
                        <div class="in-row clearfix">
                            <?php 
echo $form->labelEx($model, 'transactions_no', array('class' => 'lb'));
?>
                            <div class="group-5">
                                <?php 
echo $form->textField($model, 'transactions_no', array('class' => 'text'));
?>
                            </div>
                        </div>
Пример #18
0
?>
        <div class="group-1">
            <?php 
// echo ProPropertyType::getDropDownSelectGroup('Listing[property_type_1]', 'Listing_property_type_1', $model->property_type_1,  'Select');
?>
            <div class="w-170 f-left">
                <?php 
// thực tế đang lưu cái property_type_1 để search và phục vụ cho transaction
echo $form->dropDownlist($model, 'property_type_2', ProPropertyType::getListOptionParent(), array('class' => 'text ad_nb_property_first', 'empty' => 'Select'));
?>
            </div>
            <div class="w-220 f-left l_padding_20">
                <?php 
$arrType1 = array();
if ($model->property_type_2) {
    echo ProPropertyType::getOptionSelectGroupByParent($model->property_type_2, "Listing[property_type_1]", "ad_nb_replace_{$model->property_type_1}", $model->property_type_1, "Select", "ad_nb_property_second ad_nb_replace_{$model->property_type_1}");
} else {
    echo $form->dropDownlist($model, 'property_type_1', $arrType1, array('class' => 'text ad_nb_property_second', 'empty' => 'Select'));
}
?>
            </div>

            <div class="clear" style='clear: both;'></div>
            <?php 
echo $form->error($model, 'property_type_1');
?>
        </div>
    </div>   

    <div class="unit_from in-row clearfix ad_nb_show_all <?php 
echo implode(' ', ProPropertyType::$A_FIELD_MAP['unit_from']);
Пример #19
0
<h2>Add Property</h2>

<div class="form">

<?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'pro-defect-form', 'enableAjaxValidation' => false, 'htmlOptions' => array('enctype' => 'multipart/form-data')));
?>
    <div class="row">
        <?php 
echo Yii::t('translation', $form->labelEx($model, 'property_type_id'));
?>
        <?php 
echo ProPropertyType::getDropDownSelectGroup('FiInvoiceDetail[property_type_id]', 'FiInvoiceDetail_property_type_id', $model->property_type_id, 'All property types', 'w-250');
?>
        <?php 
echo $form->error($model, 'property_type_id');
?>
    </div>
    <div class="row">
        <?php 
echo Yii::t('translation', $form->labelEx($model, 'unit_from'));
?>
        <div class="group-1">
            <?php 
echo $form->textField($model, 'unit_from', array('class' => ' number_only w-60', 'placeholder' => '', 'style' => ''));
?>
            -
             <?php 
echo $form->textField($model, 'unit_to', array('class' => ' number_only  w-60', 'placeholder' => '', 'style' => ''));
?>
            <!--<span style="color:gray;"><i>Unit number will not be showed in your details.</i> </span>-->