zxcheck.inc.php 851 B

123456789101112131415161718192021222324252627
  1. <?php
  2. global $_GPC, $_W;
  3. $GLOBALS['frames'] = $this->getMainMenu();
  4. $item = pdo_get('zhtc_system', array('uniacid' => $_W['uniacid']));
  5. if (checksubmit('submit')) {
  6. $data['zx_type'] = $_GPC['zx_type'];
  7. $data['is_zx'] = $_GPC['is_zx'];
  8. $data['is_openzx'] = $_GPC['is_openzx'];
  9. $data['is_zxplsh'] = $_GPC['is_zxplsh'];
  10. $data['uniacid'] = $_W['uniacid'];
  11. if ($_GPC['id'] == '') {
  12. $res = pdo_insert('zhtc_system', $data);
  13. if ($res) {
  14. message('添加成功', $this->createWebUrl('zxcheck', 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('zxcheck', array()), 'success');
  22. } else {
  23. message('编辑失败', '', 'error');
  24. }
  25. }
  26. }
  27. include $this->template('web/zxcheck');