当前位置: 首页>>代码示例>>PHP>>正文


PHP Listing::getCurrentStep方法代码示例

本文整理汇总了PHP中Listing::getCurrentStep方法的典型用法代码示例。如果您正苦于以下问题:PHP Listing::getCurrentStep方法的具体用法?PHP Listing::getCurrentStep怎么用?PHP Listing::getCurrentStep使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Listing的用法示例。


在下文中一共展示了Listing::getCurrentStep方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: actionConfrimations

 /**
  * 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)));
 }
开发者ID:jasonhai,项目名称:onehome,代码行数:60,代码来源:ListingController.php

示例2: actionConfrimations

 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));
 }
开发者ID:jasonhai,项目名称:onehome,代码行数:52,代码来源:ListingController.php


注:本文中的Listing::getCurrentStep方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。