flowModel.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. class agent_flowClassModel extends agentModel
  3. {
  4. public function initModel()
  5. {
  6. $this->settable('flow_bill');
  7. }
  8. public function gettotal()
  9. {
  10. $stotal = $this->getwdtotal($this->adminid);
  11. $titles = '';
  12. return array('stotal'=>$stotal,'titles'=> $titles);
  13. }
  14. private function getwdtotal($uid)
  15. {
  16. $stotal = m('flowbill')->applymywgt($uid);;
  17. return $stotal;
  18. }
  19. protected function agentdata($uid, $lx)
  20. {
  21. if($lx=='moreapply'){
  22. $viewobj = m('view');
  23. $applyarr = m('mode')->getmoderows($uid,'and islu=1');
  24. $modearr = array();
  25. $otyle = '';
  26. $oi = 0;
  27. foreach($applyarr as $k=>$rs){
  28. if(!$viewobj->isadd($rs, $this->adminid))continue;
  29. if($otyle!=$rs['type']){
  30. $oi = 0;
  31. $modearr[] = array(
  32. 'showtype' => 'line',
  33. 'title' => $rs['type']
  34. );
  35. }
  36. $otyle = $rs['type'];
  37. $oi++;
  38. $modearr[]=array('modenum'=>$rs['num'],'type'=>'applybill','name'=>$rs['name'],'title'=>''.$oi.'.'.$rs['name']);
  39. }
  40. $arr['rows']= $modearr;
  41. return $arr;
  42. }
  43. $arr = m('flowbill')->getrecord($uid, $this->agentnum.'_'.$lx, $this->page, $this->limit);
  44. $modearr= array();
  45. if($this->loadci==1){
  46. $modearr = m('mode')->getmodemyarr($uid);
  47. }
  48. return array(
  49. 'rows' => $arr,
  50. 'modearr' => $modearr,
  51. );
  52. }
  53. protected function agenttotals($uid)
  54. {
  55. return array(
  56. 'mywtg' => $this->getwdtotal($uid)
  57. );
  58. }
  59. }
粤ICP备19079148号