12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- class staff_service {
- private $staff;
- private $XDeode;
- function __construct() {
- Doo::loadClass ( 'XDeode' );
- $this->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;
- }
-
-
-
- }
- ?>
|