⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 order.asp

📁 网络商城系统
💻 ASP
字号:
<!--#include file="conn.asp" -->
<html>
<head>
<title>订单确认列表</title>
<link href="css.css" rel="stylesheet">
</head>
<body>
<%
if session("user")="" then
response.write "<script language=javascript>alert('购物车没有任何商品!');window.location.reload('javascript:window.close()')</script>"
response.end
end if
if request("action")="confirm" then
if request("conid")="" then
    response.write "<br><div align=center>没有此商品或者商品参数错误</div>"
	
else
    sp=request("conid")
end if
if request("count")="" then
   pcount=1
else
   pcount=request("count")
end if

set rs=server.createobject("adodb.recordset")
sql="select * from basket where sp_id='"&sp&"' and user_name='"&session("user")&"' and basket_check=false"
rs.open sql,conn,3,3
if rs.eof then
rs.addnew
rs("sp_id")=sp
rs("user_name")=session("user")
rs("count")=pcount
rs("basket_date")=now()
rs("sp_name")=request("consp")
rs("memprice")=request("conprice")
else
rs("count")=int(rs("count"))+int(pcount)
end if
rs.update
rs.close
set rs=nothing
%>
 
  <%
  end if
  %>

<table width="480" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr  class="tabbgcolorli"> 
    <td> <font color="#FFFFFF">您已选购的商品列表</font></td>
  </tr>
</table>
<br>
<table class="border3" width="480" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr> 
      <td width="40%"> <div align="center">商品名称&nbsp;</div></td>
      <td width="20%"> <div align="center">单价</div></td>
      <td width="20%"> <div align="center">数量</div></td>
      <td width="20%"> <div align="center">总金额</div></td>
    </tr>
	<form action="submitorder.asp" name="submitorder" method="post">
		<%
set rs=server.createobject("adodb.recordset")
sql="select * from basket where user_name='"&session("user")&"' and basket_check=false"
rs.open sql,conn,1,1
if rs.eof then
response.write"<br><div align=center>您暂时没有已选购的商品</div>"
response.end
else
do while not rs.eof
%>
    <tr> 
      <td><div align="center"><%=rs("sp_name")%></div></td>
      <td><div align="center"><%=rs("memprice")%>元</div></td>
      <td><div align="center"><%=rs("count")%></div></td>
      <td><div align="center"><%=rs("count")*rs("memprice")%>元</div></td>
    </tr>
	<%
	total=total+(rs("count")*rs("memprice"))
	rs.movenext
	loop
	end if
	rs.close
	set rs=nothing
	%>
	 <tr>
    <td colspan="4">您已选购的商品的总价为:<%=total%>元&nbsp;<input type="hidden" name="total" value="<%=total%>">          <input type="submit" name="sbm" value="这就去下订单" class="border"></td>
  </tr>
  </form>

</table>


<br>
<table width="480" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td><div align="center"><a href="javascript:window.close()"><font color="#000000">继续购物之旅</font></a></div></td>
    <td><div align="center"><a href="cp.asp"><font color="#000000">清除上述商品</font></a></div></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -