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


PHP AdminListBuilder::setStatusUrl方法代碼示例

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


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

示例1: lists

 public function lists($page = 1, $r = 20)
 {
     $map['status'] = array('egt', 0);
     $list = M('Report')->where($map)->page($page, $r)->select();
     //   $simplify_list = array_column($list, 'id');
     $reportCount = M('Report')->where($map)->count();
     int_to_string($list);
     $builder = new AdminListBuilder();
     $builder->title("舉報處理列表");
     $builder->setStatusUrl(U('setStatus'))->buttonModalPopup(U('handleEject'), '', "處理", $attr = array())->buttonDisable('', '忽略處理')->buttonDelete(U('deleteReport'), '刪除舉報')->keyId()->keyLink('url', "舉報鏈接", '{$url}')->keyUid('uid', "舉報用戶的ID")->keyText('reason', "舉報原因")->keyText('content', "舉報原因")->keyText('type', "舉報類型")->keyCreateTime('create_time', "創建時間")->keyUpdateTime('update_time', "更新時間")->keyUpdateTime('handle_time', "處理時間")->keyDoActionModalPopup('handleEject?id=###', '處理', '操作', array('data-title' => '遷移用戶到其他身份'))->keyDoActionEdit(' ', '忽略處理')->key('status', '狀態', 'status', array('0' => '忽略處理', '1' => '已處理', '2' => '正在處理'));
     $builder->data($list);
     $builder->pagination($reportCount, $r);
     $builder->display();
 }
開發者ID:ccccy,項目名稱:wuanlife,代碼行數:14,代碼來源:ReportController.class.php

示例2: lists

 public function lists($page = 1, $r = 20)
 {
     $map['status'] = array('egt', 0);
     $list = M('Report')->where($map)->page($page, $r)->select();
     //   $simplify_list = array_column($list, 'id');
     $reportCount = M('Report')->where($map)->count();
     int_to_string($list);
     $builder = new AdminListBuilder();
     $builder->title(L('_REPORT_PROCESSING_LIST_'));
     $builder->setStatusUrl(U('setStatus'))->buttonModalPopup(U('handleEject'), '', L('_PROCESS_'), $attr = array())->buttonDisable('', L('_IGNORE_'))->buttonDelete(U('deleteReport'), L('_DELETE_REPORT_'))->keyId()->keyLink('url', L('_REPORT_LINK_'), '{$url}')->keyUid('uid', L('_REPORT_USERS_ID_'))->keyText('reason', L('_REPORT_REASONS_'))->keyText('content', L('_REPORT_REASONS_'))->keyText('type', L('_REPORT_TYPE_'))->keyCreateTime('create_time', L('_CREATE_TIME_'))->keyUpdateTime('update_time', L('_UPDATE_TIME_'))->keyUpdateTime('handle_time', L('_PROCESSING_TIME_'))->keyDoActionModalPopup('handleEject?id=###', L('_PROCESS_'), L('_OPERATION_'), array('data-title' => L('_MIGRATING_USER_TO_ANOTHER_IDENTITY_')))->keyDoActionEdit(' ', L('_IGNORE_'))->key('status', L('_STATUS_'), 'status', array('0' => L('_IGNORE_'), '1' => L('_HAS_BEEN_DEALT_WITH_'), '2' => L('_BEING_PROCESSED_')));
     $builder->data($list);
     $builder->pagination($reportCount, $r);
     $builder->display();
 }
開發者ID:nanhuacrab,項目名稱:jhysns,代碼行數:14,代碼來源:ReportController.class.php

示例3: order

 public function order($r = 15)
 {
     $orderModel = M('Store/Order');
     $shopModel = M('Store/StoreShop');
     $orders = $orderModel->order('create_time desc')->findPage($r);
     $total_count = $orderModel->count();
     $listBuilder = new AdminListBuilder();
     foreach ($orders['data'] as &$s) {
         $s['shop_name'] = '<a href="' . U('Store/shop/detail', array('id' => $s['id'])) . '" target="_blank">' . $s['title'] . '</a>';
         $s['seller_'];
         $shop = $shopModel->where(array('uid' => $s['s_uid']))->find();
         $s['shop_name'] = $this->getShopLink($shop);
         $s['amount'] = number_format($s['total_cny'] + $s['adj_cny'], 2);
         $s['condition'] = $orderModel->getConditionHtml($s['condition']);
     }
     unset($s);
     $listBuilder->setStatusUrl(U('store/setsshopstatus'));
     $listBuilder->title('訂單管理')->keyId()->keyUid()->keyText('r_name', '收貨人名')->keyText('amount', '訂單總價')->keyText('shop_name', '店鋪')->keyText('condition', '訂單狀態')->keyText('total_count', '商品數量')->keyCreateTime()->keyUpdateTime()->data($orders['data'])->pagination($total_count, $r);
     $listBuilder->display();
 }
開發者ID:terrydeng,項目名稱:beimeibang1205,代碼行數:20,代碼來源:StoreController.class.php

示例4: userList

 public function userList($page = 1, $r = 20)
 {
     $aRoleId = I('role_id', 0, 'intval');
     $aUserStatus = I('user_status', 0, 'intval');
     $aSingleRole = I('single_role', 0, 'intval');
     $role_list = $this->roleModel->field('id,title as value')->order('sort asc')->select();
     $role_id_list = array_column($role_list, 'id');
     if ($aRoleId && in_array($aRoleId, $role_id_list)) {
         //篩選身份
         $map_user_list['role_id'] = $aRoleId;
     } else {
         $map_user_list['role_id'] = $role_list[0]['id'];
     }
     if ($aUserStatus) {
         //篩選狀態
         $map_user_list['status'] = $aUserStatus == 3 ? 0 : $aUserStatus;
     }
     $user_ids = D('Member')->where(array('status' => -1))->field('uid')->select();
     $user_ids = array_column($user_ids, 'uid');
     if ($aSingleRole) {
         //單身份篩選
         $uids = $this->userRoleModel->group('uid')->field('uid')->having('count(uid)=1')->select();
         $uids = array_column($uids, 'uid');
         //單身份用戶id列表
         if ($aSingleRole == 1) {
             if (count($user_ids)) {
                 $map_user_list['uid'] = array('in', array_diff($uids, $user_ids));
             } else {
                 $map_user_list['uid'] = array('in', $uids);
             }
         } else {
             if (count($uids) && count($user_ids)) {
                 $map_user_list['uid'] = array('not in', array_merge($user_ids, $uids));
             } else {
                 if (count($uids)) {
                     $map_user_list['uid'] = array('not in', $uids);
                 } else {
                     if (count($user_ids)) {
                         $map_user_list['uid'] = array('not in', $user_ids);
                     }
                 }
             }
         }
     } else {
         if (count($user_ids)) {
             $map_user_list['uid'] = array('not in', $user_ids);
         }
     }
     $user_list = $this->userRoleModel->where($map_user_list)->page($page, $r)->order('id desc')->select();
     $totalCount = $this->userRoleModel->where($map_user_list)->count();
     foreach ($user_list as &$val) {
         $user = query_user(array('nickname', 'avatar64'), $val['uid']);
         $val['nickname'] = $user['nickname'];
         $val['avatar'] = $user['avatar64'];
     }
     unset($user, $val);
     $statusOptions = array(0 => array('id' => 0, 'value' => L('_ALL_')), 1 => array('id' => 1, 'value' => L('_ENABLE_')), 2 => array('id' => 2, 'value' => L('_NOT_AUDITED_')), 3 => array('id' => 3, 'value' => L('_DISABLE_')));
     $singleRoleOptions = array(0 => array('id' => 0, 'value' => L('_ALL_')), 1 => array('id' => 1, 'value' => L('_SINGLE_USER_')), 2 => array('id' => 2, 'value' => L('_NON_SINGLE_USER_')));
     $builder = new AdminListBuilder();
     $builder->title(L('_IDENTITY_USER_LIST_'))->setSelectPostUrl(U('Role/userList'));
     if ($map_user_list['status'] == 2) {
         $builder->setStatusUrl(U('Role/setUserAudit', array('role_id' => $map_user_list['role_id'])))->buttonEnable('', L('_AUDIT_THROUGH_'))->buttonDelete('', L('_AUDIT_FAILURE_'));
     } else {
         $builder->setStatusUrl(U('Role/setUserStatus', array('role_id' => $map_user_list['role_id'])))->buttonEnable()->buttonDisable();
     }
     $builder->buttonModalPopup(U('Role/changeRole', array('role_id' => $map_user_list['role_id'])), array(), L('_MIGRATING_USER_'), array('data-title' => L('_MIGRATING_USER_TO_ANOTHER_IDENTITY_'), 'target-form' => 'ids'))->button(L('_INITIALIZE_THE_USER_'), array('href' => U('Role/initUnhaveUser')))->select(L('_IDENTITY:_'), 'role_id', 'select', '', '', '', $role_list)->select(L('_STATUS:_'), 'user_status', 'select', '', '', '', $statusOptions)->select('', 'single_role', 'select', '', '', '', $singleRoleOptions)->keyId()->keyImage('avatar', L('_AVATAR_'))->keyLink('nickname', L('_NICKNAME_'), 'ucenter/index/information?uid={$uid}')->keyStatus()->pagination($totalCount, $r)->data($user_list)->display();
 }
開發者ID:naliduo,項目名稱:Lightweight-social-platform,代碼行數:67,代碼來源:RoleController.class.php

示例5: userList

 public function userList($page = 1, $r = 20)
 {
     $aRoleId = I('role_id', 0, 'intval');
     $aUserStatus = I('user_status', 0, 'intval');
     $aSingleRole = I('single_role', 0, 'intval');
     $role_list = $this->roleModel->field('id,title as value')->order('sort asc')->select();
     $role_id_list = array_column($role_list, 'id');
     if ($aRoleId && in_array($aRoleId, $role_id_list)) {
         //篩選角色
         $map_user_list['role_id'] = $aRoleId;
     } else {
         $map_user_list['role_id'] = $role_list[0]['id'];
     }
     if ($aUserStatus) {
         //篩選狀態
         $map_user_list['status'] = $aUserStatus == 3 ? 0 : $aUserStatus;
     }
     $user_ids = D('Member')->where(array('status' => -1))->field('uid')->select();
     $user_ids = array_column($user_ids, 'uid');
     if ($aSingleRole) {
         //單角色篩選
         $uids = $this->userRoleModel->group('uid')->field('uid')->having('count(uid)=1')->select();
         $uids = array_column($uids, 'uid');
         //單角色用戶id列表
         if ($aSingleRole == 1) {
             if (count($user_ids)) {
                 $map_user_list['uid'] = array('in', array_diff($uids, $user_ids));
             } else {
                 $map_user_list['uid'] = array('in', $uids);
             }
         } else {
             if (count($uids) && count($user_ids)) {
                 $map_user_list['uid'] = array('not in', array_merge($user_ids, $uids));
             } else {
                 if (count($uids)) {
                     $map_user_list['uid'] = array('not in', $uids);
                 } else {
                     if (count($user_ids)) {
                         $map_user_list['uid'] = array('not in', $user_ids);
                     }
                 }
             }
         }
     } else {
         if (count($user_ids)) {
             $map_user_list['uid'] = array('not in', $user_ids);
         }
     }
     $user_list = $this->userRoleModel->where($map_user_list)->page($page, $r)->order('id desc')->select();
     $totalCount = $this->userRoleModel->where($map_user_list)->count();
     foreach ($user_list as &$val) {
         $user = query_user(array('nickname', 'avatar64'), $val['uid']);
         $val['nickname'] = $user['nickname'];
         $val['avatar'] = $user['avatar64'];
     }
     unset($user, $val);
     $statusOptions = array(0 => array('id' => 0, 'value' => '全部'), 1 => array('id' => 1, 'value' => '啟用'), 2 => array('id' => 2, 'value' => '未審核'), 3 => array('id' => 3, 'value' => '禁用'));
     $singleRoleOptions = array(0 => array('id' => 0, 'value' => '全部'), 1 => array('id' => 1, 'value' => '單角色用戶'), 2 => array('id' => 2, 'value' => '非單角色用戶'));
     $builder = new AdminListBuilder();
     $builder->title('角色用戶列表')->setSelectPostUrl(U('Role/userList'));
     if ($map_user_list['status'] == 2) {
         $builder->setStatusUrl(U('Role/setUserAudit', array('role_id' => $map_user_list['role_id'])))->buttonEnable('', '審核通過')->buttonDelete('', '審核失敗');
     } else {
         $builder->setStatusUrl(U('Role/setUserStatus', array('role_id' => $map_user_list['role_id'])))->buttonEnable()->buttonDisable();
     }
     $builder->buttonModalPopup(U('Role/changeRole', array('role_id' => $map_user_list['role_id'])), array(), '遷移用戶', array('data-title' => '遷移用戶到其他角色', 'target-form' => 'ids'))->button('初始化沒角色的用戶', array('href' => U('Role/initUnhaveUser')))->select('角色:', 'role_id', 'select', '', '', '', $role_list)->select('狀態:', 'user_status', 'select', '', '', '', $statusOptions)->select('', 'single_role', 'select', '', '', '', $singleRoleOptions)->keyId()->keyImage('avatar', '頭像')->keyLink('nickname', '昵稱', 'ucenter/index/information?uid={$uid}')->keyStatus()->pagination($totalCount, $r)->data($user_list)->display();
 }
開發者ID:qimeijun,項目名稱:OCenter,代碼行數:67,代碼來源:RoleController.class.php

示例6: zhongjieList

 public function zhongjieList()
 {
     $d_apply = D('apply');
     $map['a.status'] = 1;
     //2表示待審核
     $map['to_auth'] = 2;
     //4表示樓盤
     $list = $d_apply->alias('a')->field('a.*,b.nickname,c.mobile')->where($map)->join('__MEMBER__  as b on a.uid = b.uid', 'left')->join('__UCENTER_MEMBER__  as c on a.uid = c.id', 'left')->select();
     $builder = new AdminListBuilder();
     $builder->title('已認證中介');
     $builder->setStatusUrl(U('setAuthStatus'))->keyId()->keyLink('nickname', '昵稱', 'authPicture?id=###')->keyText('mobile', '電話')->keyCreatetime()->keyStatus();
     $builder->data($list);
     $builder->display();
 }
開發者ID:smartymoon,項目名稱:fang1001,代碼行數:14,代碼來源:HomeController.class.php

示例7: cbd

 public function cbd($pid = 0, $upid = 0, $city = 0, $level = 0)
 {
     $pid = intval($pid);
     $builder = new AdminListBuilder();
     if ($level == 2) {
         $builder->title('樓盤列表');
     } else {
         $builder->title('商圈列表');
     }
     //取出省
     if ($pid == 0 && $upid == 0) {
         $map = array('level' => 1);
         $href = 'cbd?upid=###';
         $list = D('district')->where($map)->field('id,name')->select();
     } elseif ($pid == 0) {
         // 取出市
         $map = array('upid' => $upid);
         $href = 'cbd?pid=###&city=###';
         $list = D('district')->where($map)->field('id,name')->select();
     } elseif ($level < 2) {
         //取出市以下,展示區和cbd
         $map = array('pid' => $pid);
         //添加新增按鈕
         $level = D('cbd')->where(array('id' => $pid))->getField('level');
         $level = $level + 1;
         //level指當前數據的level
         $builder->buttonNew(U('CBDEdit', array('pid' => $pid, 'city' => $city, 'level' => $level)));
         $href = 'cbd?pid=###&level=' . $level . '&city=' . $city;
         $list = D('cbd')->where($map)->field('id,name')->select();
     } elseif ($level == 2) {
         //此處要添加具體樓盤
         $map = array('pid' => $pid);
         //添加樓盤按鈕
         $builder->buttonNew(U('PropertyEdit', array('pid' => $pid, 'city' => $city)));
         $href = 'propertyEdit?id=###';
         $list = D('property')->where($map)->field('id,name')->select();
     }
     $builder->setStatusUrl(U('setCBDStatus'))->keyId()->keyLink('name', '區域', $href);
     $builder->data($list);
     $builder->display();
 }
開發者ID:smartymoon,項目名稱:e-anjia,代碼行數:41,代碼來源:HomeController.class.php

示例8: sections

 /**
  * 章節列表
  * @author 鄭鍾良<zzl@ourstu.com>
  */
 public function sections()
 {
     $aBookId = I('get.book_id', 0, 'intval');
     $aSectionId = I('get.id', 0, 'intval');
     if ($aBookId) {
         $book = $this->bookModel->getData($aBookId);
         if (!$book) {
             $this->error(L('_THE_TUTORIAL_DOES_NOT_EXIST_OR_HAS_BEEN_DELETED_WITH_EXCLAMATION_'));
         }
         $title = $book['title'];
         $map['status'] = array('neq', -1);
         $map['book_id'] = $aBookId;
         $map['pid'] = 0;
         $list = $this->bookSectionModel->getlist($map);
     } elseif ($aSectionId) {
         $section = $this->bookSectionModel->getData($aSectionId);
         if (!$section) {
             $this->error(L('_THE_SECTION_DOES_NOT_EXIST_OR_HAS_BEEN_DELETED_WITH_EXCLAMATION_'));
         }
         $title = '';
         $title = $this->bookSectionModel->getTitle($aSectionId, $title);
         $map['status'] = array('neq', -1);
         $map['book_id'] = $section['book_id'];
         $map['pid'] = $aSectionId;
         $list = $this->bookSectionModel->getlist($map);
     } else {
         $this->error(L('_PLEASE_CHOOSE_A_CHAPTER_OR_TUTORIAL_WITH_EXCLAMATION_'));
     }
     foreach ($list as &$val) {
         if (!$val['type']) {
             $val['sections_link'] = '<a href="' . U('Book/sections', array('id' => $val['id'])) . '">章節</a>&nbsp;&nbsp;<a href="' . U('Book/editSections', array('id' => $val['id'])) . '">編輯章節</a>';
             $val['type_title'] = L('_CHAPTER_');
         } else {
             $val['type_title'] = L('_ARTICLE_');
         }
         if (!$val['is_show']) {
             $val['is_show'] = L('_DRAFT_');
         } else {
             $val['is_show'] = L('_NORMAL_');
         }
     }
     unset($val);
     $builder = new AdminListBuilder();
     $builder->title(op_t($title))->data($list);
     if ($aBookId) {
         $builder->button(L('_EDIT_THIS_LAYER_SECTION_'), array('href' => U('Book/editSections', array('book_id' => $aBookId))));
     } else {
         $builder->button(L('_EDIT_THIS_LAYER_SECTION_'), array('href' => U('Book/editSections', array('id' => $aSectionId))));
     }
     $builder->setStatusUrl(U('Book/setSectionStatus'))->buttonEnable()->buttonDisable()->buttonDelete()->ajaxButton(U('Book/changeSectionType'), array('type' => 1), L('_TURN_TO_THE_ARTICLE_TYPE_'))->ajaxButton(U('Book/changeSectionType'), array('type' => 0), L('_TURN_TO_CHAPTER_TYPE_'))->buttonSort(U('Book/sortSections', array('pid' => $map['pid'], 'book_id' => $map['book_id'])), L('_SORT_'))->keyId()->keyText('type_title', L('_TYPE_'))->keyLink('title', L('_TITLE_'), 'Book/Index/read?section_id=###')->keyText('sections_link', L('_SECTION_OPERATION_'))->keyDoActionEdit('Book/editSection?id=###')->keyDoAction('Book/copySection?id=###', L('_COPY_'))->keyBool('open_child', L('_START_SUB_CHAPTER_'))->keyText('keywords', L('_KEY_WORDS_'))->keyText('is_show', L('_DRAFT_NORMAL_WITH_SLASH_'))->keyUid()->keyStatus()->keyCreateTime()->display();
 }
開發者ID:sunjie20081001,項目名稱:sns,代碼行數:55,代碼來源:BookController.class.php

示例9: verify

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

示例10: index

 public function index($page = 1, $r = 20)
 {
     $aStatus = I('get.status', 0, 'intval');
     if ($aStatus == 0) {
         $map['status'] = 1;
     } elseif ($aStatus == 1) {
         $map['status'] = 2;
     } else {
         $map['status'] = 0;
     }
     list($list, $totalCount) = $this->questionModel->getListPageByMap($map, $page, 'is_recommend desc,create_time desc', $r, '*');
     $builder = new AdminListBuilder();
     $builder->title('問題列表頁');
     $builder->setSelectPostUrl(U('Question/index'))->select('', 'status', 'select', '', '', '', array(array('id' => 0, 'value' => '當前問題(啟用)'), array('id' => 1, 'value' => '未審核'), array('id' => 2, 'value' => '審核失敗或已禁用')));
     $builder->setStatusUrl(U('Question/setQuestionStatus'));
     if ($aStatus == 1) {
         $builder->buttonEnable(null, '審核通過')->buttonDisable(null, '審核失敗')->buttonDelete(null, '直接刪除');
     } elseif ($aStatus == 2) {
         $builder->buttonEnable(null, '啟用或審核通過')->buttonDelete();
     } else {
         $builder->buttonEnable()->buttonDisable()->buttonDelete()->ajaxButton(U('Question/recommend'), array('recommend' => 1), '設為推薦')->ajaxButton(U('Question/recommend'), array('recommend' => 0), '取消推薦');
     }
     $builder->keyId()->keyLink('title', '標題', 'Question/Index/detail?id=###')->keyUid()->keyText('category', '分類')->keyBool('is_recommend', '是否為推薦')->keyCreateTime()->keyUpdateTime()->keyStatus();
     $builder->pagination($totalCount, $r)->data($list)->display();
 }
開發者ID:chenyongze,項目名稱:bighaha,代碼行數:25,代碼來源:QuestionController.class.php


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