<?php defined('IN_DESTOON') or exit('Access Denied'); $TYPE = get_type('gift', 1); require MD_ROOT . '/gift.class.php'; $do = new gift(); $menus = array(array('添加礼品', '?moduleid=' . $moduleid . '&file=' . $file . '&action=add'), array('礼品列表', '?moduleid=' . $moduleid . '&file=' . $file), array('订单列表', 'javascript:Dwidget(\'?moduleid=' . $moduleid . '&file=' . $file . '&action=order\', \'订单管理\');'), array('更新地址', '?moduleid=' . $moduleid . '&file=' . $file . '&action=update'), array('礼品分类', 'javascript:Dwidget(\'?file=type&item=' . $file . '\', \'礼品分类\');'), array('模块设置', '?moduleid=' . $moduleid . '&file=setting#' . $file)); if ($_catids || $_areaids) { require DT_ROOT . '/admin/admin_check.inc.php'; } switch ($action) { case 'add': if ($submit) { if ($do->pass($post)) { $do->add($post); dmsg('添加成功', $forward); } else { msg($do->errmsg); } } else { foreach ($do->fields as $v) { isset(${$v}) or ${$v} = ''; } $groupid = '5,6,7'; $addtime = timetodate($DT_TIME); $menuid = 0; include tpl('gift_edit', $module); } break; case 'edit': $itemid or msg();