From b2328cf225c592b074a91a0ff8eaa345f72579f9 Mon Sep 17 00:00:00 2001 From: Martin Zhou <1009465756@qq.com> Date: Mon, 25 Jan 2016 14:10:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DHallController.class.php?= =?UTF-8?q?=E4=B8=AD=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit $Page变量未定义 --- .../Home/Controller/HallController.class.php | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/Application/Home/Controller/HallController.class.php b/Application/Home/Controller/HallController.class.php index b45e185..f649a95 100644 --- a/Application/Home/Controller/HallController.class.php +++ b/Application/Home/Controller/HallController.class.php @@ -15,21 +15,13 @@ class HallController extends Controller{ public function index($key="") { - if($key == ""){ - $model = M('member'); - }else{ - $where['title'] = array('like',"%$key%"); - $where['name'] = array('like',"%$key%"); - $where['_logic'] = 'or'; - $model = M('member')->where($where); - } - - $user = $model->limit($Page->firstRow.','.$Page->listRows)->where($where)->order('jifen ASC')->where('type=1')->select(); - $xuhao = 1; - $tmodel= M('setting'); - $title = $tmodel->where('id=1')->select(); + $xuhao = 1; + $model = M('member'); + $tmodel= M('setting'); + $title = $tmodel->where('id=1')->select(); + $user = $model->order('jifen ASC')->where('type=1')->select(); // fix bug issued by phith0n 13:59 2016/1/25 $this->assign('title', $title); - $this -> assign('xuhao',$xuhao); + $this ->assign('xuhao',$xuhao); $this->assign('user',getSortedCategory($user)); $this->display(); }