sms.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. Doo::loadCore ( 'db/DooModel' );
  3. class sms extends DooModel {
  4. public $sid;
  5. public $title;
  6. public $content;
  7. public $signature;
  8. public $client;
  9. public $illegal;
  10. public $status;
  11. public $kind;
  12. public $mark;
  13. public $tag;
  14. public $districtId;
  15. public $category;
  16. public $staffId;
  17. public $staffName;
  18. public $errorInfo;
  19. public $date;
  20. public $_table = 'CLD_sms';
  21. public $_primarykey = 'sid';
  22. public $_fields = array ('sid', 'title','content','signature', 'client','illegal','status','kind','mark','tag','districtId','category','staffId','staffName','errorInfo','date' );
  23. public function checkUser($uid,$passwork){
  24. return $this->find ( array ('select'=>'sid,username,isadmin,cid,othercid,category,othercategory,gender,qq,phone,telephone,email,avatar','where' => "username= '".$uid."' and passwork = '".addslashes($passwork)."'", 'asArray' => TRUE ) );
  25. }
  26. public function getStaff(){
  27. return $this->find ( array ('desc' => 'sid', 'asArray' => TRUE ) );
  28. }
  29. public function getStaffByCid($cid=0) {
  30. return $this->find ( array ('asc' => 'sid','where' => "cid= '".$cid."'", 'asArray' => TRUE ) );
  31. }
  32. public function getUserById($sid=0) {
  33. return $this->find ( array ('asc' => 'sid','where' => "sid= '".$sid."'", 'asArray' => TRUE ) );
  34. }
  35. public function getUserByIdList($puid){
  36. return $this->find ( array ('where' => "sid= '".$puid."'", 'asArray' => TRUE ) );
  37. }
  38. }
  39. ?>