📄 submore.asp
字号:
<%
if session("admin_name")="" then
response.redirect "login.asp"
end if
set rs=server.createobject("adodb.recordset")
%>
<!--#include file="conn.asp"-->
<%if request("action")="pass" then
sql="select * from sub where sub_id="&request("sub_id")
rs.open sql,conn,3,3
user_name=rs("user_name")
sub_number=rs("sub_number")
if rs.eof then
response.write "没有此订单信息,或者此订单已通过管理员确认"
response.end
else
set rs1=server.createobject("adodb.recordset")
sql1="select * from member where user_name='"&user_name&"'"
rs1.open sql1,conn,3,3
set rs2=server.createobject("adodb.recordset")
sql2="select * from basket where sub_number='"&sub_number&"'"
rs2.open sql2,conn,3,3
rs1("user_buymoney")=rs1("user_buymoney")+rs2("hw_cash")
rs1.update
rs("sub_check")=true
rs.update
response.write "<center>"
response.write rs("sub_number")+"号"
response.write "<font color=red>订单已经确认!</font>"
end if
rs.close
elseif request("action")="del" then
sql="select * from sub where sub_id="&request("sub_id")
rs.open sql,conn,3,3
sub_number=rs("sub_number")
rs.delete
rs.update
rs.close
sql="select * from basket where sub_number='"&sub_number&"'"
rs.open sql,conn,3,3
do while not rs.eof
rs.delete
rs.movenext
loop
rs.close
response.write "此订单信息已经删除"
else
sql="select * from sub where sub_id="&request("sub_id")
rs.open sql,conn,3,3
if rs.eof then
response.write "没有此订单信息"
else%><head>
<link href=../css.css rel=STYLESHEET type=text/css>
<title>订单:<%=rs("sub_number")%>详细信息</title>
</head>
<table border="0" width="560" cellspacing="1">
<tr>
<td width="100%">
<table border="0" width="100%" cellspacing="1">
<tr>
<td width="100%" bgcolor="efefef">
<p align="center">定单号:<font color=blue><%=rs("sub_number")%>
<%sub_number=rs("sub_number")%>
</font> 付款方式:<font color=blue><%=rs("qian")%></font>
</td>
</tr>
<tr>
<td width="100%">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#FFFFFF" colspan="2">订购日期:<b><%=rs("sub_date")%></b></td>
<td bgcolor="#FFFFFF" colspan="2">订货人:<b><%=rs("user_name")%></b></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" colspan="2">收货人:<b><%=rs("sub_to")%></b></td>
<td bgcolor="#FFFFFF" colspan="2">收货地址:<b><%=rs("sub_adds")%></b></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" colspan="2">电话:<b><%=rs("sub_tel")%></b></td>
<td bgcolor="#FFFFFF" colspan="2">E-mail:<b><%=rs("sub_mail")%></b></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" colspan="4" height="15">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="16%">备注信息:</td>
<td width="84%"><b><%=rs("other")%></b></td>
</tr>
</table>
</td>
</tr>
<%rs.close%>
<tr bgcolor="#f0f0f0">
<td colspan="4">
<p align="center"><font color="#FF0000">订购货物列表</font></p>
</td>
</tr>
<tr bgcolor="#f7f7f7">
<td width="29%">货物名称</td>
<td width="12%">单价</td>
<td width="19%">数量</td>
<td width="40%">合计</td>
</tr>
<%sql="select * from basket where sub_number='"&sub_number&"'"
rs.open sql,conn,3,3
if rs.eof then
response.write "没有此订单信息"
response.end
else
do while not rs.eof%>
<tr>
<td width="29%" bgcolor="#FFFFFF"><%=rs("hw_name")%></td>
<td width="12%" bgcolor="#FFFFFF"> <%=rs("hw_cash")%> 元</td>
<td width="19%" bgcolor="#FFFFFF"><%=rs("basket_count")%></td>
<td width="40%" bgcolor="#FFFFFF"><font color=red> <%=rs("hw_cash")*rs("basket_count")%>
</font>元</td>
<%totalcash=totalcash+rs("hw_cash")*rs("basket_count")%>
</tr>
<%rs.movenext
loop
%>
<tr>
<td bgcolor="#FFFFFF" colspan="3">总计</td>
<td width="40%" bgcolor="#FFFFFF"><font color=red><%=totalcash%></font>元</td>
</tr>
<%end if
rs.close%>
<tr>
<td bgcolor="#FFFFFF" colspan="4">
<p align="center"><a href="submore.asp?sub_id=<%=request("sub_id")%>&action=pass">订单确认</a>
<a href="submore.asp?sub_id=<%=request("sub_id")%>&action=del">删除此订单</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%end if
end if
set rs=nothing
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -