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();
 }
 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();
     }
 }
 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();
 }
 public function ruleTrash($page = 1, $r = 20)
 {
     //读取规则列表
     $map = array('status' => -1);
     $model = D('SeoRule');
     $ruleList = $model->where($map)->page($page, $r)->order('sort asc')->select();
     $totalCount = $model->where($map)->count();
     //显示页面
     $builder = new AdminListBuilder();
     $builder->title(L('_SEO_RULE_RECYCLING_STATION_'))->setStatusUrl(U('setRuleStatus'))->setDeleteTrueUrl(U('doClear'))->buttonRestore()->buttonDeleteTrue()->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_'))->data($ruleList)->pagination($totalCount, $r)->display();
 }
 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();
 }
 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();
 }
 public function ruleTrash($page = 1, $r = 20)
 {
     //读取规则列表
     $map = array('status' => -1);
     $model = M('SeoRule');
     $ruleList = $model->where($map)->page($page, $r)->order('sort asc')->select();
     $totalCount = $model->where($map)->count();
     //显示页面
     $builder = new AdminListBuilder();
     $builder->title('SEO规则回收站')->setStatusUrl(U('setRuleStatus'))->setDeleteTrueUrl(U('doClear'))->buttonRestore()->buttonDeleteTrue()->keyId()->keyTitle()->keyText('app', '模块')->keyText('controller', '控制器')->keyText('action', '方法')->keyText('seo_title', 'SEO标题')->keyText('seo_keywords', 'SEO关键字')->keyText('seo_description', 'SEO描述')->data($ruleList)->pagination($totalCount, $r)->display();
 }
示例#8
0
 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();
 }
 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();
 }
示例#10
0
 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();
 }
 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();
 }
 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
0
 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();
 }
 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();
 }
 public function limitList()
 {
     $action_name = I('get.action', '', 'op_t');
     !empty($action_name) && ($map['action_list'] = array(array('like', '%[' . $action_name . ']%'), '', 'or'));
     //读取规则列表
     $map['status'] = array('EGT', 0);
     $model = M('action_limit');
     $List = $model->where($map)->order('id asc')->select();
     $timeUnit = $this->getTimeUnit();
     foreach ($List as &$val) {
         $val['time'] = $val['time_number'] . $timeUnit[$val['time_unit']];
         $val['action_list'] = get_action_name($val['action_list']);
         empty($val['action_list']) && ($val['action_list'] = L('_ALL_ACTS_'));
         $val['punish'] = get_punish_name($val['punish']);
     }
     unset($val);
     //显示页面
     $builder = new AdminListBuilder();
     $builder->title(L('_ACTION_LIST_'))->buttonNew(U('editLimit'))->setStatusUrl(U('setLimitStatus'))->buttonEnable()->buttonDisable()->buttonDelete()->keyId()->keyTitle()->keyText('name', L('_NAME_'))->keyText('frequency', L('_FREQUENCY_'))->keyText('time', L('_TIME_UNIT_'))->keyText('punish', L('_PUNISHMENT_'))->keyBool('if_message', L('_SEND_REMINDER_'))->keyText('message_content', L('_MESSAGE_PROMPT_CONTENT_'))->keyText('action_list', L('_ACT_'))->keyStatus()->keyDoActionEdit('editLimit?id=###')->data($List)->display();
 }
 public function limitList()
 {
     $action_name = I('get.action', '', 'op_t');
     !empty($action_name) && ($map['action_list'] = array(array('like', '%[' . $action_name . ']%'), '', 'or'));
     //读取规则列表
     $map['status'] = array('EGT', 0);
     $model = M('action_limit');
     $List = $model->where($map)->order('id asc')->select();
     $timeUnit = $this->getTimeUnit();
     foreach ($List as &$val) {
         $val['time'] = $val['time_number'] . $timeUnit[$val['time_unit']];
         $val['action_list'] = get_action_name($val['action_list']);
         empty($val['action_list']) && ($val['action_list'] = '所有行为');
         $val['punish'] = get_punish_name($val['punish']);
     }
     unset($val);
     //显示页面
     $builder = new AdminListBuilder();
     $builder->title('行为限制列表')->buttonNew(U('editLimit'))->setStatusUrl(U('setLimitStatus'))->buttonEnable()->buttonDisable()->buttonDelete()->keyId()->keyTitle()->keyText('name', '名称')->keyText('frequency', '频率')->keyText('time', '时间单位')->keyText('punish', '处罚')->keyBool('if_message', '是否发送提醒')->keyText('message_content', '消息提示内容')->keyText('action_list', '行为')->keyStatus()->keyDoActionEdit('editLimit?id=###')->data($List)->display();
 }
 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();
 }
 /**
  * 公告列表
  * @param int $page
  * @param int $r
  * @author 郑钟良<*****@*****.**>
  */
 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();
 }
 public function lists()
 {
     $listBuilder = new AdminListBuilder();
     /*刷新模块列表时清空缓存*/
     $aRefresh = I('get.refresh', 0, 'intval');
     if ($aRefresh == 1) {
         D('Module')->reload();
     } else {
         if ($aRefresh == 2) {
             D('Module')->cleanModulesCache();
         }
     }
     /*刷新模块列表时清空缓存 end*/
     $modules = $this->moduleModel->getAll();
     foreach ($modules as &$m) {
         $m['alias'] = '<a href="' . U('edit?', array('name' => $m['name'])) . '"><i class="icon-' . $m['icon'] . '"></i> ' . $m['alias'] . '</a>';
         if ($m['is_setup']) {
             $m['name'] = '<i class="icon-ok" style="color: green;"></i> ' . $m['name'];
             if ($m['can_uninstall'] == 1) {
                 $m['do'] = '<a class="btn btn-error "  href="' . U('uninstall', array('id' => $m['id'])) . '"><span style="color: red;" ><i class="icon-cut"></i></span> 卸载</a>';
             } else {
                 $m['do'] = '系统模块';
             }
         } else {
             $m['do'] = '<a class="btn" href="' . U('install', array('name' => $m['name'])) . '"><span style="color: green;"<i class="icon-check"></i></span> 安装</a>';
             $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>';
         }
     }
     unset($m);
     $listBuilder->data($modules);
     $listBuilder->title('模块管理');
     $listBuilder->button('刷新(读入新的模块)', array('href' => U('Admin/Module/lists', array('refresh' => 2))));
     $listBuilder->button('重置(根据预设模块信息重置)', array('href' => U('Admin/Module/lists', array('refresh' => 1))));
     $listBuilder->keyId()->keyHtml('alias', '模块名')->keyText('name', '模块英文名')->keyText('summary', '模块介绍')->keyText('version', '版本号')->keyLink('developer', '开发者', '{$website}')->keyText('entry', '前台入口')->keyText('admin_entry', '后台入口')->keyHtml('do', '操作');
     $listBuilder->display();
 }
示例#20
0
 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();
 }
 /**
  * 邀请日志
  * @param int $page
  * @param int $r
  * @author 郑钟良<*****@*****.**>
  */
 public function inviteLog($page = 1, $r = 20)
 {
     list($list, , $totalCount) = $this->inviteLogModel->getList($page, $r);
     $builder = new AdminListBuilder();
     $builder->title('邀请注册记录')->keyId()->keyText('user', '注册者')->keyText('inviter', '邀请者')->keyText('invite_type_title', '邀请码类型')->keyText('content', '信息')->keyCreateTime('create_time', '注册时间')->pagination($totalCount, $r)->data($list)->display();
 }
 public function scoreList()
 {
     //读取数据
     $map = array('status' => array('GT', -1));
     $model = D('Ucenter/Score');
     $list = $model->getTypeList($map);
     //显示页面
     $builder = new AdminListBuilder();
     $builder->title(L('_INTEGRAL_TYPE_'))->suggest(L('_CANNOT_DELETE_ID_4_'))->buttonNew(U('editScoreType'))->setStatusUrl(U('setTypeStatus'))->buttonEnable()->buttonDisable()->button(L('_DELETE_'), array('class' => 'btn ajax-post tox-confirm', 'data-confirm' => '您确实要删除积分分类吗?(删除后对应的积分将会清空,不可恢复,请谨慎删除!)', 'url' => U('delType'), 'target-form' => 'ids'))->button(L('_RECHARGE_'), array('href' => U('recharge')))->keyId()->keyText('title', L('_NAME_'))->keyText('unit', L('_UNIT_'))->keyStatus()->keyDoActionEdit('editScoreType?id=###')->data($list)->display();
 }
 public function commentTrash($page = 1, $r = 20, $model = '')
 {
     $builder = new AdminListBuilder();
     $builder->clearTrash($model);
     //读取评论列表
     $map = array('status' => -1);
     $model = M('WeiboComment');
     $list = $model->where($map)->order('create_time asc')->page($page, $r)->select();
     $totalCount = $model->where($map)->count();
     //显示页面
     $builder->title('回复回收站')->setStatusUrl(U('setCommentStatus'))->buttonRestore()->buttonClear('WeiboComment')->keyId()->keyText('content', '内容')->keyUid()->keyCreateTime()->data($list)->pagination($totalCount, $r)->display();
 }
 /**
  * 邀请日志
  * @param int $page
  * @param int $r
  * @author 郑钟良<*****@*****.**>
  */
 public function inviteLog($page = 1, $r = 20)
 {
     list($list, , $totalCount) = $this->inviteLogModel->getList($page, $r);
     $builder = new AdminListBuilder();
     $builder->title(L('_INVITE_REGISTRATION_RECORDS_'))->keyId()->keyText('user', '注册者')->keyText('inviter', L('_INVITED_'))->keyText('invite_type_title', '邀请码类型')->keyText('content', L('_INFORMATION_'))->keyCreateTime('create_time', L('_REGISTRATION_TIME_'))->pagination($totalCount, $r)->data($list)->display();
 }
 public function index($page = 1, $r = 20)
 {
     $aCate = I('cate', 0, 'intval');
     if ($aCate == -1) {
         $map['category'] = 0;
     } else {
         if ($aCate != 0) {
             $map['category'] = $aCate;
         }
     }
     $map['status'] = array('neq', -1);
     list($list, $totalCount) = $this->paperModel->getListByPage($map, $page, 'sort asc,update_time desc', '*', $r);
     $category = $this->paperCategoryModel->getCategoryList(array('status' => array('egt', 0)));
     $category = array_combine(array_column($category, 'id'), $category);
     foreach ($list as &$val) {
         if ($val['category']) {
             $val['category'] = '[' . $val['category'] . '] ' . $category[$val['category']]['title'];
         } else {
             $val['category'] = '未分类';
         }
     }
     unset($val);
     $optCategory = $category;
     foreach ($optCategory as &$val) {
         $val['value'] = $val['title'];
     }
     unset($val);
     $builder = new AdminListBuilder();
     $builder->title('文章文章列表')->data($list)->buttonNew(U('Paper/editPaper'))->setStatusUrl(U('Paper/setPaperStatus'))->buttonEnable()->buttonDisable()->buttonDelete()->setSelectPostUrl(U('Admin/Paper/index'))->select('', 'cate', 'select', '', '', '', array_merge(array(array('id' => 0, 'value' => '全部')), $optCategory, array(array('id' => -1, 'value' => '未分类'))))->keyId()->keyUid()->keyLink('title', '标题', 'Paper/Index/index?id=###')->keyText('category', '分类', '可选')->keyText('sort', '排序')->keyStatus()->keyCreateTime()->keyUpdateTime()->keyDoActionEdit('Paper/editPaper?id=###')->pagination($totalCount, $r)->display();
 }
 public function topic()
 {
     $aPage = I('page', 1, 'intval');
     $aName = I('name', '', 'op_t');
     $r = 20;
     $model = M('WeiboTopic');
     $aName && ($map['name'] = array('like', '%' . $aName . '%'));
     $list = $model->where($map)->order('id asc')->page($aPage, $r)->select();
     unset($li);
     $totalCount = $model->where($map)->count();
     //显示页面
     $builder = new AdminListBuilder();
     $attr['class'] = 'btn ajax-post';
     $attr['target-form'] = 'ids';
     $attr1 = $attr;
     $attr1['url'] = $builder->addUrlParam(U('setTopicTop'), array('top' => 1));
     $attr0 = $attr;
     $attr0['url'] = $builder->addUrlParam(U('setTopicTop'), array('top' => 0));
     $attr_del = $attr;
     $attr_del['url'] = $builder->addUrlParam(U('delTopic'), array());
     $builder->title(L('_TOPIC_MANAGER_'))->button(L('_RECOMMEND_'), $attr1)->button(L('_RECOMMEND_CANCEL_'), $attr0)->button(L('_DELETE_'), $attr_del)->keyId()->keyLink('name', L('_CONTENT_'), 'weibo?content=%23{$name}%23')->keyUid()->keyText('logo', L('_LOGO_'))->keyText('intro', L('_LEADER_WORDS_'))->keyText('qrcode', L('_QR_CODE_'))->keyText('uadmin', L('_TOPIC_ADMIN_'))->keyText('read_count', L('_VIEWS_'))->keyMap('is_top', L('_RECOMMEND_YES_OR_NOT_'), array(0 => L('_RECOMMEND_NOT_'), 1 => L('_RECOMMEND_')))->search(L('_NAME_'), 'name')->data($list)->pagination($totalCount, $r)->display();
 }
 /**
  * 分类回收站
  * @param int $page
  * @param int $r
  * @author 郑钟良<*****@*****.**>
  */
 public function tagTrash($page = 1, $r = 20)
 {
     $builder = new AdminListBuilder();
     //读取微博列表
     $map = array('status' => -1);
     $list = $this->userTagModel->where($map)->page($page, $r)->select();
     $totalCount = $this->userTagModel->where($map)->count();
     //显示页面
     $builder->title('标签分类回收站')->setStatusUrl(U('setStatus'))->buttonRestore()->buttonDeleteTrue(U('UserTag/userTagClear'))->keyId()->keyText('title', '标题')->keyText('pid', '父分类id')->data($list)->pagination($totalCount, $r)->display();
 }
