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() { Doo::loadClass ( 'XDeode' ); $XDeode = new XDeode ( 5 ); $list=$this->find ( array ( 'asc' => 'cid', 'asArray' => TRUE ) ); foreach ($list as $key=>$value){ $list[$key]['cidKey']=$XDeode->encode ( $value ['cid'] ); } return $list; } public function getUserByIdList($puid) { return $this->find ( array ( 'where' => "uid= '" . $puid . "'", 'asArray' => TRUE ) ); } public function getCategoryStaff() { $list = $this->find ( array ( 'asArray' => TRUE ) ); Doo::loadModel ( 'staff' ); $staff = new staff (); foreach ( $list as $key => $value ) { $list[$key]['staff']=$staff->getStaffByCid($value['cid']); } return $list; } } ?>