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


PHP AdminListBuilder::buttonDisable方法代碼示例

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


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

示例1: pos

 public function pos($page = 1, $r = 20)
 {
     $aModule = I('module', '', 'text');
     $aTheme = I('theme', 'all', 'text');
     $aStatus = I('status', 1, 'intval');
     $_GET['status'] = $aStatus;
     if ($aModule == '') {
         $this->posModule();
         return;
     }
     $adminList = new AdminListBuilder();
     $map['path'] = array('like', ucfirst($aModule . '/%'));
     $map['status'] = $aStatus;
     if ($aTheme == 'all' || $aTheme == '') {
     } else {
         $map['theme'] = array('like', array("%,{$aTheme}", "%,{$aTheme},%", "{$aTheme},%"));
     }
     $advPosModel = D('AdvPos');
     $advModel = D('Adv');
     $advPoses = $advPosModel->where($map)->select();
     $themes = D('Common/Theme')->getThemeList();
     foreach ($advPoses as &$v) {
         switch ($v['type']) {
             case 1:
                 $v['type_html'] = '<span class="text-danger">單圖</span>';
                 break;
             case 2:
                 $v['type_html'] = '<span class="text-warning">多圖輪播</span>';
                 break;
             case 3:
                 $v['type_html'] = '<span class="text-success">文字鏈接</span>';
                 break;
             case 4:
                 $v['type_html'] = '<span class="text-error">代碼塊</span>';
                 break;
         }
         if ($v['theme'] != 'all') {
             $theme_names = explode(',', $v['theme']);
             foreach ($theme_names as $t) {
                 $temp_theme[] = $themes[$t]['title'];
             }
             $v['theme_html'] = implode('&nbsp;&nbsp;,&nbsp;&nbsp;', $temp_theme);
             //implode(',',array_map(array($this,'getValue'),$themes,$v['theme']));//   $themes[$v['theme']]['title'];
         } else {
             $v['theme_html'] = '全部主題';
         }
         $count = $advModel->where(array('pos_id' => $v['id'], 'status' => 1))->count();
         $v['do'] = '<a href="' . U('editPos?copy=' . $v['id']) . '"><i class="icon-copy"></i> 複製</a>&nbsp;&nbsp;&nbsp;&nbsp;' . '<a href="' . U('editPos?id=' . $v['id']) . '"><i class="icon-cog"></i> 設置</a>&nbsp;&nbsp;&nbsp;&nbsp;' . '<a href="' . U('adv?pos_id=' . $v['id']) . '" ><i class="icon-sitemap"></i> 管理廣告(' . $count . ')</a>&nbsp;&nbsp;&nbsp;&nbsp;' . '<a href="' . U('editAdv?pos_id=' . $v['id']) . '"><i class="icon-plus"></i> 添加廣告</a>&nbsp;&nbsp;&nbsp;&nbsp;' . '<a href="' . U($v['path']) . '#adv_' . $v['id'] . '" target="_blank"><i class="icon-share-alt"></i>到前台查看</a>&nbsp;&nbsp;';
     }
     unset($v);
     $adminList->title('廣告位管理');
     $adminList->buttonNew(U('editPos'), '添加廣告位');
     $adminList->buttonDelete(U('setPosStatus'));
     $adminList->buttonDisable(U('setPosStatus'));
     $adminList->buttonEnable(U('setPosStatus'));
     $adminList->keyId()->keyTitle()->keyHtml('do', '操作', '320px')->keyText('name', '廣告位英文名')->keyText('path', '路徑')->keyHtml('type_html', '廣告類型')->keyStatus()->keyText('width', '寬度')->keyText('height', '高度')->keyText('margin', '邊緣留白')->keyText('padding', '內部留白')->keyText('theme_html', '適用主題');
     $themes_array[] = array('id' => 'all', 'value' => '--全部主題--');
     foreach ($themes as $v) {
         $themes_array[] = array('id' => $v['name'], 'value' => $v['title']);
     }
     $status_array = array(array('id' => 1, 'value' => '正常'), array('id' => 0, 'value' => '禁用'), array('id' => -1, 'value' => '已刪除'));
     $adminList->select('所屬主題:', 'theme', 'select', '描述', '', '', $themes_array);
     $adminList->select('狀態:', 'status', 'select', '廣告位狀態', '', '', $status_array);
     $adminList->data($advPoses);
     $adminList->display();
 }
開發者ID:naliduo,項目名稱:Lightweight-social-platform,代碼行數:66,代碼來源:AdvController.class.php

示例2: goodsBuySuccess

 public function goodsBuySuccess($page = 1, $r = 20)
 {
     //讀取列表
     $map = array('status' => 1);
     $model = M('shop_buy');
     $list = $model->where($map)->page($page, $r)->select();
     $totalCount = $model->where($map)->count();
     foreach ($list as &$val) {
         $val['goods_name'] = $this->shopModel->where('id=' . $val['goods_id'])->getField('goods_name');
         $address = D('shop_address')->find($val['address_id']);
         $val['name'] = $address['name'];
         $val['address'] = $address['address'];
         $val['zipcode'] = $address['zipcode'];
         $val['phone'] = $address['phone'];
     }
     unset($val);
     //顯示頁麵
     $builder = new AdminListBuilder();
     $builder->title('完成的交易');
     $builder->meta_title = '完成的交易';
     $builder->buttonDisable(U('setGoodsBuyStatus'), '取消發貨')->keyId()->keyText('goods_name', '商品名稱')->keyUid()->keyText('name', '收貨人姓名')->keyText('address', '收貨地址')->keyText('zipcode', '郵編')->keyText('phone', '手機號碼')->keyCreateTime('createtime', '購買時間')->keyTime('gettime', '交易完成時間')->data($list)->pagination($totalCount, $r)->display();
 }
開發者ID:chenyongze,項目名稱:bighaha,代碼行數:22,代碼來源:ShopController.class.php


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