示例#28
0
 public function audit($page = 1, $r = 20)
 {
     $aAudit = I('audit', 0, 'intval');
     if ($aAudit == 3) {
         $map['status'] = array('in', array(-1, 2));
     } elseif ($aAudit == 2) {
         $map['dead_line'] = array('elt', time());
         $map['status'] = 2;
     } elseif ($aAudit == 1) {
         $map['status'] = -1;
     } else {
         $map['status'] = 2;
         $map['dead_line'] = array('gt', time());
     }
     list($list, $totalCount) = $this->newsModel->getListByPage($map, $page, 'update_time desc', '*', $r);
     $cates = array_column($list, 'category');
     $category = $this->newsCategoryModel->getCategoryList(array('id' => array('in', $cates), 'status' => 1), 1);
     $category = array_combine(array_column($category, 'id'), $category);
     foreach ($list as &$val) {
         $val['category'] = '[' . $val['category'] . '] ' . $category[$val['category']]['title'];
     }
     unset($val);
     $builder = new AdminListBuilder();
     $builder->title('资讯列表(审核通过的不在该列表中)')->data($list)->setStatusUrl(U('News/setNewsStatus'))->buttonEnable(null, '审核通过')->buttonModalPopup(U('News/doAudit'), null, '审核不通过', array('data-title' => '设置审核失败原因', 'target-form' => 'ids'))->setSelectPostUrl(U('Admin/News/audit'))->select('', 'audit', 'select', '', '', '', array(array('id' => 0, 'value' => '待审核'), array('id' => 1, 'value' => '审核失败'), array('id' => 2, 'value' => '已过期未审核'), array('id' => 3, 'value' => '全部审核')))->keyId()->keyUid()->keyText('title', '标题')->keyText('category', '分类')->keyText('description', '摘要')->keyText('sort', '排序');
     if ($aAudit == 1) {
         $builder->keyText('reason', '审核失败原因');
     }
     $builder->keyTime('dead_line', '有效期至')->keyCreateTime()->keyUpdateTime()->keyDoActionEdit('News/editNews?id=###')->pagination($totalCount, $r)->display();
 }
 public function contentTrash($page = 1, $r = 10, $model = '')
 {
     //读取微博列表
     $builder = new AdminListBuilder();
     //内含  delete 方法
     $builder->clearTrash($model);
     $map = array('status' => -1);
     $model = D('IssueContent');
     $list = $model->where($map)->page($page, $r)->select();
     $totalCount = $model->where($map)->count();
     //显示页面
     $builder->title('内容回收站')->setStatusUrl(U('setIssueContentStatus'))->buttonRestore()->buttonClear('IssueContent')->keyId()->keyLink('title', '标题', 'Issue/Index/issueContentDetail?id=###')->keyUid()->keyCreateTime()->keyStatus()->data($list)->pagination($totalCount, $r)->display();
 }
 /**
  * 审核页面
  * @param int $page
  * @param int $r
  * autor:xjw129xjt
  */
 public function verify($page = 1, $r = 10)
 {
     //读取列表
     $map = array('status' => 0);
     $model = $this->eventModel;
     $list = $model->where($map)->page($page, $r)->select();
     unset($li);
     $totalCount = $model->where($map)->count();
     //显示页面
     $builder = new AdminListBuilder();
     $attr['class'] = 'btn ajax-post';
     $attr['target-form'] = 'ids';
     $builder->title('审核内容')->setStatusUrl(U('setEventContentStatus'))->buttonEnable('', '审核通过')->buttonDelete()->keyId()->keyLink('title', '标题', 'Event/Index/detail?id=###')->keyUid()->keyCreateTime()->keyStatus()->data($list)->pagination($totalCount, $r)->display();
 }