</ul> <div id="searchtab1" class="right" style="display: block; "> <?php $form = $this->beginWidget('CActiveForm', array('id' => 'buy', 'enableAjaxValidation' => false, 'action' => $this->buyurl, 'htmlOptions' => array('name' => 'thisProperty'))); ?> <input type="hidden" name="mode" value="Property"> <input type="hidden" name="minbuysearch" value="MinBuySearch"> <input type="hidden" name="Property[i_want_to]" value="Sell"> <input type="hidden" name="without_budget" value="1" checked="checked"> <input type="hidden" name="minisearch"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="210px" align="right"><label>Property type</label> <?php echo $form->dropDownList($properties, 'property_type_id', CHtml::listData(PropertyTypes::model()->findAll(), 'id', 'property_type'), array('class' => 'selectbox1', 'empty' => 'All', 'id' => 'buy_property')); ?> </select></td> <td width="200px" align="right"> <label>City </label><?php echo $form->dropdownList($modelCity, 'city', CHtml::listData(GeoCity::model()->with('state')->findAll(), 'id', 'city', 'state.state'), array('class' => 'selectbox1', 'id' => 'Property_city_id_buy', 'empty' => 'Select', 'OnChange' => 'javascript:changelocality(this.value);')); ?> </tr> <tr> <td width="210px" align="right"> <label>Budget</label> <select name="budget_min" class="selectbox2" id="buy_budget_min" valtype="budget_min" onchange="javascript:validateMin('buy_budget_min','buy_budget_max');"> <option value="">Min</option>
?> </li> </ul> <ul> <li> <span><?php echo $form->labelEx($requirementPropertyTypes, 'property_type_id'); ?> </span> <?php //echo $form->dropDownList($requirementPropertyTypes,'property_type_id',CHtml::listData(PropertyTypes::model()->findAll(),'id','property_type'),array('size'=>'5','multiple'=>'multiple','id'=>'property-types-multi')); ?> <div class="multi_checkbox avg"> <?php $property_type_id = isset($_POST['property_type_id']) ? $_POST['property_type_id'] : null; echo CHtml::checkBoxList('property_type_id', $property_type_id, CHtml::listData(PropertyTypes::model()->findAll(), 'id', 'property_type')); ?> </div> </li> <li class="error_message"><?php echo $form->error($requirementPropertyTypes, 'property_type_id'); ?> </li> </ul> </fieldset> <fieldset><legend>Location</legend> <?php // var_dump($_POST['city_id']); if (isset($_POST['city_id']) && !empty($_POST['city_id']) && $_POST['city_id'][0] != '') { $i = 0;
<label for="Property_i_want_to_0" style="display:inline">Buy</label> <input type="radio" name="Property[i_want_to]" value="Rent" id="rent" <?php echo $rentChecked; ?> > <label for="Property_i_want_to_0" style="display:inline">Rent In</label> <input type="radio" name="Property[i_want_to]" value="Lease" id="lease" <?php echo $leaseChecked; ?> > <label for="Property_i_want_to_0" style="display:inline">Lease</label> </td> </tr> <tr> <td><label>Property Type</label> <?php echo $form->dropDownList($modelProperty, 'property_type_id', CHtml::listData(PropertyTypes::model()->findAll(), 'id', 'property_type'), array('class' => 'select_box', 'empty' => 'All', 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('/front/property/searchcriteria'), 'update' => '#searchcriteria', 'data' => 'js:jQuery(this).serialize()'))); ?> </td> </tr> <tr> <td><label>Transaction Type</label> <?php echo $form->dropDownList($modelProperty, 'transaction_type_id', CHtml::listData(PropertyTransactionTypes::model()->findAll(), 'id', 'transaction_type'), array('class' => 'select_box', 'empty' => 'All')); ?> </td> </tr> <tr> <td>Keyword(s)<input type="text" name="keyword" class="txt-box1" value="<?php echo isset($_POST['keyword']) ? $_POST['keyword'] : ''; ?> " /></td> </tr>
alert("Select the City"); document.getElementById('GeoCity_city_property').focus(); return false; } } </script> <?php $modelProperty = new Property(); $modelCity = new GeoCity(); $modelState = new GeoState(); $modelProfile = new UserProfiles(); $modelRequirement = new Requirement(); $specializations = new Specializations(); $stateCache = new CDbCacheDependency('SELECT MAX(updated_time) FROM geo_state'); $stateList = CHtml::listData(GeoState::model()->cache(1000, $stateCache)->findAll(), 'id', 'state'); $propertyTypeList = CHtml::listData(PropertyTypes::model()->with('category')->findAll(), 'id', 'property_type', 'category.category'); $cityCache = new CDbCacheDependency('SELECT MAX(updated_time) FROM geo_city'); $cityList = CHtml::listData(GeoCity::model()->with('state')->cache(1000, $cityCache)->findAll(), 'id', 'city', 'state.state'); $specializationList = Specializations::model()->findAll(); if ($this->beginCache('topmenu', array('duration' => 0))) { ?> <div id="menu-part"> <div id="menu"> <ul> <li class="home-icon"><a href="<?php echo Yii::app()->homeUrl; ?> "> <img src="<?php echo Yii::app()->theme->baseUrl; ?>
/** * This method returns the property types for the given type id. * Returns model if successfully found. * Returns false if not found. * * @return model || false */ public static function getPropertyTypeById($typeId) { $propertyTypes = PropertyTypes::model()->findByPk($typeId); if ($propertyTypes) { return $propertyTypes->property_type; } else { return false; } }
/** * 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) { $model = PropertyTypes::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
<div class="row"> <?php echo $form->label($model, 'instant_home'); ?> <?php echo $form->textField($model, 'instant_home'); ?> </div> <div class="row"> <?php echo $form->label($model, 'property_type_id'); ?> <?php echo $form->dropDownList($model, 'property_type_id', CHtml::listData(PropertyTypes::model()->findAll(), 'id', 'property_type'), array('empty' => 'Select')); ?> </div> <div class="row"> <?php echo $form->label($model, 'transaction_type_id'); ?> <?php echo $form->textField($model, 'transaction_type_id'); ?> </div> <div class="row"> <?php echo $form->label($model, 'locality_id');
</li> <li id="agent" class="<?php echo $agent_class; ?> "> <h3>Property Details</h3> <div class="acc-section"> <table width="92%" border="0" cellpadding="0" cellspacing="0" align="center"> <tr> <td> <label>Properties handled</label> <br /> <div class="multi_checkbox med"> <?php $property_type_id = isset($_POST['property_type_id']) ? $_POST['property_type_id'] : null; echo CHtml::checkBoxList('property_type_id', $property_type_id, CHtml::listData(PropertyTypes::model()->findAll(), 'id', 'property_type'), array('multiple' => 'multiple', 'id' => 'property_types_multi')); ?> </div> </td> </tr> </table> </div> </li> <li id="specialist" class="<?php echo $specialist_class; ?> "> <h3>Specialist Details</h3> <div class="acc-section"> <table width="92%" border="0" cellpadding="0" cellspacing="0" align="center">
echo $form->radioButtonList($model, 'i_want_to', array('Sell' => 'Sell', 'Rent' => 'Rent Out', 'Lease' => 'Lease'), array('separator' => '', 'labelOptions' => array('style' => 'display:inline'))); ?> </li> <li class="error_message"><?php echo $form->error($model, 'i_want_to'); ?> </li> </ul> <ul> <li><span><?php echo $form->labelEx($model, 'property_type_id'); ?> </span> <?php echo $form->dropDownList($model, 'property_type_id', CHtml::listData(PropertyTypes::model()->findAll(), 'id', 'property_type', 'category.category'), array('empty' => 'Select', 'class' => 'slctbox', 'disabled' => 'true')); ?> </li> <li class="error_message"><?php echo $form->error($model, 'property_type_id'); ?> </li> </ul> </fieldset> <fieldset><legend>Property Address</legend> <div id="city_content"> <ul> <li><span><?php