123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace Admin\Controller;
- use Common\Controller\AdminController;
- class FeedbackController extends AdminController {
- public function __construct(){
- parent::__construct();
- }
- public function index(){
- $fbStatus = I('fb_status');
- if (empty($fbStatus)){
- $count = M('Feedback')->where(array('is_delete'=>1,'fb_source'=>1))->count();
- }else{
- $count = M('Feedback')->where(array('is_delete'=>1,'fb_source'=>1,'fb_status'=>$fbStatus,))->count();
- }
- //分页
- $Page = new \Think\Page($count);
- $show = $Page->show();
- if (empty($fbStatus)){
- $fbList = D('Feedback')->getFbList(array('fb_source'=>1),$Page->firstRow, $Page->listRows);
- }else{
- $fbList = D('Feedback')->getFbList(array('fb_source'=>1,'fb_status'=>$fbStatus,),$Page->firstRow, $Page->listRows);
- }
- $this->assign('page',$show);
- $this->assign('list',$fbList);
- $this->assign('fbStatus',$fbStatus);
- $this->display();
- }
-
- public function sys(){
- $page = I('get.p','1');
- session('page',$page);
- $count = M('Feedback')->where(array('is_delete'=>1,'fb_source'=>2))->count();
- //分页
- $Page = new \Think\Page($count);
- $show = $Page->show();
- $fbList = D('Feedback')->getFbSysList(array('fb_source'=>2),$Page->firstRow, $Page->listRows);
-
- $this->assign('page',$show);
- $this->assign('list',$fbList);
- $this->display();
- }
-
- public function status(){
- $fbId = I('fb_id','');
- if (empty($fbId)){
- $this->error("反馈ID错误",'/admin/feedback/index');
- }
- M('Feedback')->where(array('fb_id'=>$fbId))->save(array('fb_status'=>2));
- $this->success('反馈状态修改成功','/admin/feedback/index');
- }
- }
|