/** * 登录以及权限验证, 重写了父类方法 * @override */ function _auth_check() { parent::_auth_check(); if ($this->user_type !== 'teacher') { $this->_load_result('您没有查看该页面的权限', $this->data['url']['login'], '请先登录!'); } }
/** * 登录以及权限验证, 重写了父类方法 * @override */ function _auth_check() { parent::_auth_check(); if ($this->user_type !== 'admin') { $this->_load_result('您不是管理员,没有查看该页面的权限', $this->data['url']['login'], '请先登录!'); return FALSE; } return TRUE; }