1
0

mode_collectmAction.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /**
  3. * 此文件是流程模块【collectm.信息收集】对应控制器接口文件。
  4. */
  5. class mode_collectmClassAction extends inputAction{
  6. /**
  7. * 重写函数:保存前处理,主要用于判断是否可以保存
  8. * $table String 对应表名
  9. * $arr Array 表单参数
  10. * $id Int 对应表上记录Id 0添加时,大于0修改时
  11. * $addbo Boolean 是否添加时
  12. * return array('msg'=>'错误提示内容','rows'=> array()) 可返回空字符串,或者数组 rows 是可同时保存到数据库上数组
  13. */
  14. protected function savebefore($table, $arr, $id, $addbo){
  15. $rows['type'] = 2; //必须为2
  16. if($arr['fenlei']=='0'){
  17. $dbs = m('admin');
  18. $rows['leixing'] = $dbs->rows($dbs->gjoin($arr['runrenid'], 'ud', 'where'));
  19. }
  20. return array(
  21. 'rows' => $rows
  22. );
  23. }
  24. /**
  25. * 重写函数:保存后处理,主要保存其他表数据
  26. * $table String 对应表名
  27. * $arr Array 表单参数
  28. * $id Int 对应表上记录Id
  29. * $addbo Boolean 是否添加时
  30. */
  31. protected function saveafter($table, $arr, $id, $addbo){
  32. }
  33. public function beizhustring()
  34. {
  35. return '<span style="color:gray">类型是外部收集,字段类型仅支持文本框,文本域,日期类型,单选框,复选框的类型。</span>';
  36. }
  37. public function createouturlAjax()
  38. {
  39. header("Content-type:image/png");
  40. $urls= $this->rock->getouturl();
  41. $id = (int)$this->get('id');
  42. m('planm')->update('`state`=1', $id);
  43. $url = ''.$urls.'?m=login&a=collect&mid='.$id.'';
  44. $img = c('qrcode')->show($url);
  45. echo $img;
  46. }
  47. }
粤ICP备19079148号