subscribeModel.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. //订阅的
  3. class flow_subscribeClassModel extends flowModel
  4. {
  5. public $uidfields = 'optid';
  6. public function initModel()
  7. {
  8. }
  9. public function getstatusarr()
  10. {
  11. $barr[] = array('停用','#888888');
  12. $barr[] = array('启用','green');
  13. return $barr;
  14. }
  15. public function flowrsreplace($rs, $lx=0)
  16. {
  17. $ztstatus = $rs['status'];
  18. if($lx==1){
  19. $ztarr = $this->getstatusarr();
  20. $zta = $ztarr[$ztstatus];
  21. $rs['status'] = '<font color="'.$zta[1].'">'.$zta[0].'</font>';
  22. $ors = $this->remindmodel->getone($this->mwhere);
  23. if($ors){
  24. $rs['recename'] = $ors['recename'];
  25. $rs['ratecont'] = $ors['ratecont'];
  26. }
  27. }
  28. if($ztstatus==0 || isempt(arrvalue($rs,'ratecont')))$rs['ishui']=1;
  29. if($lx==2){
  30. unset($rs['suburl']);
  31. unset($rs['suburlpost']);
  32. if(!isempt($rs['dinguser']))$rs['optname'] = $rs['dinguser']; //订阅人
  33. }
  34. if(isset($rs['suburl'])){
  35. $rs['suburl'] = '<div class="wrap" style="">'.$this->rock->jm->base64decode($rs['suburl']).'</div>';
  36. }
  37. if(isset($rs['suburlpost'])){
  38. $rs['suburlpost'] = '<div class="wrap">'.$this->rock->jm->base64decode($rs['suburlpost']).'</div>';
  39. }
  40. return $rs;
  41. }
  42. protected function flowbillwhere($uid, $lx)
  43. {
  44. return array(
  45. 'order' => 'a.id desc',
  46. 'table' => '`[Q]'.$this->mtable.'` a left join `[Q]flow_remind` b on a.id=b.mid and b.`table`=\''.$this->mtable.'\'',
  47. 'fields' => 'a.*,b.recename,b.ratecont,b.optname as dinguser',
  48. 'asqom' => 'a.',
  49. 'orlikefields' => 'b.recename,b.ratecont,b.optname'
  50. );
  51. }
  52. }
粤ICP备19079148号