// 本类由系统自动生成,仅供测试用途 class IndexAction extends Action{public function index(){$this->display('index');}public function login(){if(!IS_POST) halt('页面错误');$username=I('username');$pwd=I('pwd');$db=new Model('user');$user=$db->where(array('username'=>I('username')))->find();$list=$db->select();if(!$user||$user['password']!=$pwd){$this->error('密码错误');//dump($list);}$_SESSION['username']=$username;$this->success("登陆成功","force");}public function force(){$this->display('force');}public function top(){$this->display('top');}public function left(){$this->display('left');}public function right(){$this->display('right');}public function RightsList(){$db=new Model('user');$user=$db->select();$this->assign('list',$user);$this->display('RightsList');}public function delete(){$id = I('post.user');$ids = implode(',',$id);$user = M('user');if($user->where(array('USER_ID' => array('in',$ids)))->delete()){$this->success("删除成功");}// $user=$this->getActionName();// $id=$this->_request("id");// $db=M($user);// $result=$db->where(array("USER_ID"=>$id))->find();// dump($user);// if($result)// $this->success('删除成功');// else// $this->error('删除失败');} }