XDeode = new XDeode ( 9 ); Doo::loadModel ( 'cld/staff_cld' ); $this->staff = new staff_cld (); } public function GetStaffCategoryId($categoryId=0){ if (!is_numeric($categoryId)){ $categoryId=$this->XDeode->decode($categoryId); } $list=$this->staff->GetCategoryId($categoryId); return $list; } //验证项目管理登陆 public function authLoginCM($data=array()){ //1.获得账号 if(empty($data)){ throw new Exception("参数错误"); } $staffInfo=$this->staff->GetName($data['staffName']); if(empty($staffInfo)){ throw new Exception("员工不存在"); } $password=md5($data['password']); if ($password!=$staffInfo['passwork']){ throw new Exception("密码不正确"); } return $staffInfo; } } ?>