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


PHP Listing::getDefaultImgListing方法代码示例

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


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

示例1: array

$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' : '';
        ?>
 />
开发者ID:jasonhai,项目名称:onehome,代码行数:31,代码来源:index_1.php

示例2: 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

示例3: CmsFormatter

<?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 
开发者ID:jasonhai,项目名称:onehome,代码行数:31,代码来源:address_item.php

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