修复HallController.class.php中的BUG

$Page变量未定义
This commit is contained in:
Martin Zhou
2016-01-25 14:10:20 +08:00
parent e624b87b74
commit b2328cf225

View File

@@ -15,21 +15,13 @@ class HallController extends Controller{
public function index($key="") 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; $xuhao = 1;
$model = M('member');
$tmodel= M('setting'); $tmodel= M('setting');
$title = $tmodel->where('id=1')->select(); $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('title', $title);
$this -> assign('xuhao',$xuhao); $this ->assign('xuhao',$xuhao);
$this->assign('user',getSortedCategory($user)); $this->assign('user',getSortedCategory($user));
$this->display(); $this->display();
} }