knowledgeModel.php 922 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. class flow_knowledgeClassModel extends flowModel
  3. {
  4. protected function flowchangedata(){
  5. $this->rs['content'] = c('html')->replace($this->rs['content']);
  6. }
  7. protected function flowdatalog($arr)
  8. {
  9. return array('title'=>'');
  10. }
  11. protected function flowbillwhere($uid, $lx)
  12. {
  13. $where = '';
  14. $typeid = (int)$this->rock->post('typeid','0');
  15. $key = $this->rock->post('key');
  16. if($typeid!='0'){
  17. $alltpeid = m('option')->getalldownid($typeid);
  18. $where .= ' and a.`typeid` in('.$alltpeid.')';
  19. }
  20. if($key != ''){
  21. $where.=" and (a.`title` like '%$key%' or b.`name` like '%$key%')";
  22. }
  23. return array(
  24. 'where' => $where,
  25. 'order' => 'a.`sort`,a.`optdt` desc',
  26. 'asqom' => 'a.',
  27. 'table' => '`[Q]'.$this->mtable.'` a left join `[Q]option` b on a.`typeid`=b.`id`',
  28. 'fields'=> 'a.id,a.title,a.adddt,a.optdt,a.optname,b.`name` as typename,a.`sort`'
  29. );
  30. }
  31. }
粤ICP备19079148号