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


PHP AdminListBuilder::buttonModalPopup方法代码示例

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


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

示例1: buildList

 public function buildList($page = 1, $r = 20)
 {
     $map['status'] = array('egt', 0);
     $list = M('Report')->where($map)->page($page, $r)->order('id asc')->select();
     $reportCount = M('Report')->where($map)->count();
     int_to_string($list);
     $builder = new AdminListBuilder();
     $builder->title("举报处理列表");
     $builder->buttonModalPopup(addons_url('Report://Admin/handleEject'), '', '批量处理', array('target-form' => 'ids'))->buttonDisable(addons_url('Report://Admin/ignoreReport'), '忽略处理')->buttonDelete(addons_url('Report://Admin/deleteReport'), '删除举报')->keyId()->keyLink('url', "举报链接", '{$url}')->keyUid('uid', "举报用户的ID")->keyText('reason', "举报原因")->keyText('content', "举报描述")->keyText('type', "举报类型")->keyCreateTime('create_time', "创建时间")->keyUpdateTime('handle_time', "处理时间")->keyText('handle_result', "处理结果")->keyDoActionModalPopup('Report://Admin/handleEject?ids=###|addons_url', '处理', '操作')->keyDoActionEdit('Report://Admin/ignoreReport?ids=###|addons_url', '忽略处理')->key('status', '状态', 'status', array('0' => '未处理', '1' => '处理中', '2' => '已处理'));
     $builder->data($list);
     $builder->pagination($reportCount, $r);
     $builder->display();
 }
开发者ID:xiaolw,项目名称:wacms,代码行数:13,代码来源:AdminController.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: 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

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


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