finfybxModel.php 884 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. class flow_finfybxClassModel extends flowModel
  3. {
  4. public function flowrsreplace($rs, $lx=0)
  5. {
  6. if($rs['id']==0)return $rs;
  7. $jzid = arrvalue($rs,'jzid');
  8. if($jzid>0 && $lx==1){
  9. $to = m('finjibook')->rows($jzid);//判断记录存在嘛
  10. if($to==0){
  11. $jzid = 0;
  12. $this->update('`jzid`=0', $rs['id']);
  13. }
  14. }
  15. if($jzid>0){
  16. $url = $this->getxiangurl('finjizhi', $jzid, 'auto');
  17. $rs['jzid'] = '<a href="javascript:;" onclick="js.open(\''.$url.'\')">已生成</a>';
  18. }else if($jzid=='-1'){
  19. $rs['jzid'] = '<font color=#aaaaaa>不需要</font>';
  20. }else{
  21. $rs['jzid'] = '';
  22. }
  23. return $rs;
  24. }
  25. public function flowatypearr($atypea)
  26. {
  27. foreach($atypea as $k=>$rs){
  28. if($rs['num']=='alldjz'){
  29. $atypea[$k]['stotal'] = $this->rows('`type`=0 and `status`=1 and `jzid`=0');
  30. }
  31. }
  32. return $atypea;
  33. }
  34. }
粤ICP备19079148号