instructions.inc.php 1.1 KB

123456789101112131415161718192021222324252627
  1. <?php
  2. global $_GPC, $_W;
  3. $GLOBALS['frames'] = $this->getMainMenu();
  4. $item=pdo_get('zhtc_system',array('uniacid'=>$_W['uniacid']));
  5. // print_r($item);die;
  6. if(checksubmit('submit')){
  7. //$data['rz_xuz']=html_entity_decode($_GPC['rz_xuz']);
  8. $data['ft_xuz']=html_entity_decode($_GPC['ft_xuz']);
  9. $data['pc_xuz']=html_entity_decode($_GPC['pc_xuz']);
  10. $data['uniacid']=$_W['uniacid'];
  11. if($_GPC['id']==''){
  12. $res=pdo_insert('zhtc_system',$data);
  13. if($res){
  14. message('添加成功',$this->createWebUrl('instructions',array()),'success');
  15. }else{
  16. message('添加失败','','error');
  17. }
  18. }else{
  19. $res = pdo_update('zhtc_system', $data, array('id' => $_GPC['id']));
  20. if($res){
  21. message('编辑成功',$this->createWebUrl('instructions',array()),'success');
  22. }else{
  23. message('编辑失败','','error');
  24. }
  25. }
  26. }
  27. include $this->template('web/instructions');