call.inc.php 738 B

123456789101112131415161718192021222324
  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['callProportion'] = $_GPC['callProportion'];
  7. $data['uniacid'] = $_W['uniacid'];
  8. if ($_GPC['id'] == '') {
  9. $res = pdo_insert('zhtc_system', $data);
  10. if ($res) {
  11. message('添加成功', $this->createWebUrl('call', array()), 'success');
  12. } else {
  13. message('添加失败', '', 'error');
  14. }
  15. } else {
  16. $res = pdo_update('zhtc_system', $data, array('id' => $_GPC['id']));
  17. if ($res) {
  18. message('编辑成功', $this->createWebUrl('call', array()), 'success');
  19. } else {
  20. message('编辑失败', '', 'error');
  21. }
  22. }
  23. }
  24. include $this->template('web/call');