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


PHP AdminListBuilder::setSelectPostUrl方法代码示例

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


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

示例1: type

 public function type($page = 1, $r = 20)
 {
     $entity = I('entity', 0, 'intval');
     if ($entity != 0) {
         $map['entity'] = $entity;
     }
     $builder = new AdminListBuilder();
     $builder->title('商品分类管理');
     $list = D('Appstore/AppstoreType')->getList($map, $r, 'id desc');
     foreach ($list['data'] as &$v) {
         switch ($v['entity']) {
             case 1:
                 $v['entity_alias'] = '插件';
                 break;
             case 2:
                 $v['entity_alias'] = '模块';
                 break;
             case 3:
                 $v['entity_alias'] = '模板';
                 break;
             case 4:
                 $v['entity_alias'] = '服务';
                 break;
         }
     }
     unset($v);
     $builder->keyId()->keyLink('title', '分类名称', 'addType?id=###')->keyText('entity_alias', '分类所属');
     $builder->setSelectPostUrl(U('type'))->select('', 'entity', 'select', '', '', '', array(array('id' => 0, 'value' => '全部'), array('id' => 1, 'value' => '插件'), array('id' => 2, 'value' => '模块'), array('id' => 3, 'value' => '主题'), array('id' => 4, 'value' => '服务')));
     $builder->buttonNew(U('addType', array('entity' => $entity)), '新增');
     $builder->data($list[data]);
     $builder->display();
 }
开发者ID:chenyongze,项目名称:bighaha,代码行数:32,代码来源:AppstoreController.class.php

示例2: userList

 public function userList($page = 1, $r = 20)
 {
     $aSearch1 = I('get.user_search1', '');
     $aSearch2 = I('get.user_search2', 0, 'intval');
     $map = array();
     if (empty($aSearch1) && empty($aSearch2)) {
         $aUserGroup = I('get.user_group', 0, 'intval');
         $aRole = I('get.role', 0, 'intval');
         if (!empty($aRole) || !empty($aUserGroup)) {
             $uids = $this->getUids($aUserGroup, $aRole);
             $map['uid'] = array('in', $uids);
         }
         $user = D('member')->where($map)->page($page, $r)->field('uid,nickname')->select();
         foreach ($user as &$v) {
             $v['id'] = $v['uid'];
         }
         unset($v);
         $totalCount = D('member')->where($map)->count();
     } else {
         $uids = $this->getUids_sc($aSearch1, $aSearch2);
         $map['uid'] = array('in', $uids);
         $user = D('member')->where($map)->page($page, $r)->field('uid,nickname')->select();
         foreach ($user as &$v) {
             $v['id'] = $v['uid'];
         }
         unset($v);
         $totalCount = D('member')->where($map)->count();
     }
     $r = 20;
     $role = D('Role')->selectByMap(array('status' => 1));
     $user_role = array(array('id' => 0, 'value' => L('_ALL_')));
     foreach ($role as $key => $v) {
         array_push($user_role, array('id' => $v['id'], 'value' => $v['title']));
     }
     $group = D('AuthGroup')->getGroups();
     $user_group = array(array('id' => 0, 'value' => L('_ALL_')));
     foreach ($group as $key => $v) {
         array_push($user_group, array('id' => $v['id'], 'value' => $v['title']));
     }
     $builder = new AdminListBuilder();
     $builder->title(L('_"MASS_USER_LIST"_'));
     $builder->meta_title = L('_"MASS_USER_LIST"_');
     $builder->setSelectPostUrl(U('Message/userList'))->setSearchPostUrl(U('Message/userList'))->select(L('_USER_GROUP:_'), 'user_group', 'select', L('_FILTER_ACCORDING_TO_USER_GROUP_'), '', '', $user_group)->select(L('_IDENTITY_'), 'role', 'select', L('_FILTER_ACCORDING_TO_USER_IDENTITY_'), '', '', $user_role)->search('', 'user_search1', '', L('_SEARCH_ACCORDING_TO_USERS_NICKNAME_'), '', '', '')->search('', 'user_search2', '', L('_SEARCH_ACCORDING_TO_USER_ID_'), '', '', '');
     $builder->buttonModalPopup(U('Message/sendMessage'), array('user_group' => $aUserGroup, 'role' => $aRole), L('_SEND_A_MESSAGE_'), array('data-title' => L('_MASS_MESSAGE_'), 'target-form' => 'ids', 'can_null' => 'true'));
     $builder->keyText('uid', '用户ID')->keyText('nickname', L('_"NICKNAME"_'));
     $builder->data($user);
     $builder->pagination($totalCount, $r);
     $builder->display();
 }
开发者ID:naliduo,项目名称:Lightweight-social-platform,代码行数:49,代码来源:MessageController.class.php

