thinkphp问答系统后台的列表展示
要求如下:
管理中心
15) 管理员才可进入
16) 可禁止用户发言
17) 对问题/回答进行删除
目前代码如下:
function index(){<br /> $goods= D('question');<br /> $count = $goods->count();<br /> $Page = new \Think\Page($count,6);<br /><br /> $list = $goods->table('ask.question question, ask.answer answer,ask.user user')->where('question.id = answer.tqu and question.userid= user.id')->field('question.id as quid,question.text as qutext,question.addtext as quadd, question.userid as quuserid,answer.text as antext,answer.addtext as answeradd, answer.userid as anuserid,answer.up,answer.down,user.name')->order(' question.id asc' )->limit($Page->firstRow.','.$Page->listRows)->select();<br /><br /><br /> $show = $Page->show();<br /><br /> $this->assign('list',$list);<br /> var_dump($list);<br /> $this->assign('page',$show);<br /> $this->display();