| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- Doo::loadCore ( 'db/DooModel' );
- class L_category extends DooModel {
-
- public $cid;
- public $title;
- public $defult;
- public $districtid;
-
- public $_table = 'CLD_L_category';
- public $_primarykey = 'cid';
- public $_fields = array ('cid', 'title','defult','districtid');
-
- public function checkUser($uid,$passwork){
- return $this->find ( array ('where' => "uid= '".$uid."' and passwork = '".addslashes($passwork)."'", 'asArray' => TRUE ) );
- }
-
- public function getCategoryById($cid=0,$othercid=""){
- if(!empty($othercid))
- return $this->find ( array ('where' => "cid in ( ".$cid.",".$othercid.") ", 'asArray' => TRUE ) );
- else
- return $this->find ( array ('where' => "cid= '".$cid."' ", 'asArray' => TRUE ) );
-
- }
-
- public function getCategory() {
- return $this->find ( array ('asc' => 'cid', 'asArray' => TRUE ) );
- }
- public function getUserByIdList($puid){
- return $this->find ( array ('where' => "uid= '".$puid."'", 'asArray' => TRUE ) );
- }
-
- }
- ?>
|