C_tooltip.php 980 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. Doo::loadCore ( 'db/DooModel' );
  3. class C_tooltip extends DooModel {
  4. public $tip;
  5. public $sid;
  6. public $cateid;
  7. public $name;
  8. public $cid;
  9. public $_table = 'CLD_C_tooltip';
  10. public $_primarykey = 'tip';
  11. public $_fields = array ('tip', 'sid','cateid','name','cid');
  12. public function checkUser($uid,$passwork){
  13. return $this->find ( array ('where' => "uid= '".$uid."' and passwork = '".addslashes($passwork)."'", 'asArray' => TRUE ) );
  14. }
  15. public function getCategoryById($cid=0,$othercid=""){
  16. if(!empty($othercid))
  17. return $this->find ( array ('where' => "cid in ( ".$cid.",".$othercid.") ", 'asArray' => TRUE ) );
  18. else
  19. return $this->find ( array ('where' => "cid= '".$cid."' ", 'asArray' => TRUE ) );
  20. }
  21. public function getCategory() {
  22. return $this->find ( array ('asc' => 'cid', 'asArray' => TRUE ) );
  23. }
  24. public function getUserByIdList($puid){
  25. return $this->find ( array ('where' => "uid= '".$puid."'", 'asArray' => TRUE ) );
  26. }
  27. }
  28. ?>