本文整理匯總了PHP中Admin\Builder\AdminListBuilder類的典型用法代碼示例。如果您正苦於以下問題:PHP AdminListBuilder類的具體用法?PHP AdminListBuilder怎麽用?PHP AdminListBuilder使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了AdminListBuilder類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: setStatus
public function setStatus($ids, $status = 1)
{
$ids = I('ids', array());
$status = $_GET['status'];
$status != 1 && ($status = 0);
D('Addons://Report/Report')->processingTime();
$builder = new AdminListBuilder();
$builder->doSetStatus('Report', $ids, $status);
}
示例2: index
public function index()
{
$r = 20;
$model = D("Contact");
$list = $model->order('id desc')->page(1, $r)->select();
unset($li);
$totalCount = $model->count();
//顯示頁麵
$builder = new AdminListBuilder();
$builder->title('留言管理')->keyId()->keyText('name', '姓名')->keyText('address', '地址')->keyText('phone', '手機號')->keyText('message', '內容')->keyText('created_at', '創建時間')->data($list)->pagination($totalCount, $r)->display();
}
示例3: expressionList
public function expressionList()
{
$title = I('get.title', '', 'op_t');
$list = D('Expression')->getExpression($title);
foreach ($list as &$v) {
$v['image'] = '<img src="' . $v['src'] . '"/>';
}
unset($v);
$builder = new AdminListBuilder();
$builder->title('表情列表')->keyText('title', '標題')->keyText('image', '表情圖片')->keyDoAction('Admin/Expression/delExpression?title={$filename}&pkg=' . $title, '刪除')->data($list)->display();
}
示例4: index
public function index($page = 1, $r = 20)
{
//讀取數據
$model = D('Weicj');
$map['mp_id'] = get_mpid();
$list = $model->where($map)->page($page, $r)->order('id asc')->select();
foreach ($list as &$val) {
}
$url = $list['url'];
$totalCount = $model->count();
//顯示頁麵
$builder = new AdminListBuilder();
$builder->title('微場景列表')->buttonNew(U('edit'))->button('刪除', array('class' => 'btn ajax-post tox-confirm', 'data-confirm' => '您確實要刪除關鍵詞嗎?', 'url' => U('del'), 'target-form' => 'ids'))->keyId()->keyText('title', '標題')->keyText('intro', '簡介')->keyText('cjurl', '跳轉url')->keyDoAction('preview?id=###', '預覽')->keyDoActionEdit('edit?id=###')->keyDoAction('del?ids=###', '刪除')->data($list)->pagination($totalCount, $r)->display();
}
示例5: scoreLog
public function scoreLog($r = 20, $p = 1)
{
if (I('type') == 'clear') {
D('ScoreLog')->where(array('id>0'))->delete();
$this->success('清空成功。', U('scoreLog'));
exit;
} else {
$aUid = I('uid', 0, '');
if ($aUid) {
$map['uid'] = $aUid;
}
$listBuilder = new AdminListBuilder();
$listBuilder->title('積分日誌');
$map['status'] = array('gt', -1);
$scoreLog = D('ScoreLog')->where($map)->order('create_time desc')->findPage($r);
$scoreTypes = D('Ucenter/Score')->getTypeListByIndex();
foreach ($scoreLog['data'] as &$v) {
$v['adjustType'] = $v['action'] == 'inc' ? '增加' : '減少';
$v['scoreType'] = $scoreTypes[$v['type']]['title'];
$class = $v['action'] == 'inc' ? 'text-success' : 'text-danger';
$v['value'] = '<span class="' . $class . '">' . ($v['action'] == 'inc' ? '+' : '-') . $v['value'] . $scoreTypes[$v['type']]['unit'] . '</span>';
$v['finally_value'] = $v['finally_value'] . $scoreTypes[$v['type']]['unit'];
}
$listBuilder->data($scoreLog['data']);
$listBuilder->keyId()->keyUid('uid', '用戶')->keyText('scoreType', '積分類型')->keyText('adjustType', '調整類型')->keyHtml('value', '積分變動')->keyText('finally_value', '積分最終值')->keyText('remark', '變動描述')->keyCreateTime();
$listBuilder->pagination($scoreLog['count'], $r);
$listBuilder->search(L('_SEARCH_'), 'uid', 'text', '輸入UID');
$listBuilder->button('清空日誌', array('url' => U('scoreLog', array('type' => 'clear')), 'class' => 'btn ajax-get confirm'));
$listBuilder->display();
}
}
示例6: withdrawList
public function withdrawList($r = 15, $page = 1)
{
$listBuilder = new AdminListBuilder();
$recordModel = D('recharge_withdraw');
$data = $recordModel->order('create_time desc')->page($p, $r)->select();
$totalCount = $recordModel->count();
foreach ($data as &$v) {
$type = D('Ucenter/Score')->getType(array('id' => $v['field'], 'status' => 1));
$v['type_title'] = $type['title'];
$v['method_name'] = get_pay_method($v['method']);
$v['pay_condition'] = $this->getConditionText($v['payok']);
if ($v['pay_uid'] != 0) {
$user = query_user(array('space_link'), $v['pay_uid']);
$v['operator'] = $user['space_link'];
} else {
$v['operator'] = '-';
}
$v['pay_time'] = $v['pay_time'] == 0 ? '-' : $v['pay_time'];
}
unset($v);
$listBuilder->title('提現記錄');
$listBuilder->keyId()->keyText('type_title', '提現字段')->keyText('amount', '提現金額')->keyText('frozen_amount', '凍結積分')->keyUid()->keyText('method_name', '提現方式')->keyCreateTime()->keyText('pay_condition', '支付狀態')->keyText('operator', '操作者')->keyTime('pay_time', '提現操作時間')->keyText('account_info', '收款賬戶信息');
$listBuilder->data($data)->pagination($totalCount, $r);
$listBuilder->ajaxButton(U('recharge/doWithdraw'), null, '提現');
$listBuilder->ajaxButton(U('recharge/cancelWithdraw'), null, '關閉提現');
$listBuilder->display();
}
示例7: index
public function index($page = 1, $r = 20)
{
//讀取數據
$model = D('Common/Ucuser');
$map['status'] = array('EGT', 0);
$map['mp_id'] = get_mpid();
$list = $model->where($map)->page($page, $r)->order('uid asc')->select();
int_to_string($list);
//設置status
foreach ($list as &$val) {
$val['sex'] = $model->getSex($val['sex']);
}
$totalCount = $model->count();
//顯示頁麵
$builder = new AdminListBuilder();
$builder->title('用戶列表')->keyText('uid', 'uid')->keyText('openid', 'openid')->keyText('nickname', '昵稱')->keyText('sex', '性別')->keyText('province', '省份')->keyText('city', '城市')->keyText('score1', '積分')->data($list)->pagination($totalCount, $r)->display();
}
示例8: 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();
}
示例9: index
public function index($page = 1, $r = 20)
{
//讀取數據
$model = D('Common/Keyword');
$map['uid'] = UID;
$map['public_id'] = get_token();
$mp = D('Mpbase/MemberPublic')->where($map)->find();
//所登陸會員帳號當前管理的公眾號
$kmap['mp_id'] = $mp['id'];
$list = $model->where($kmap)->page($page, $r)->order('id asc')->select();
foreach ($list as &$val) {
$amap['name'] = $val['addon'];
$val['addon_name'] = M('addons')->where($amap)->getField('title');
}
$totalCount = $model->count();
//顯示頁麵
$builder = new AdminListBuilder();
$builder->title('關鍵詞列表')->buttonNew(U('edit'))->button('刪除', array('class' => 'btn ajax-post tox-confirm', 'data-confirm' => '您確實要刪除關鍵詞嗎?', 'url' => U('del'), 'target-form' => 'ids'))->keyId()->keyText('keyword', '關鍵詞')->keyText('addon', '所屬插件')->keyText('model', '對應數據表')->keyText('aim_id', '插件數據ID')->keyText('title', '回複標題')->keyText('description', '回複描述')->keyImage('cover', '回複封麵圖片')->keyText('url', '跳轉url', '以http://開頭的完整url')->keyDoActionEdit('edit?id=###')->keyDoAction('del?ids=###', '刪除')->data($list)->pagination($totalCount, $r)->display();
}
示例10: index
public function index($page = 1, $r = 20)
{
//讀取數據
$model = D('Mpbase/MemberPublic');
$map['status'] = array('EGT', 0);
if (!is_administrator()) {
//管理員可以管理全部公眾號
$map['uid'] = UID;
}
$list = $model->where($map)->page($page, $r)->order('id asc')->select();
int_to_string($list);
//設置status
foreach ($list as &$val) {
$val['u_name'] = D('member')->where('uid=' . $val['uid'])->getField('nickname');
$val['type'] = $model->getMpType($val['type']);
}
$totalCount = $model->count();
//顯示頁麵
$builder = new AdminListBuilder();
$builder->title('公眾號列表')->buttonNew(U('Mpbase/edit'))->setStatusUrl(U('setStatus'))->buttonEnable()->buttonDisable()->button('刪除', array('class' => 'btn ajax-post tox-confirm', 'data-confirm' => '您確實要刪除公眾號嗎?(刪除後對應的公眾號配置將會清空,不可恢複,請謹慎刪除!)', 'url' => U('del'), 'target-form' => 'ids'))->keyId()->keyUid()->keyText('public_name', '名稱')->keyText('wechat', '微信號')->keyText('public_id', '原始ID')->keyText('type', '公眾號類型')->keyStatus()->keyDoActionEdit('edit?id=###')->keyDoAction('del?ids=###', '刪除')->keyDoAction('change?id=###', '切換為當前公眾號')->keyDoAction('Home/Index/help?id=###', '接口配置')->data($list)->pagination($totalCount, $r)->display();
}
示例11: lists
public function lists()
{
$listBuilder = new AdminListBuilder();
/*刷新模塊列表時清空緩存*/
$aRefresh = I('get.refresh', 0, 'intval');
if ($aRefresh) {
S('module_all', null);
}
/*刷新模塊列表時清空緩存 end*/
$modules = $this->moduleModel->getAll();
foreach ($modules as &$m) {
$m['alias'] = '<i class="icon-' . $m['icon'] . '"></i> ' . $m['alias'];
if ($m['is_setup']) {
$m['name'] = '<i class="icon-ok" style="color: green;"></i> ' . $m['name'];
if ($m['can_uninstall']) {
$m['do'] = '<a class="btn btn-error " onclick="moduleManager.uninstall(\'' . $m['id'] . '\')"><span style="color: red;" ><i class="icon-cut"></i></span> 卸載</a>';
}
} else {
$m['name'] = '<i class="icon-remove" style="color: red;"></i> ' . $m['name'];
$m['do'] = '<a class="btn" onclick="moduleManager.install(\'' . $m['id'] . '\')"><span style="color: green;"<i class="icon-check"></i></span> 安裝</a>';
}
if ($m['is_com']) {
$m['is_com'] = '<strong style="color: orange">商業模塊</strong>';
} else {
$m['is_com'] = '<strong style="color: green">免費模塊</strong>';
}
}
unset($m);
$listBuilder->data($modules);
$listBuilder->title('模塊管理');
$listBuilder->button('刷新', array('href' => U('Admin/Module/lists', array('refresh' => 1))));
$listBuilder->keyId()->keyHtml('alias', '模塊名')->keyText('name', '模塊英文名')->keyText('summary', '模塊介紹')->keyText('version', '版本號')->keyText('is_com', '商業模塊')->keyLink('developer', '開發者', '{$website}')->keyText('entry', '前台入口')->keyText('admin_entry', '後台入口')->keyText('do', '操作');
$listBuilder->display();
}
示例12: 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();
}
示例13: 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();
}
示例14: 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();
}
示例15: 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();
}