當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Model_Ad::getList方法代碼示例

本文整理匯總了PHP中Model_Ad::getList方法的典型用法代碼示例。如果您正苦於以下問題:PHP Model_Ad::getList方法的具體用法?PHP Model_Ad::getList怎麽用?PHP Model_Ad::getList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Model_Ad的用法示例。


在下文中一共展示了Model_Ad::getList方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: istatusAction

 /**
  * 審核失敗
  */
 public function istatusAction()
 {
     $iAdID = $this->getParam('id');
     $iPage = max(1, intval($this->getParam('page')));
     $aData = Model_Ad::getList(array('iAdID' => $iAdID), $iPage);
     $this->assign('aData', $aData);
     $this->assign('iAdID', $iAdID);
     $this->setMeta('mcenter_page', array('sTitle' => '審核失敗'));
 }
開發者ID:pancke,項目名稱:yyaf,代碼行數:12,代碼來源:Acenter.php

示例2: listAction

 /**
  * 廣告列表
  */
 public function listAction()
 {
     $iPage = intval($this->getParam('page'));
     $uWhere = array();
     $aParam = $this->getParams();
     $userid = '';
     if (!empty($aParam['sUserRealName'])) {
         $uWhere['sRealName LIKE'] = '%' . $aParam['sUserRealName'] . '%';
         $data_user = Model_User::getAll(array('where' => $uWhere));
         $useridArr = array();
         foreach ($data_user as $val) {
             if ($val['iUserID'] != '') {
                 $useridArr[] = $val['iUserID'];
             }
         }
         if (count($useridArr) > 0) {
             $userid = implode(',', array_unique($useridArr));
         }
     }
     $aWhere = array();
     if (!empty($aParam['iUserID'])) {
         $aWhere['iUserID'] = $aParam['iUserID'];
     }
     if ($userid != '') {
         $aWhere['iUserID IN'] = $userid;
     }
     if (!empty($aParam['sAdName']) && $aParam['sAdName'] != '') {
         $aWhere['sAdName LIKE'] = '%' . $aParam['sAdName'] . '%';
     }
     if (!empty($aParam['iMediaType']) && $aParam['iMediaType'] != '') {
         $aWhere['iMediaType'] = $aParam['iMediaType'];
     }
     if (!empty($aParam['iAdType']) && $aParam['iAdType'] != '') {
         $aWhere['iAdType'] = $aParam['iAdType'];
     }
     if (!empty($aParam['iPayStatus']) && $aParam['iPayStatus'] != '') {
         $aWhere['iPayStatus'] = $aParam['iPayStatus'];
     }
     if (!empty($aParam['iStatus']) && $aParam['iStatus'] != '') {
         $aWhere['iStatus'] = $aParam['iStatus'];
     } else {
         $aWhere['iStatus IN'] = '1,2,3,4,5';
     }
     $aList = Model_Ad::getList($aWhere, $iPage, 'iStatus asc,iCreateTime desc,iPayStatus asc');
     $useridArr = array();
     foreach ($aList['aList'] as $val) {
         if ($val['iUserID'] != '') {
             $useridArr[] = $val['iUserID'];
         }
     }
     if (count($useridArr) > 0) {
         $whereU = array();
         $whereU['iUserID IN'] = implode(',', array_unique($useridArr));
         $userData = Model_User::getAll(array('where' => $whereU));
         if (count($userData) > 0) {
             $data = array();
             foreach ($userData as $val) {
                 $row = array();
                 $row['iUserID'] = $val['iUserID'];
                 $row['sRealName'] = $val['sRealName'];
                 $data[$val['iUserID']] = $row;
             }
             $this->assign('aData', $data);
         }
     }
     foreach ($aList['aList'] as $key => $val) {
         //媒體類型
         $aList['aList'][$key]['iMoney'] = Model_AdMedia::getDetail($val['iAdID'])['iMoney'];
         if ($val['iMediaType'] == '1') {
             $aList['aList'][$key]['iMediaType'] = '公眾號';
         } elseif ($val['iMediaType'] == '2') {
             $aList['aList'][$key]['iMediaType'] = '朋友圈';
         } elseif ($val['iMediaType'] == '3') {
             $aList['aList'][$key]['iMediaType'] = '新浪微博';
         } elseif ($val['iMediaType'] == '4') {
             $aList['aList'][$key]['iMediaType'] = '新聞論壇';
         }
         //廣告類型
         if ($val['iAdType'] == '1') {
             $aList['aList'][$key]['iAdType'] = '硬廣';
         } elseif ($val['iAdType'] == '2') {
             $aList['aList'][$key]['iAdType'] = '軟廣';
         } elseif ($val['iAdType'] == '3') {
             $aList['aList'][$key]['iAdType'] = '全部';
         }
         //支付狀態
         if ($val['iPayStatus'] == '0') {
             $aList['aList'][$key]['iPayStatus'] = '未付款';
         } elseif ($val['iPayStatus'] == '1') {
             $aList['aList'][$key]['iPayStatus'] = '已付款';
         }
         //狀態
         if ($val['iStatus'] == '1') {
             $aList['aList'][$key]['iStatus'] = '待審核';
         } elseif ($val['iStatus'] == '2') {
             $aList['aList'][$key]['iStatus'] = '審核通過';
         } elseif ($val['iStatus'] == '3') {
//.........這裏部分代碼省略.........
開發者ID:pancke,項目名稱:yyaf,代碼行數:101,代碼來源:Adsh.php


注:本文中的Model_Ad::getList方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。