dlinzxcheckinfo.inc.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. global $_GPC, $_W;
  3. $action = 'start';
  4. $GLOBALS['frames'] = $this->getNaveMenu($_COOKIE['cityname'], $action);
  5. $type=pdo_getall('zhtc_zx_type',array('uniacid'=>$_W['uniacid']));
  6. $info=pdo_get('zhtc_zx',array('id'=>$_GPC['id']));
  7. if($info['imgs']){
  8. if(strpos($info['imgs'],',')){
  9. $imgs= explode(',',$info['imgs']);
  10. }else{
  11. $imgs=array(
  12. 0=>$info['imgs']
  13. );
  14. }
  15. }
  16. if(checksubmit('submit')){
  17. $data['type_id']=$_GPC['type_id'];
  18. $data['title']=$_GPC['title'];
  19. $data['content']=html_entity_decode($_GPC['content']);
  20. $data['time']=date('Y-m-d H:i:s');
  21. $data['uniacid']=$_W['uniacid'];
  22. $data['cityname']=$_COOKIE['cityname'];
  23. if($_GPC['imgs']){
  24. $data['imgs']=implode(",",$_GPC['imgs']);
  25. }else{
  26. $data['imgs']='';
  27. }
  28. $res=pdo_update('zhtc_zx',$data,array('id'=>$_GPC['id']));
  29. if($res){
  30. message('编辑成功!', $this->createWebUrl2('dlinzxcheckmanager'), 'success');
  31. }else{
  32. message('编辑失败!','','error');
  33. }
  34. }
  35. include $this->template('web/dlinzxcheckinfo');