本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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> <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();
}
示例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();
}
示例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();
}