📄 order_edit.asp
字号:
<%@ LANGUAGE = VBScript %>
<!--#INCLUDE FILE="include/manager.asp" -->
<% REM ######################################################################### %>
<% REM %>
<% REM Order_EDIT.ASP %>
<% REM 订单编辑 %>
<% REM %>
<% REM Copyright (c) 1999-2000 Epro computer System. All rights reserved. %>
<% REM %>
<% REM ######################################################################### %>
<% REM header: %>
<% pageTitle = "订单状态修改" %>
<%functionno=3%>
<!--#INCLUDE FILE="checkuser.asp" -->
<%
dim errorList
order_id=checknum(Request("order_id"),16)
if isnull(order_id) then
errorList="没有该订单。<br>"
else
cmdTemp.CommandText = "SELECT * FROM Shop_order WHERE order_id=" & order_id
Set rstOrder = Server.CreateObject("ADODB.Recordset")
rstOrder.Open cmdTemp, , adOpenKeyset, adLockReadOnly
if rstOrder.RecordCount>0 then
order_id= rstOrder("order_id")
status=rstOrder("status")
orderdate=rstOrder("date_entered")
ship_to_name=rstOrder("sname")
ship_to_street=rstOrder("sstreet")
ship_to_city=rstOrder("scity")
ship_to_state=rstOrder("sprovince")
ship_to_phone=rstOrder("sphone")
ship_to_email=rstOrder("semail")
ship_to_zip=rstOrder("szip")
bill_to_name=rstOrder("bname")
bill_to_street=rstOrder("bstreet")
bill_to_city=rstOrder("bcity")
bill_to_state=rstOrder("bprovince")
bill_to_method=rstOrder("paymode")
bill_to_phone=rstOrder("bphone")
bill_to_email=rstOrder("bemail")
bill_to_zip=rstOrder("bzip")
description=rstOrder("description")
rstOrder.Close
select case bill_to_method
case "1"
bill_to_method="国际汇兑"
case "2"
bill_to_method="西联汇款"
end select
if ship_to_state="北京" then
ship_fee=5
else
ship_fee=10
end if
Set recordSet = Server.CreateObject("ADODB.Recordset")
cmdTemp.CommandText = "SELECT * FROM order_item WHERE order_id = " & order_id
recordSet.Open cmdTemp, , adOpenKeyset, adLockReadOnly
else
errorList="没有该订单。<br>"
end if
end if
%>
<% if errorList="" then%>
<HTML>
<HEAD>
<TITLE> <% = pageTitle %> </TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<LINK REL=stylesheet HREF="manager.css" TYPE="text/css">
<% stdListRange = 15 %>
</HEAD>
<body topmargin="0" >
<!--#INCLUDE FILE = "include/header.asp" -->
<table border="0" width="770" height="423" cellspacing="0" cellpadding="0">
<tr>
<td width="140" valign="top" >
<!--#INCLUDE FILE = "include/menu.asp" -->
</td>
<td width="1" bgcolor="#000000" ></td>
<td width="650" height="423" align="center" valign="top" class="main">
<br>
<table border="0" width="600" align="center">
<tr>
<td align="middle" bgColor=<%=tdcolor4%> colSpan="4" width="600" height=25>
<p align="center"><b>订单内容</b></p>
</td>
</tr>
<tr bgColor=<%=thcolor4%>>
<td width="100"><font color="#000000">商品名称</font></td>
<td width="200"><font color="#000000">数量</font></td>
<td width="100"><font color="#000000">单价</font></td>
<td width="200"><font color="#000000">小计</font></td>
</tr>
<% For i = 1 to recordSet.RecordCount
If recordSet.EOF then exit for
%>
<tr>
<td bgColor=<%=tdleft4%> width="100"><% =recordSet("name").value %></td>
<td bgColor=<%=tdleft4%> width="200"><% =recordSet("quantity").value %></td>
<td bgColor=<%=tdleft4%> width="100">$<% =recordSet("adjusted_price").value %></td>
<%
quantity=recordSet("quantity").value
adjusted_price=recordSet("adjusted_price").value
subtotal_price=formatnumber(quantity)*formatnumber(adjusted_price,2)
total_price=total_price+subtotal_price
%>
<td bgColor=<%=tdleft4%> width="200">$<% =subtotal_price %></td>
</tr>
<% recordSet.MoveNext%>
<% next %>
<tr>
<td width="100"> </td>
<td width="200"> </td>
<td bgColor=<%=tdleft4%> width="100">合计</td>
<td bgColor=<%=tdleft4%> width="200">$<% =total_price %></td>
</tr>
<tr>
<td width="100"> </td>
<td width="200"> </td>
<td bgColor=<%=tdleft4%> width="100">运费</td>
<td bgColor=<%=tdleft4%> width="200">$<% =ship_fee %></td>
</tr>
<tr>
<td width="100"> </td>
<td width="200"> </td>
<td bgColor=<%=tdleft4%> width="100">总计</td>
<td bgColor=<%=tdleft4%> width="200">$<% =total_price+ship_fee %></td>
</tr>
</table>
<table width="600" align="center">
<tr>
<td bgColor=<%=tdcolor4%> height="28" width="100"><font color="#0000FF">付款方式:</font></td>
<td bgColor=<%=tdcolor4%> colspan=4><font color="#000000" ><%=bill_to_method%></font></td>
</tr>
<tr>
<td bgColor=<%=tdleft4%> height="28" width="100"><font color="#0000FF">收件人姓名:</font></td>
<td bgColor=<%=tdleft4%> height="28" width="200"><font color="#000000" ><%=ship_to_name%></font></td>
<td bgColor=<%=tdleft4%> height="28" width="100"><font color="#0000FF">付款人姓名:</font></td>
<td bgColor=<%=tdleft4%> height="28" width="200"><font color="#000000" ><%=bill_to_name%></font></td>
</tr>
<tr>
<td bgColor=<%=tdleft4%> height="28" width="100"><font color="#0000FF">收件人位置:</font></td>
<td bgColor=<%=tdleft4%> height="28" width="200"><font color="#000000" ><%=ship_to_state%></font></td>
<td bgColor=<%=tdleft4%> height="28" width="100"><font color="#0000FF">付款人位置:</font></td>
<td bgColor=<%=tdleft4%> height="28" width="200"><font color="#000000" ><%=bill_to_state%></font></td>
</tr>
<tr>
<td bgColor=<%=tdleft4%> height="28" width="100"><font color="#0000FF">收件人城市:</font></td>
<td bgColor=<%=tdleft4%> height="28" width="200"><font color="#000000" ><%=ship_to_city%></font></td>
<td bgColor=<%=tdleft4%> height="28" width="100"><font color="#0000FF">付款人城市:</font></td>
<td bgColor=<%=tdleft4%> height="28" width="200"><font color="#000000" ><%=bill_to_city%></font></td>
</tr>
<tr>
<td bgColor=<%=tdleft4%> height="28" width="100"><font color="#0000FF">收件人地址:</font></td>
<td bgColor=<%=tdleft4%> height="28" width="200"><font color="#000000" ><%=ship_to_street%></font></td>
<td bgColor=<%=tdleft4%> height="28" width="100"><font color="#0000FF">付款人地址:</font></td>
<td bgColor=<%=tdleft4%> height="28" width="200"><font color="#000000" ><%=bill_to_street%></font></td>
</tr>
<tr>
<td bgColor=<%=tdleft4%> height="28" width="100"><font color="#0000FF">收件人电话:</font></td>
<td bgColor=<%=tdleft4%> height="28" width="200"><font color="#000000" ><%=ship_to_phone%></font></td>
<td bgColor=<%=tdleft4%> height="28" width="100"><font color="#0000FF">付款人电话:</font></td>
<td bgColor=<%=tdleft4%> height="28" width="200"><font color="#000000" ><%=bill_to_phone%></font></td>
</tr>
<tr>
<td bgColor=<%=tdleft4%> height="28" width="100"><font color="#0000FF">收件人邮政编码:</font></td>
<td bgColor=<%=tdleft4%> height="28" width="200"><font color="#000000" ><%=ship_to_zip%></font></td>
<td bgColor=<%=tdleft4%> height="28" width="100"><font color="#0000FF">付款人邮政编码:</font></td>
<td bgColor=<%=tdleft4%> height="28" width="200"><font color="#000000" ><%=bill_to_zip%></font></td>
</tr>
<tr>
<td bgColor=<%=tdleft4%> height="28" width="100"><font color="#0000FF">收件人Email:</font></td>
<td bgColor=<%=tdleft4%> height="28" width="200"><font color="#000000" ><%=ship_to_email%></font></td>
<td bgColor=<%=tdleft4%> height="28" width="100"><font color="#0000FF">付款人Email:</font></td>
<td bgColor=<%=tdleft4%> height="28" width="200"><font color="#000000" ><%=bill_to_email%></font></td>
</tr>
<tr>
<td bgColor=<%=tdleft4%> height="28" width="100"><font color="#0000FF">送货要求:</font></td>
<td bgColor=<%=tdleft4%> height="28" width="200"><font color="#000000" ><%=description%></font></td>
<form action="xt_data_add_update.asp" METHOD="POST">
<td bgColor=<%=tdleft4%> height="28" width="100"><font color="#0000FF">状态:</font></td>
<td bgColor=<%=tdleft4%> height="28" width="200"><select name="status">
<%if status="未交易" then %> <option selected>未交易<%else%><option>未交易<%end if%>
<%if status="已确认" then %> <option selected>已确认<%else%><option>已确认<%end if%>
<%if status="已交易" then %> <option selected>已交易<%else%><option>已交易<%end if%>
<%if status="作废" then %> <option selected>作废<%else%><option>作废<%end if%>
</select>
</td>
</tr>
</table>
<table cellpadding=0 cellspacing=0 border=0 width="600" align="center">
<tr>
<td align="right">
<input type="hidden" name="order_id" value=<%=order_id%>>
<INPUT TYPE="HIDDEN" NAME="op" VALUE="update">
<INPUT TYPE="HIDDEN" NAME="type" VALUE="order">
<INPUT TYPE="HIDDEN" NAME="goto" VALUE="order_list.asp">
<INPUT TYPE="submit" value="修改" id=submit1 name=submit1>
</FORM>
</td>
<td align="left">
<%' <FORM METHOD="POST" ACTION="order_delete.asp" id=form2 name=form2> %>
<%' <INPUT TYPE="HIDDEN" NAME="order_id" VALUE="<% = order_id "> %>
<%' <INPUT TYPE="SUBMIT" VALUE="删除" id=SUBMIT2 name=SUBMIT2>%>
<%' </FORM> %>
</td>
</tr>
</table>
</td>
</table>
<% REM footer: %>
<!--#INCLUDE FILE="include/copyright.asp" -->
</body>
</html>
<%else%>
<!--#INCLUDE FILE="error.asp" -->
<%end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -