?? myorder.asp
字號:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
'/*----------------------------------------------
'項目名: 東區(qū)網(wǎng)上書店(ASP課程設計)
'開始日期: 2003年12月18日18:00
'完成日期: 2003年12月27日53:00
'最后修改: -
'制作地點: 科干東區(qū)宿舍
'程序制作: 陳文杰
'聯(lián)系方式: QQ:168909
'
'
' Email:Cwj@edu.21cn.com
'
' *未經(jīng)同意本程序不得使用!*
'
' 請尊重他人勞動成果,保留上面信息!
'-----------------------------------------------*/
%><!--#include file="manage/inc/config.asp"-->
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/chk.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>東區(qū)網(wǎng)上書店</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<!--#include file="head.htm"-->
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="219" align="left" valign="top"><!--#include file="uleft.asp"--> <br></td><td width="561" align="left" valign="top">
<br> <table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><img src="images/w.gif" width="18" height="18"></td>
<td style="color:#415373">我的訂單</td>
</tr>
</table> <br> <table border="0" cellpadding="0" cellspacing="0" align="center" height="0" width="100%">
<tr>
<td>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1">
<tr align="center">
<td><font color="#FF6600"><b><font color="#000000">我 的 訂 單</font></b></font></td>
</tr>
<tr>
<td align="right">
<div align="right"><font color="#FF6600"><b></b></font></div> <select name="state" onChange="var jmpURL=this.options[this.selectedIndex].value ; if(jmpURL!='') {window.location=jmpURL;} else {this.selectedIndex=0 ;}" >
<option value="myorder.asp?state=0" selected>--請選擇查詢狀態(tài)--</option>
<option value="myorder.asp?state=0" >全部訂單狀態(tài)</option>
<option value="myorder.asp?state=1" >未作任何處理</option>
<option value="myorder.asp?state=2" >用戶已經(jīng)劃出款</option>
<option value="myorder.asp?state=3" >服務商已經(jīng)收到款</option>
<option value="myorder.asp?state=4" >服務商已經(jīng)發(fā)貨</option>
<option value="myorder.asp?state=5" >用戶已經(jīng)收到貨</option>
</select></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="2" >
<tr align="center">
<td >訂單號</td>
<td >合計金額</td>
<td >收貨人</td>
<td colspan="2" >訂貨人</td>
<td >日期</td>
<td >狀態(tài)</td>
</tr>
<%set rs=server.CreateObject("adodb.recordset")
dim state
state=request.QueryString("state")
if state=0 or state="" then
select case state
case "0"
rs.open "select distinct(goods),realname,actiondate,recepit,deliverymethord,paymethord,state from orders where username='"&request.cookies(cookieName)("username")&"' and state<6 order by actiondate desc",conn,1,1
case ""
rs.open "select distinct(goods),realname,actiondate,recepit,deliverymethord,paymethord,state from orders where username='"&request.cookies(cookieName)("username")&"' and state<5 order by actiondate desc",conn,1,1
end select
else
rs.open "select distinct(goods),realname,actiondate,recepit,deliverymethord,paymethord,state from orders where username='"&request.cookies(cookieName)("username")&"' and state="&state&" order by actiondate",conn,1,1
end if
do while not rs.eof
%>
<tr bgcolor=#ffffff align="center">
<td ><a href="chkorder.asp?dan=<%=trim(rs("goods"))%>"><%=trim(rs("goods"))%></a></td>
<td>
<%
dim shop,rs2
set rs2=server.CreateObject("adodb.recordset")
rs2.open "select * from delivery where deliveryid="&rs("deliverymethord"),conn,1,1
set shop=server.CreateObject("adodb.recordset")
shop.open "select sum(paid) as paid from orders where goods='"&trim(rs("goods"))&"' ",conn,1,1
response.write "<font color=#FF6600>"&round(shop("paid")+rs2("fee"),1)&"元</font>"
shop.close
set shop=nothing
rs2.close
set rs2=nothing%></td>
<td><%=trim(rs("recepit"))%></td>
<td colspan="2"><%=trim(rs("realname"))%></td>
<td align="center"><%=trim(rs("actiondate"))%></td>
<td><%select case rs("state")
case "1"
response.write "未作任何處理"
case "2"
response.write "用戶已經(jīng)劃出款"
case "3"
response.write "服務商已經(jīng)收到款"
case "4"
response.write "服務商已經(jīng)發(fā)貨"
case "5"
response.write "用戶已經(jīng)收到貨"
end select%></td>
</tr>
<tr bgcolor=#ffffff align="left">
<td colspan="7" >付款方式:
<%set rs2=server.CreateObject("adodb.recordset")
rs2.open "select * from delivery where deliveryid="&rs("paymethord"),conn,1,1
response.Write trim(rs2("subject"))
rs2.close
set rs2=nothing%>
收貨方式:
<%set rs2=server.CreateObject("adodb.recordset")
rs2.open "select * from delivery where deliveryid="&rs("deliverymethord"),conn,1,1
response.Write trim(rs2("subject"))
rs2.close
set rs2=nothing
%></td>
</tr>
<tr bgcolor=#ffffff align="center">
<td colspan="7" align="right" > </td>
</tr>
<%
rs.movenext
loop
rs.close
set rs=nothing%>
</table>
</table> <br>
</td>
</tr>
</table>
<!--#include file="foot.htm"-->
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -