| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- Doo::loadCore ( 'db/DooModel' );
- class staff extends DooModel {
-
- public $sid;
- public $username;
- public $passwork;
- public $isadmin;
- public $cid;
- public $othercid;
- public $category;
- public $othercategory;
- public $gender;
- public $qq;
- public $phone;
- public $telephone;
- public $email;
- public $birthday;
- public $position;
- public $avatar;
- public $appDate;
-
- public $_table = 'CLD_staff';
- public $_primarykey = 'sid';
- public $_fields = array ('sid', 'username','birthday','position', 'passwork','isadmin','cid','othercid','appDate','category','othercategory','gender','qq','phone','telephone','email','avatar' );
-
- public function checkUser($uid,$passwork){
- return $this->find ( array ('select'=>'position,birthday,sid,username,isadmin,cid,othercid,category,othercategory,gender,qq,phone,telephone,email,avatar',
- 'where' => "username= '".$uid."' and passwork = '".md5($passwork)."'", 'asArray' => TRUE ) );
- }
-
- public function getStaff(){
-
- return $this->find ( array ('desc' => 'sid', 'asArray' => TRUE ) );
- }
-
- public function getStaffByCid($cid=0) {
- return $this->find ( array ('asc' => 'sid','where' => "cid= '".$cid."'", 'asArray' => TRUE ) );
- }
-
-
- public function getUserById($sid=0) {
- return $this->find ( array ('asc' => 'sid','where' => "sid= '".$sid."'", 'asArray' => TRUE ) );
- }
- public function getUserByIdList($puid){
- return $this->find ( array ('where' => "sid= '".$puid."'", 'asArray' => TRUE ) );
- }
-
- }
- ?>
|