if (empty($_GET['id'])) { sys_msg('invalid param'); } $id = intval($_GET['id']); $auction = auction_info($id, true); if (empty($auction)) { sys_msg($_LANG['auction_not_exist']); } $auction['status'] = $_LANG['auction_status'][$auction['status_no']]; $smarty->assign('bid_user_count', sprintf($_LANG['bid_user_count'], $auction['bid_user_count'])); } $smarty->assign('auction', $auction); /* 赋值时间控件的语言 */ $smarty->assign('cfg_lang', $_CFG['lang']); /* 商品货品表 */ $smarty->assign('good_products_select', get_good_products_select($auction['goods_id'])); /* 显示模板 */ if ($is_add) { $smarty->assign('ur_here', $_LANG['add_auction']); } else { $smarty->assign('ur_here', $_LANG['edit_auction']); } $smarty->assign('action_link', list_link($is_add)); assign_query_info(); $smarty->display('auction_info.htm'); } elseif ($_REQUEST['act'] == 'insert' || $_REQUEST['act'] == 'update') { /* 检查权限 */ admin_priv('auction'); /* 是否添加 */ $is_add = $_REQUEST['act'] == 'insert'; /* 检查是否选择了商品 */
$id = intval($_GET['id']); $exc->drop($id); $url = 'snatch.php?act=query&' . str_replace('act=remove', '', $_SERVER['QUERY_STRING']); ecs_header("Location: {$url}\n"); exit; } elseif ($_REQUEST['act'] == 'edit') { /* 权限判断 */ admin_priv('snatch_manage'); $snatch = get_snatch_info($_REQUEST['id']); $snatch['option'] = '<option value="' . $snatch['goods_id'] . '">' . $snatch['goods_name'] . '</option>'; $smarty->assign('snatch', $snatch); $smarty->assign('ur_here', $_LANG['snatch_edit']); $smarty->assign('action_link', array('text' => $_LANG['02_snatch_list'], 'href' => 'snatch.php?act=list&' . list_link_postfix())); $smarty->assign('form_action', 'update'); /* 商品货品表 */ $smarty->assign('good_products_select', get_good_products_select($snatch['goods_id'])); assign_query_info(); $smarty->display('snatch_info.htm'); } elseif ($_REQUEST['act'] == 'update') { /* 权限判断 */ admin_priv('snatch_manage'); /* 将时间转换成整数 */ $_POST['start_time'] = local_strtotime($_POST['start_time']); $_POST['end_time'] = local_strtotime($_POST['end_time']); /* 处理提交数据 */ if (empty($_POST['snatch_name'])) { $_POST['snatch_name'] = ''; } if (empty($_POST['goods_id'])) { $_POST['goods_id'] = 0; } else {