myorder.asp
上传用户:syzzy1975
上传日期:2022-07-17
资源大小:670k
文件大小:6k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
  2. <%
  3. %><!--#include file="manage/inc/config.asp"--> 
  4. <!--#include file="inc/conn.asp"--> 
  5. <!--#include file="inc/chk.asp"--> 
  6. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  7. <html>
  8. <head>
  9. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  10. <title>406网络书店</title>
  11. <link href="style.css" rel="stylesheet" type="text/css">
  12. </head>
  13. <body>
  14. <!--#include file="head.htm"-->
  15. <table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  16.   <tr>
  17.     <td width="219" align="left" valign="top"><!--#include file="uleft.asp"-->      <br></td><td width="561" align="left" valign="top">
  18.       <br>      <table border="0" cellpadding="0" cellspacing="0">
  19.         <tr>
  20.           <td><img src="images/w.gif" width="18" height="18"></td>
  21.           <td style="color:#415373">我的订单</td>
  22.         </tr>
  23.       </table>      <br>      <table border="0" cellpadding="0" cellspacing="0" align="center"  height="0" width="100%">
  24.         <tr>
  25.           <td>
  26.             <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1">
  27.               <tr align="center">
  28.                 <td><font color="#FF6600"><b><font color="#000000">我 的 订 单</font></b></font></td>
  29.               </tr>
  30.               <tr>
  31.                 <td align="right">
  32.                   <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 ;}" >
  33.                     <option value="myorder.asp?state=0" selected>--请选择查询状态--</option>
  34.                     <option value="myorder.asp?state=0" >全部订单状态</option>
  35.                     <option value="myorder.asp?state=1" >未作任何处理</option>
  36.                     <option value="myorder.asp?state=2" >用户已经划出款</option>
  37.                     <option value="myorder.asp?state=3" >服务商已经收到款</option>
  38.                     <option value="myorder.asp?state=4" >服务商已经发货</option>
  39.                     <option value="myorder.asp?state=5" >用户已经收到货</option>
  40.                   </select></td>
  41.               </tr>
  42.             </table>
  43.             <table width="100%" border="0" align="center" cellpadding="2" cellspacing="2" >
  44.               <tr align="center">
  45.                 <td >订单号</td>
  46.                 <td >合计金额</td>
  47.                 <td >收货人</td>
  48.                 <td colspan="2" >订货人</td>
  49.                 <td >日期</td>
  50.                 <td >状态</td>
  51.               </tr>
  52.               <%set rs=server.CreateObject("adodb.recordset")
  53.   dim state
  54.   state=request.QueryString("state")
  55.   if state=0 or state="" then
  56.   select case state
  57.   case "0"
  58.   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
  59.   case ""
  60.   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
  61.   end select
  62.   else
  63.   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
  64.   end if
  65.   do while not rs.eof
  66.    %>
  67.               <tr bgcolor=#ffffff align="center">
  68.                 <td ><a href="chkorder.asp?dan=<%=trim(rs("goods"))%>"><%=trim(rs("goods"))%></a></td>
  69.                 <td>
  70.                   <%
  71.   dim shop,rs2
  72. set rs2=server.CreateObject("adodb.recordset")
  73. rs2.open "select * from delivery where deliveryid="&rs("deliverymethord"),conn,1,1
  74. set shop=server.CreateObject("adodb.recordset")
  75. shop.open "select sum(paid) as paid from orders where goods='"&trim(rs("goods"))&"' ",conn,1,1
  76. response.write "<font color=#FF6600>"&round(shop("paid")+rs2("fee"),1)&"元</font>"
  77. shop.close
  78. set shop=nothing
  79. rs2.close
  80. set rs2=nothing%></td>
  81.                 <td><%=trim(rs("recepit"))%></td>
  82.                 <td colspan="2"><%=trim(rs("realname"))%></td>
  83.                 <td align="center"><%=trim(rs("actiondate"))%></td>
  84.                 <td><%select case rs("state")
  85. case "1"
  86. response.write "未作任何处理"
  87. case "2"
  88. response.write "用户已经划出款"
  89. case "3"
  90. response.write "服务商已经收到款"
  91. case "4"
  92. response.write "服务商已经发货"
  93. case "5"
  94. response.write "用户已经收到货"
  95. end select%></td>
  96.               </tr>
  97.               <tr bgcolor=#ffffff align="left">
  98.                 <td colspan="7" >付款方式:
  99.                 <%set rs2=server.CreateObject("adodb.recordset")
  100.         rs2.open "select * from delivery where deliveryid="&rs("paymethord"),conn,1,1
  101.         response.Write trim(rs2("subject"))
  102.         rs2.close
  103.         set rs2=nothing%> 
  104.                     收货方式:
  105.                 <%set rs2=server.CreateObject("adodb.recordset")
  106.         rs2.open "select * from delivery where deliveryid="&rs("deliverymethord"),conn,1,1
  107.         response.Write trim(rs2("subject"))
  108.         rs2.close
  109.         set rs2=nothing
  110.         %></td>
  111.               </tr>
  112.               <tr bgcolor=#ffffff align="center">
  113.                 <td colspan="7" align="right" >&nbsp;</td>
  114.               </tr>
  115.               <%
  116.    rs.movenext
  117.   loop
  118.   rs.close
  119.   set rs=nothing%>
  120.             </table>
  121.       </table>      <br>
  122.       </td>
  123.   </tr>
  124. </table>
  125. <!--#include file="foot.htm"-->
  126. </body>
  127. </html>