addyellowset.inc.php 836 B

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