daibanModel.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. class agent_daibanClassModel extends agentModel
  3. {
  4. public function initModel()
  5. {
  6. $this->settable('flow_bill');
  7. }
  8. public function gettotal()
  9. {
  10. $stotal = $this->getdbtotal($this->adminid);
  11. $titles = '';
  12. return array('stotal'=>$stotal,'titles'=> $titles);
  13. }
  14. private function getdbtotal($uid)
  15. {
  16. $stotal = m('flowbill')->daibanshu($uid);
  17. return $stotal;
  18. }
  19. protected function agenttotals($uid)
  20. {
  21. return array(
  22. 'daiban' => $this->getdbtotal($uid)
  23. );
  24. }
  25. protected function agentdata($uid, $lx)
  26. {
  27. $atype = $this->agentnum.'_'.$lx;
  28. $dbss = m('flowbill');
  29. $arr = $dbss->getrecord($uid, $atype, $this->page, $this->limit, 0);
  30. if($atype=='daiban_daib'){
  31. $rows = $arr['rows'];
  32. if($rows){
  33. $arr['rows'] = $rows;
  34. }
  35. }
  36. $sdar = $this->db->getall('select `modeid` from `[Q]flow_bill` where '.$dbss->nowwhere.' group by `modeid`');
  37. $idss = '0';
  38. foreach($sdar as $k=>$rs)$idss.=','.$rs['modeid'].'';
  39. $arr['modearr'] = m('mode')->getmodearr('and `id` in('.$idss.')');
  40. return $arr;
  41. }
  42. }
粤ICP备19079148号