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

Jsp/Servlet

开发平台:

Java

  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
  2. <!--#include file="inc/config.asp"-->
  3. <!--#include file="inc/conn.asp"--> 
  4. <!--#include file="inc/chk.asp"--> 
  5. <%
  6. if session("rank")>1 then
  7. call Msgbox("对不起,您的权限不够!","Back","None")
  8. response.End
  9. end if
  10. %>
  11. <%
  12. dim action,goods,username
  13. goods=request.QueryString("dan")
  14. username=request.QueryString("username")
  15. set rs=server.CreateObject("adodb.recordset")
  16. rs.open "select product.id,product.name,product.price1,product.price2,product.vipprice,orders.actiondate,orders.sex,orders.realname,orders.recepit,orders.goods,orders.postcode,orders.comments,orders.paymethord,orders.deliverymethord,orders.state,orders.paid,orders.useremail,orders.usertel,orders.address,orders.productnum from product inner join orders on product.id=orders.id where orders.username='"&username&"' and goods='"&goods&"' ",conn,1,1
  17. if rs.eof and rs.bof then
  18. call MsgBox("此订单中有商品已被管理员删除,无法进行正确计算。","Close","None")
  19. response.End
  20. end if
  21. action=request.QueryString("action")
  22. select case action
  23. case "save"
  24. if request("state")<>"" then
  25. conn.execute "update orders set state="&request("state")&" where goods='"&goods&"' "
  26. end if
  27. call MsgBox("订单状态修改成功","GoUrl","porder.asp")
  28. response.Write goods
  29. case "del"
  30. conn.execute "delete from orders where goods='"&goods&"' "
  31. call MsgBox("订单删除成功!","GoUrl","porder.asp")
  32. end select
  33. %>
  34. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  35. <html>
  36. <head>
  37. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  38. <title>406网络书店</title>
  39. <link href="../style.css" rel="stylesheet" type="text/css">
  40. </head>
  41. <body>
  42. <!--#include file="head.htm"-->
  43. <table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  44.   <tr>
  45.     <td width="219" align="left" valign="top"><br>
  46.       <!--#include file="menu.htm"-->
  47.         <br></td><td width="561" align="left" valign="top">
  48.       <br>      <table border="0" cellpadding="0" cellspacing="0">
  49.         <tr>
  50.           <td><img src="../images/w.gif" width="18" height="18"></td>
  51.           <td style="color:#415373">查看</td>
  52.         </tr>
  53.       </table>      <br>      <table width="100%" align="center" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
  54.         <tr>
  55.           <td colspan="2" align="center">
  56.             <table width="100%" border="0" cellspacing="0" cellpadding="0">
  57.               <tr>
  58.                 <td width="90%" align="center">订单号:<%=goods%> 详细资料:</td>
  59.                 <td width="10%" align="center">
  60.                   <input type="button" name="Submit4" value="打 印" onClick="javascript:window.print()">
  61.                 </td>
  62.               </tr>
  63.           </table></td>
  64.         </tr>
  65.         <tr>
  66.           <td colspan="2">订单状态:
  67.             <br>
  68.             <br>            <table width="100%" align="center" border="0" cellspacing="1" cellpadding="0" >
  69.               <form name="form1" method="post" action="vorder.asp?dan=<%=goods%>&action=save&username=<%=username%>">
  70.                 <tr >
  71.                   <td align="right"  >
  72.                     <%grade()%>
  73.                     <br>
  74.                     <br>
  75.                     <br>
  76.                     <input type="submit" name="Submit" value="修改订单状态"></td>
  77.                 </tr>
  78.               </form>
  79.           </table></td>
  80.         </tr>
  81.         <tr>
  82.           <td colspan="2" valign="top"><br>
  83.             商品列表:
  84.             <br>
  85.             <br>            <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1">
  86.               <tr align="center" height="20">
  87.                 <td WIDTH="40%">商品名称</td>
  88.                 <td WIDTH="12%">订购数量</td>
  89.                 <td WIDTH="12%">市场价</td>
  90.                 <td WIDTH="12%">会员价格</td>
  91.                 <td WIDTH="12%">VIP会员价</td>
  92.                 <td WIDTH="12%">金额小计</td>
  93.               </tr>
  94.               <%dim iii
  95. do while not rs.eof%>
  96.               <tr bgcolor="#FFFFFF" align="center" height="20">
  97.                 <td align="left">&nbsp;<a href=../vpro.asp?id=<%=rs("id")%> target=_blank><%=trim(rs("name"))%></a></td>
  98.                 <td><%=rs("productnum")%></td>
  99.                 <td><%=rs("price1")%>元</td>
  100.                 <td><%=rs("price2")%>元</td>
  101.                 <td><%=rs("vipprice")%>元</td>
  102.                 <td><%=rs("price2")*rs("productnum")%>元</td>
  103.               </tr>
  104.               <%iii=rs("paid")+iii
  105. rs.movenext
  106. loop
  107. rs.movefirst%>
  108.               <tr>
  109.                 <td colspan="6" bgcolor="#FFFFFF" align="right" height="20">用户选择的送货方式是:
  110.                     <%'
  111.           dim rs2
  112.           set rs2=server.CreateObject("adodb.recordset")
  113.           rs2.Open "select * from delivery where deliveryid="&int(rs("deliverymethord")),conn,1,1
  114.   if rs2.eof and rs2.bof then
  115.   response.write "方式以被删除"
  116.   response.write "&nbsp;附加费用:0元"
  117.   response.write "&nbsp;&nbsp;金额总计:"& round(iii,1) &"元"
  118.   else
  119.   response.write trim(rs2("subject"))
  120.   response.write "&nbsp;附加费用:"&rs2("fee")&"元"
  121.   response.write "&nbsp;&nbsp;金额总计:"&round(iii+rs2("fee"),1)&"元"
  122.   end if
  123.   rs2.Close
  124.   set rs2=nothing
  125.   %>
  126. &nbsp;&nbsp;&nbsp;</td>
  127.               </tr>
  128.             </table></td>
  129.         </tr>
  130.         <tr>
  131.           <td height="10" colspan="2"></td>
  132.         </tr>
  133.         <tr>
  134.           <td width="13%" nowrap>订货人姓名:</td>
  135.           <td width="87%"><%=trim(rs("realname"))%></td>
  136.         </tr>
  137.         <tr>
  138.           <td>收货人姓名:</td>
  139.           <td><%=trim(rs("recepit"))%></td>
  140.         </tr>
  141.         <tr>
  142.           <td>收货地址:</td>
  143.           <td><%=trim(rs("address"))%></td>
  144.         </tr>
  145.         <tr>
  146.           <td>邮政编码:</td>
  147.           <td><%=trim(rs("postcode"))%></td>
  148.         </tr>
  149.         <tr>
  150.           <td>联系电话:</td>
  151.           <td><%=trim(rs("usertel"))%></td>
  152.         </tr>
  153.         <tr>
  154.           <td>电子邮件:</td>
  155.           <td><%=trim(rs("useremail"))%></td>
  156.         </tr>
  157.         <tr>
  158.           <td>送货方式:</td>
  159.           <td>
  160.             <%
  161.     '///送货方式
  162.     set rs2=server.CreateObject("adodb.recordset")
  163.     rs2.Open "select * from delivery where deliveryid="&int(rs("deliverymethord")),conn,1,1
  164.     if rs2.eof and rs2.bof then
  165. response.write "方式已被删除"
  166. else
  167. response.Write trim(rs2("subject"))
  168.     end if
  169. rs2.close
  170.     set rs2=nothing%>
  171.           </td>
  172.         </tr>
  173.         <tr>
  174.           <td>支付方式:</td>
  175.           <td>
  176.             <%
  177.           set rs2=server.CreateObject("adodb.recordset")
  178.           rs2.Open "select * from delivery where deliveryid="&int(rs("paymethord")),conn,1,1
  179.           if rs2.eof and rs2.bof then
  180.   response.write "方式已被删除"
  181.   else
  182.   response.Write trim(rs2("subject"))
  183.           end if
  184.   rs2.close
  185.           set rs2=nothing %>
  186.           </td>
  187.         </tr>
  188.         <tr>
  189.           <td>用户留言:</td>
  190.           <td><%=trim(rs("comments"))%></td>
  191.         </tr>
  192.         <tr>
  193.           <td>下单日期:</td>
  194.           <td><%=rs("actiondate")%></td>
  195.         </tr>
  196.         <tr>
  197.           <td height="32" colspan="2" align="center">
  198.             <input type="button" name="Submit3" value="删除订单" onClick="if(confirm('您确定要删除吗?')) location.href='vorder.asp?action=del&dan=<%=goods%>&username=<%=username%>';else return;">
  199. &nbsp;&nbsp;
  200.       <input type="button" name="Submit2" value="关闭窗口" onClick=javascript:window.close()>
  201.           </td>
  202.         </tr>
  203.       </table>      <%sub grade()
  204. select case rs("state")
  205. case "1"%>      <input name="checkbox" type="checkbox" DISABLED id="checkbox" value="checkbox" checked>
  206.       未作任何处理<span style='font-family:Wingdings;'>à</span>      <input name="state" type="checkbox" id="checkbox" value="checkbox" DISABLED>
  207.       用户已划出款<span style='font-family:Wingdings;'>à</span>      <input type="checkbox" name="checkbox" value="dddd" DISABLED>
  208.       服务商已收到款<span style='font-family:Wingdings;'>à</span>      <input type="checkbox" name="checkbox3" value="checkbox" DISABLED>
  209.       服务商已发货<span style='font-family:Wingdings;'>à</span>      <input type="checkbox" name="checkbox4" value="checkbox" DISABLED>
  210.       用户已收到货
  211.       <%case "2"%>      <input name="checkbox" type="checkbox" DISABLED id="checkbox" value="checkbox" checked>
  212.       未作任何处理<span style='font-family:Wingdings;'>à</span>      <input name="checkbox" type="checkbox" id="checkbox" value="adf" checked DISABLED>
  213.       用户已划出款<span style='font-family:Wingdings;'>à</span>      <input type="checkbox" name="state" value="3" >
  214.       服务商已收到款<span style='font-family:Wingdings;'>à</span>      <input type="checkbox" name="checkbox" value="checkbox" DISABLED>
  215.       服务商已发货<span style='font-family:Wingdings;'>à</span>      <input type="checkbox" name="checkbox4" value="checkbox" DISABLED>
  216.       用户已收到货
  217.       <%case "3"%>      <input name="checkbox" type="checkbox" DISABLED id="checkbox" value="checkbox" checked>
  218.       未作任何处理<span style='font-family:Wingdings;'>à</span>      <input name="checkbox" type="checkbox" id="checkbox" value="checkbox" checked DISABLED>
  219.       用户已划出款<span style='font-family:Wingdings;'>à</span>      <input type="checkbox" name="checkbox2" value="checkbox" checked DISABLED>
  220.       服务商已收到款<span style='font-family:Wingdings;'>à</span>      <input type="checkbox" name="state" value="4" >
  221.       服务商已发货<span style='font-family:Wingdings;'>à</span>      <input type="checkbox" name="checkbox4" value="checkbox" DISABLED>
  222.       用户已收到货
  223.       <%case "4"%>      <input name="checkbox" type="checkbox" DISABLED id="checkbox" value="checkbox" checked>
  224.       未作任何处理<span style='font-family:Wingdings;'>à</span>      <input name="checkbox" type="checkbox" id="checkbox" value="2" checked DISABLED>
  225.       用户已划出款<span style='font-family:Wingdings;'>à</span>      <input type="checkbox" name="checkbox2" value="checkbox" checked DISABLED>
  226.       服务商已收到款<span style='font-family:Wingdings;'>à</span>      <input type="checkbox" name="checkbox3" value="checkbox" checked DISABLED>
  227.       服务商已发货<span style='font-family:Wingdings;'>à</span>      <input type="checkbox" name="checkbox" value="checkbox" DISABLED>
  228.       用户已收到货
  229.       <%case "5"%>      <input name="checkbox" type="checkbox" DISABLED id="checkbox" value="checkbox" checked>
  230.       未作任何处理<span style='font-family:Wingdings;'>à</span>      <input name="checkbox" type="checkbox" id="checkbox" value="2" checked DISABLED>
  231.       用户已划出款<span style='font-family:Wingdings;'>à</span>      <input type="checkbox" name="checkbox2" value="checkbox" checked DISABLED>
  232.       服务商已收到款<span style='font-family:Wingdings;'>à</span>      <input type="checkbox" name="checkbox3" value="checkbox" checked DISABLED>
  233.       服务商已发货<span style='font-family:Wingdings;'>à</span>      <input type="checkbox" name="checkbox4" value="checkbox" checked DISABLED>
  234.       用户已收到货
  235.       <%end select
  236. end sub%>      <br>      <br>
  237.       </td>
  238.   </tr>
  239. </table>
  240. <!--#include file="foot.htm"-->
  241. </body>
  242. </html>