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

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. <%
  7. Dim rsvip,strvip
  8. set rsvip=server.CreateObject("adodb.recordset")
  9. rsvip.open "select vip from [user] where username='"&request.cookies(cookieName)("username")&"' ",conn,1,1
  10. strvip = rsvip("vip")
  11. rsvip.close
  12. set rsvip=nothing
  13.  
  14. dim shijian,goods
  15. dim userid,id,rs2,rs3,score
  16. id=request("id")
  17. userid=request("userid")
  18. shijian=now()
  19. goods=year(shijian)&month(shijian)&day(shijian)&hour(shijian)&minute(shijian)&second(shijian)
  20. set rs2=server.CreateObject("adodb.recordset")
  21. rs2.open "select id,name,price1,price2,vipprice,discount,score from product where id in ("&id&") order by id ",conn,1,1
  22. goods=year(shijian)&month(shijian)&day(shijian)&hour(shijian)&minute(shijian)&second(shijian)
  23. do while not rs2.eof
  24. set rs=server.CreateObject("adodb.recordset")
  25. rs.open "select * from orders",conn,1,3
  26. rs.addnew
  27. score=score+rs2("score")
  28. rs("username")=trim(request.cookies(cookieName)("username"))
  29. rs("id")=rs2("id")
  30. rs("actiondate")=shijian
  31. rs("productnum")=CInt(Request("shop"&rs2("id")))
  32. rs("state")=1
  33. rs("goods")=goods
  34. rs("postcode")=int(request("postcode"))
  35. rs("recepit")=trim(request("recepit"))
  36. rs("address")=trim(request("address"))
  37. rs("paymethord")=int(request("paymethord"))
  38. rs("deliverymethord")=int(request("deliverymethord"))
  39. rs("sex")=int(request("sex"))
  40. rs("comments")=HTMLEncode2(trim(request("comments")))
  41. if  strvip = true then 
  42. rs("paid")=rs2("vipprice")*CInt(Request("shop"&rs2("id")))
  43. else
  44. rs("paid")=rs2("price2")*CInt(Request("shop"&rs2("id")))
  45. end if
  46. rs("realname")=trim(request("realname"))
  47. rs("useremail")=trim(request("useremail"))
  48. rs("usertel")=trim(request("usertel"))
  49. rs("userid")=userid
  50. rs.update
  51. rs.close
  52. conn.execute "delete from orders where username='"&request.cookies(cookieName)("username")&"' and id in ("&id&") and state=6"
  53. rs2.movenext
  54. loop
  55. rs2.close
  56. rs2.open "select score from [user] where userid="&userid,conn,1,3
  57. rs2("score")=rs2("score")+int(score)
  58. rs2.Update
  59. rs2.close
  60. set rs2=nothing
  61. set rs=server.CreateObject("adodb.recordset")
  62. rs.open "select product.id,product.name,product.price1,vipprice,product.price2,orders.sex,orders.realname,orders.recepit,orders.goods,orders.postcode,orders.comments,orders.paymethord,orders.deliverymethord,orders.paid,orders.productnum from product inner join orders on product.id=orders.id where orders.username='"&request.cookies(cookieName)("username")&"' and state=1 and goods='"&goods&"' ",conn,1,1
  63. %>
  64. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  65. <html>
  66. <head>
  67. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  68. <title>406网络书店</title>
  69. <link href="style.css" rel="stylesheet" type="text/css">
  70. </head>
  71. <body>
  72. <!--#include file="head.htm"-->
  73. <table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  74.   <tr>
  75.     <td width="219" align="left" valign="top"><!--#include file="uleft.asp"-->      <br></td><td width="561" align="left" valign="top">
  76.       <br>      <table border="0" cellpadding="0" cellspacing="0">
  77.         <tr>
  78.           <td><img src="images/w.gif" width="18" height="18"></td>
  79.           <td style="color:#415373">订单完成</td>
  80.         </tr>
  81.       </table>      <br>      <table width="100%" border="0" align="center" cellpadding="3" cellspacing="3">
  82.         <tr>
  83.           <td height="25" align="center"><FONT SIZE="3"><B>恭喜
  84.                   <% =request.cookies(cookieName)("username") %>
  85.           ,您已成功的提交了此订单!详细信息如下</B></FONT></td>
  86.         </tr>
  87.         <tr>
  88.           <td height="18">订单号:<font color=#FF6600><%=rs("goods")%></font></td>
  89.         </tr>
  90.         <tr>
  91.           <td height="18">商品列表:</td>
  92.         </tr>
  93.         <tr>
  94.           <td>
  95.             <table width="90%" border="0" align="center" cellpadding="2" cellspacing="1" >
  96.               <tr align="center">
  97.                 <td>商品名称</td>
  98.                 <td>市场价</td>
  99.                 <td>会员价</td>
  100.                 <td>VIP会员价</td>
  101.                 <td>数量</td>
  102.                 <td> 小计</td>
  103.               </tr>
  104.               <%dim iiii 
  105.  do while not rs.eof
  106. %>
  107.               <tr BGCOLOR=#FFFFFF>
  108.                 <td><%response.Write "<a href=vpro.asp?id="&rs("id")&" target=_blank>"&rs("name")&"</a>"%></td>
  109.                 <td align="center"><%=rs("price1")%>元</td>
  110.                 <td align="center"><%=rs("price2")%>元</td>
  111.                 <td align="center"><%=rs("vipprice")%>元</td>
  112.                 <td align="center"><%=rs("productnum")%></td>
  113.                 <% 
  114. set rsvip=server.CreateObject("adodb.recordset")
  115. rsvip.open "select vip from [user] where username='"&request.cookies(cookieName)("username")&"' ",conn,1,1
  116. if  rsvip("vip") = true then  %>
  117.                 <td align="center"><%=rs("vipprice")*rs("productnum")%>元</td>
  118.               </tr>
  119.               <%
  120.  iiii=rs("vipprice")*rs("productnum")+iiii
  121. else %>
  122.         <td align="center"><%=rs("price2")*rs("productnum")%>元</td>
  123.         </tr>
  124.         <%
  125. iiii=rs("price2")*rs("productnum")+iiii
  126. end if
  127. rs.movenext
  128.     loop
  129.     rs.movefirst
  130. rsvip.close
  131.  set rsvip=nothing
  132.     %>
  133.         <tr align="center">
  134.           <td colspan="6"><br>            <%response.write "<font color=#FF6600>您选择的送货方式是:"
  135.   set rs3=server.CreateObject("adodb.recordset")
  136.   rs3.open "select * from delivery where deliveryid="&int(rs("deliverymethord")),conn,1,1
  137.   if rs3.eof and rs3.bof then
  138.   response.write "送货方式已经被删除"
  139.   response.write "&nbsp;附加费用:0元&nbsp;&nbsp;&nbsp;共计:"
  140.   response.write iiii&"元"
  141.   else
  142.   response.Write trim(rs3("subject"))
  143.   response.write "&nbsp;附加费用:"&rs3("fee")&"元&nbsp;&nbsp;&nbsp;共计:"
  144.   response.write iiii+rs3("fee")&"元"
  145.   end if
  146.   rs3.close
  147.   set rs3=nothing
  148. %></td>
  149.         </tr>
  150.           </table>
  151.           <br></td>
  152.         </tr>
  153.         <tr>
  154.           <td height="18" style='PADDING-LEFT: 100px'>订货人姓名:<font color=#FF6600><%=trim(rs("realname"))%></font></td>
  155.         </tr>
  156.         <tr>
  157.           <td height="18" style='PADDING-LEFT: 100px'>收货人姓名:<font color=#FF6600>
  158.             <%response.Write trim(request("recepit"))
  159.     if request("sex")=0 then
  160.     response.Write "&nbsp;(先生)"
  161.     else
  162.     response.Write "&nbsp;(女士)"
  163.     end if%>
  164.           </font></td>
  165.         </tr>
  166.         <tr>
  167.           <td height="18" style='PADDING-LEFT: 100px'>收货详细地址:<font color=#FF6600><%=trim(request("address"))%></font></td>
  168.         </tr>
  169.         <tr>
  170.           <td height="18" style='PADDING-LEFT: 100px'>邮编:<font color=#FF6600><%=trim(request("postcode"))%></font>&nbsp;&nbsp;&nbsp;&nbsp;电话:<font color=#FF6600><%=trim(request("usertel"))%></font>&nbsp;&nbsp;&nbsp;&nbsp;电子邮件:<font color=#FF6600><%=trim(request("useremail"))%></font></td>
  171.         </tr>
  172.         <tr>
  173.           <td height="18" style='PADDING-LEFT: 100px'>送货方式:<font color=#FF6600>
  174.             <%
  175.       set rs3=server.CreateObject("adodb.recordset")
  176.       rs3.open "select * from delivery where deliveryid="&request("deliverymethord"),conn,1,1
  177.   if rs3.eof and rs3.bof then
  178.   response.write "方式已经被删除"
  179.   else
  180.       response.Write trim(rs3("subject"))
  181.       end if
  182.   rs3.close
  183.       set rs3=nothing
  184.       %>
  185.             </font>&nbsp;&nbsp;&nbsp;&nbsp;支付方式:<font color=#FF6600>
  186.             <%
  187.       set rs3=server.CreateObject("adodb.recordset")
  188.       rs3.open "select * from delivery where deliveryid="&request("paymethord"),conn,1,1
  189.   if rs3.eof and rs3.bof then
  190.   response.write "方式已经被删除"
  191.   else
  192.       response.Write trim(rs3("subject"))
  193.       end if
  194.   rs3.close
  195.       set rs=nothing%>
  196.           </font></td>
  197.         </tr>
  198.         <%if trim(request("comments"))<>"" then%>
  199.         <tr>
  200.           <td height="18" style='PADDING-LEFT: 100px'>您的留言:<%=trim(request("comments"))%></td>
  201.         </tr>
  202.         <%end if%>
  203.         <tr>
  204.           <td height="18" ><br>
  205.           请您在一周内依照您选择的支付方式进行汇款,汇款时请注明您的<font color="#FF0000">订单号</font>!<FONT COLOR="#FF0000">为了更及时得为你服务,当你汇完款,一定要记得到您的<A HREF="myorder.asp" TARGET="_self"><B>帐号中修改你的定单<font color="#000000">状态</font></B></A></FONT></td>
  206.         </tr>
  207.         <tr>
  208.           <td height="18"  style='PADDING-LEFT: 100px'>
  209.             <div align="right"><a href="#" onClick=javascript:window.close()> </a><font color="#999999"><FONT COLOR="#000000">订单完成 创建时间:<%=shijian%></FONT>&nbsp;</font></div></td>
  210.         </tr>
  211.         <tr>
  212.           <td height="18" align="center"  ><input type="button" name="Submit" value="关闭" onClick=javascript:window.close()></td>
  213.         </tr>
  214.       </table>      <br>      <br>
  215.       
  216.     </td>
  217.   </tr>
  218. </table>
  219. <!--#include file="foot.htm"-->
  220. </body>
  221. </html>