示例3: index

 public function index($page = 1, $r = 20)
 {
     //读取规则列表
     $aApp = I('get.app', '', 'text');
     $map = array('status' => array('EGT', 0));
     if ($aApp != '') {
         $map['app'] = $aApp;
     }
     $model = D('SeoRule');
     $ruleList = $model->where($map)->page($page, $r)->order('sort asc')->select();
     $totalCount = $model->where($map)->count();
     $module = M('Common/Module')->getAll();
     $app = array();
     foreach ($module as $m) {
         if ($m['is_setup']) {
             $app[] = array('id' => $m['name'], 'value' => $m['alias']);
         }
     }
     //显示页面
     $builder = new AdminListBuilder();
     $builder->setSelectPostUrl(U('index'));
     $builder->title(L('_SEO_RULE_CONFIGURATION_'))->setStatusUrl(U('setRuleStatus'))->buttonEnable()->buttonDisable()->buttonDelete()->buttonNew(U('editRule'))->buttonSort(U('sortRule'))->keyId()->keyTitle()->keyText('app', L('_MODULE_PLAIN_'))->keyText('controller', L('_CONTROLLER_'))->keyText('action', L('_METHOD_'))->keyText('seo_title', L('_SEO_TITLE_'))->keyText('seo_keywords', L('_SEO_KEYWORD_'))->keyText('seo_description', L('_SEO_DESCRIPTION_'))->select(L('_MODULE_BELONGED_') . L('_COLON_'), 'app', 'select', '', '', '', array_merge(array(array('id' => '', 'value' => L('_ALL_'))), $app))->keyStatus()->keyDoActionEdit('editRule?id=###')->data($ruleList)->pagination($totalCount, $r)->display();
 }
开发者ID:terrydeng,项目名称:beimeibang1205,代码行数:23,代码来源:SEOController.class.php

示例4: buildList

 /**
  * 公告列表
  * @param int $page
  * @param int $r
  * @author 郑钟良<zzl@ourstu.com>
  */
 public function buildList($page = 1, $r = 20)
 {
     $map['status'] = 1;
     $aDown = I('down', 0, 'intval');
     $this->assign('down', $aDown);
     if ($aDown) {
         $map['end_time'] = array('elt', time());
     } else {
         $map['end_time'] = array('gt', time());
     }
     list($list, $totalCount) = $this->announcementModel->getListPage($map, $page, 'id desc', $r);
     $builder = new AdminListBuilder();
     $builder->title('公告列表');
     $builder->buttonNew(addons_url('Announcement://admin/edit'));
     $builder->setSelectPostUrl(addons_url('Announcement://admin/buildList'))->select('', 'down', 'select', '', '', '', array(array('id' => 0, 'value' => '当前公告'), array('id' => 1, 'value' => '历史公告')));
     $builder->keyId()->keyTitle()->keyIcon()->keyText('link', '链接')->keyText('content', '内容')->keyCreateTime()->keyTime('end_time', '截止日期');
     $builder->keyDoActionEdit('Announcement://admin/edit?id=###|addons_url');
     if (!$aDown) {
         $builder->ajaxButton(addons_url('Announcement://admin/setEnd'), '', '设为到期')->keyDoAction('Announcement://admin/setEnd?ids=###|addons_url', '设为到期');
     }
     $builder->data($list)->pagination($totalCount, $r);
     $builder->display();
 }
开发者ID:chenyongze,项目名称:bighaha,代码行数:29,代码来源:AdminController.class.php

示例5: userList

 public function userList($page = 1, $r = 20)
 {
     $aUserGroup = I('get.user_group', 0, 'intval');
     $aRole = I('get.role', 0, 'intval');
     $map = array();
     if (!empty($aRole) || !empty($aUserGroup)) {
         $uids = $this->getUids($aUserGroup, $aRole);
         $map['uid'] = array('in', $uids);
     }
     $user = D('member')->where($map)->page($page, $r)->field('uid,nickname')->select();
     foreach ($user as &$v) {
         $v['id'] = $v['uid'];
     }
     unset($v);
     $totalCount = D('member')->where($map)->count();
     $r = 20;
     $role = D('Role')->selectByMap(array('status' => 1));
     $user_role = array(array('id' => 0, 'value' => '全部'));
     foreach ($role as $key => $v) {
         array_push($user_role, array('id' => $v['id'], 'value' => $v['title']));
     }
     $group = D('AuthGroup')->getGroups();
     $user_group = array(array('id' => 0, 'value' => '全部'));
     foreach ($group as $key => $v) {
         array_push($user_group, array('id' => $v['id'], 'value' => $v['title']));
     }
     $builder = new AdminListBuilder();
     $builder->title("群发用户列表");
     $builder->meta_title = '群发用户列表';
     $builder->setSelectPostUrl(U('Message/userList'))->select('用户组:', 'user_group', 'select', '根据用户组筛选', '', '', $user_group)->select('身份:', 'role', 'select', '根据用户身份筛选', '', '', $user_role);
     $builder->buttonModalPopup(U('Message/sendMessage'), array('user_group' => $aUserGroup, 'role' => $aRole), '发送消息', array('data-title' => '群发消息', 'target-form' => 'ids', 'can_null' => 'true'));
     $builder->keyText('uid', '用户ID')->keyText('nickname', "昵称");
     $builder->data($user);
     $builder->pagination($totalCount, $r);
     $builder->display();
 }
开发者ID:ccccy,项目名称:wuanlife,代码行数:36,代码来源:MessageController.class.php

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