Exemplo n.º 1
0
$widget = $this->widget('zii.widgets.CListView', array('dataProvider' => $arrOrther['photo'], 'emptyText' => '<div style="margin-left:15px;">No results found.<div>', 'id' => 'manager_photo', 'itemView' => 'step/_photo_item', 'template' => '{items} {pager}', 'ajaxUpdate' => true, 'ajaxUrl' => Yii::app()->request->getUrl(), 'enablePagination' => true));
?>
   
    
    
    
    
    
    <?php 
if ($model) {
    foreach ($model as $listing) {
        ?>
        <div class="item-releated">
            <div class="img">
             <?php 
        $imgDefautl = Listing::getDefaultImgListing($listing->id, 'image');
        echo CHtml::image(Yii::app()->createAbsoluteUrl('upload/listing/' . $listing->id . "/120x96/{$imgDefautl}"));
        ?>
              
            </div>
           <div class="clear"></div>
           <input type="checkbox" name="releated[<?php 
        echo $listing->id;
        ?>
]" value="<?php 
        echo $listing->id;
        ?>
" <?php 
        echo isset($dataJson[$listing->id]) ? 'checked' : '';
        ?>
 />
Exemplo n.º 2
0
 /**
  * step 4
  */
 public function actionConfrimations($id)
 {
     $this->pageTitle = 'Create New Listing' . ' - ' . Yii::app()->params['title'];
     $model = $this->loadModel($id);
     if (empty($model)) {
         $this->redirect(Yii::app()->createAbsoluteUrl('member/dashboard'));
     }
     $model->scenario = 'listing_step4';
     if (isset($_POST['Listing'])) {
         $model->attributes = $_POST['Listing'];
         if ($model->validate()) {
             $model->activate_listing_options = json_encode($model->activate_listing_options);
             $model->remark = strip_tags($model->remark);
             if ($model->current_step_next == 3) {
                 $model->current_step_next = 4;
             } else {
                 if ($model->current_step_next == 4) {
                     $model->current_step_next = 4;
                 }
             }
             if (isset($_POST['next'])) {
                 // ANH DUNG CLOSE JUN 14, 2014
                 //                    $model->status_listing = ($model->status_listing == STATUS_LISTING_DRAFT) ? STATUS_LISTING_PENDING : $model->status_listing;
                 //                    $model->status_approve = ($model->status_approve == STATUS_PEDING_APPROVE) ? STATUS_PEDING_APPROVE : $model->status_approve;
                 Listing::SetActiveListing($model);
             }
             if (isset($_POST['save_exit'])) {
                 $model->status_listing = $model->status_listing == STATUS_LISTING_DRAFT ? STATUS_LISTING_DRAFT : $model->status_listing;
             }
             if ($model->save()) {
                 // ANH DUNG Oct 23, 2014
                 // to do with company listing, we need update company_listing_status to STATUS_COMPANY_CLOSED
                 // khong lam cho nay nua xem o => Listing::SetStatusCloseForCompanyListing($pk);
                 // ANH DUNG Oct 23, 2014
                 //back
                 if (isset($_POST['back'])) {
                     $this->redirect(Yii::app()->createAbsoluteUrl('member/listing/managephotos', array('id' => $model->id)));
                 }
                 //save & exit
                 if (isset($_POST['save_exit'])) {
                     $this->redirect(Yii::app()->createAbsoluteUrl('member/listing', array('status' => $model->status_listing)));
                 }
                 //next
                 if (isset($_POST['next'])) {
                     $this->redirect(Yii::app()->createAbsoluteUrl('member/listing', array('status' => $model->status_listing)));
                 }
             }
         }
     } else {
         if (!empty($model->activate_listing_options)) {
             $model->activate_listing_options = json_decode($model->activate_listing_options);
         }
     }
     Listing::getCurrentStep($model, 'member', 4);
     $imageDefault = Listing::getDefaultImgListing($model->id, 'image');
     $this->render('create', array('model' => $model, 'view' => 'confrimations', 'arrOrther' => array('imageDefault' => $imageDefault)));
 }
Exemplo n.º 3
0
<?php

if ($index % 2 == 0) {
    ?>
<div class="grid">
<?php 
}
?>
    <?php 
$cmsFormater = new CmsFormatter();
$mDefaultPhoto = Listing::getDefaultImgListing($data->id);
$linkImage = ImageProcessing::bindImageByModel($mDefaultPhoto, '120', '96');
?>
    <div class="item">
        <div class="image">
            <div class="img-box"><img src="<?php 
echo $linkImage;
?>
" alt="image" /></div>
            <p><a href="#" class="ico-check">Select to Enquire</a></p>
            <p><a href="javascript:void(0);" data-listing-id="<?php 
echo $data->id;
?>
" class="ico-star shortlist">Shortlist</a></p>
        </div>
        <div class="description">
            <h3><a href="<?php 
echo Yii::app()->createAbsoluteUrl('site/listingdetail', array('slug' => $data->slug));
?>
">
                    <?php 
Exemplo n.º 4
0
 public function actionConfrimations($id)
 {
     $model = $this->loadModel($id);
     if (empty($model)) {
         $this->redirect(Yii::app()->createAbsoluteUrl('admin/listing/index'));
     }
     $model->scenario = 'listing_step4';
     if (isset($_POST['Listing'])) {
         $model->attributes = $_POST['Listing'];
         if ($model->validate()) {
             $model->activate_listing_options = json_encode($model->activate_listing_options);
             $model->remark = strip_tags($model->remark);
             if ($model->current_step_next == 3) {
                 $model->current_step_next = 4;
             } else {
                 if ($model->current_step_next == 4) {
                     $model->current_step_next = 4;
                 }
             }
             if (isset($_POST['next'])) {
                 // ANH DUNG CLOSE JUN 14, 2014
                 //                    $model->status_listing = ($model->status_listing == STATUS_LISTING_DRAFT) ? STATUS_LISTING_PENDING : $model->status_listing;
                 //                    $model->status_approve = ($model->status_approve == STATUS_PEDING_APPROVE) ? STATUS_PEDING_APPROVE : $model->status_approve;
                 Listing::SetActiveListing($model);
             }
             if (isset($_POST['save_exit'])) {
                 $model->status_listing = $model->status_listing == STATUS_LISTING_DRAFT ? STATUS_LISTING_DRAFT : $model->status_listing;
             }
             if ($model->save()) {
                 //back
                 if (isset($_POST['back'])) {
                     $this->redirect(Yii::app()->createAbsoluteUrl('admin/listing/managephotos', array('id' => $model->id)));
                 }
                 //save & exit
                 if (isset($_POST['save_exit'])) {
                     $this->redirect(Yii::app()->createAbsoluteUrl('admin/listing', array('status' => $model->status_listing)));
                 }
                 //next
                 if (isset($_POST['next'])) {
                     $this->redirect(Yii::app()->createAbsoluteUrl('admin/listing', array('status' => $model->status_listing)));
                 }
             }
         }
     } else {
         if (!empty($model->activate_listing_options)) {
             $model->activate_listing_options = json_decode($model->activate_listing_options);
         }
     }
     Listing::getCurrentStep($model, 'admin', 4);
     $imageDefault = Listing::getDefaultImgListing($model->id, 'image');
     $this->render('create', array('model' => $model, 'view' => 'confrimations', 'arrOrther' => array('imageDefault' => $imageDefault), 'actions' => $this->listActionsCanAccess));
 }