$modelAds->attributes = $_GET['Apartment']; } ?> <h1 class="title highlight-left-right"> <span> <?php echo tc('My listings'); ?> </span> </h1> <div class="clear"></div><br /> <?php $user = HUser::getModel(); $typeId = isset($_GET['type']) ? (int) $_GET['type'] : 1; $rentorders = Apartment::model()->findAll('type=:typeId AND owner_id=:userId', [':typeId' => $typeId, ':userId' => $user->id]); $this->renderPartial('//modules/userads/views/index', array('model' => $modelAds->onlyAuthOwner()->notDeleted(), 'rentorders' => $rentorders)); } else { $this->pageTitle .= ' - ' . tc('My data'); $this->breadcrumbs = array(tc('Control panel') => Yii::app()->createUrl('/usercpanel'), tc('My data')); ?> <h1 class="title highlight-left-right"> <span> <?php echo tc('My data'); ?> </span> </h1> <div class="clear"></div><br /> <?php
<?php $this->pageTitle .= ' - ' . tc('My listings'); $this->breadcrumbs = array(tc('Control panel') => Yii::app()->createUrl('/usercpanel'), tc('My listings')); // Управление объявлениями $modelAds = new Apartment('search'); Yii::app()->user->setState('searchUrl', NULL); $modelAds->unsetAttributes(); // clear any default values if (isset($_GET['Apartment'])) { $modelAds->attributes = $_GET['Apartment']; } $this->renderPartial('//../modules/userads/views/index', array('model' => $modelAds->onlyAuthOwner()));