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

📄 check.asp

📁 订单管理系统 一、管理员可以设置和修改物品的图片资料 二、修改了级别与积分关系的部分 三、修改了增加用户审核后新用户注册时的错误 四、管理员可以设置用户所有的支付方式和页面的反馈信
💻 ASP
字号:
<%@ LANGUAGE="VBSCRIPT" %>
<!--#include file="inc/userconn.inc"-->
<%
Sub PutToShopBag( bookbm, ProductList )
   If Len(ProductList) = 0 Then
      ProductList = "'" & bookbm & "'"
   ElseIf InStr( ProductList, bookbm ) <= 0 Then
      ProductList = ProductList & ", '" & bookbm & "'"
   End If
End Sub
%>
<%
'如果购买车为空,转入错误界面
ProductList = Session("ProductList")
If Len(ProductList) = 0 Then
   Response.Redirect "error.asp?error=007"
   response.end
end if

'判断是否支付,如支付转到支付页面,并生成在线支付所需数据参数

if request("payment")="开始支付" then
response.redirect "payment.asp"
end if

'取消要购买物品的处理
If Request("cmdShow") = "Yes" Then
   ProductList = ""
   Products = Split(Request("bookbm"), ", ")
   For I=0 To UBound(Products)
      PutToShopBag Products(I), ProductList
   Next
   Session("ProductList") = ProductList
End If

if productlist<>"" then
sql="select * from subs where bookbm in ("&productlist&") order by bookbm"
Set rs = conn.Execute( sql )
else
   Response.Redirect "error.asp?error=007"
end if
%>
<html>

<head>
<title></title>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<link rel="stylesheet" type="text/css" href="inc/guhongying.css">
</head>
<body bgcolor="316395" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table height="50" align="center"><tr><td></td></tr></table>
<form Action="Check.asp" Method="POST" name=form1>
<input type="hidden" name="cmdShow" value="Yes">
<table width="70%" border="0" cellspacing="1" cellpadding="6" bgcolor="#000000" align="center">
<tr> 
      <td  bgcolor="#6699CC" colspan="6"><font color="#FFFFFF"><%=session("username")%>您选购的商品清单如下:</font></td>
    </tr>
    <tr> 
      <td  bgcolor="#eeeeee" width="10%"> 
        <div align="center"><font color="#333333">取 消</font></div>
      </td>
      <td  bgcolor="#eeeeee" width="15%">考试号</td>
      <td  bgcolor="#eeeeee">名 称</td>
      <td  bgcolor="#eeeeee" width="15%">题 数</td>
      <td  bgcolor="#eeeeee" width="15%">数 量</td>
      <td  bgcolor="#eeeeee" width="13%">单 价</td>
    </tr>
    <%
   Sum = 0
   While Not rs.EOF
     Quatity = CInt( Request( "Q_" & rs("bookbm")) )
     If Quatity <= 0 Then 
        Quatity = CInt( Session(rs("bookbm")) )
        If Quatity <= 0 Then Quatity = 1
     End If
     Session(rs("bookbm")) = Quatity
     Sum = Sum + csng(rs("price")) * Quatity
     Sum=FormatNumber(Sum,2) 
%> 
    <tr> 
      <td  bgcolor="#eeeeee" width="10%"> 
        <div align="center">
          <input type="CheckBox" name="bookbm" value="<%=rs("bookbm")%>" Checked>
        </div>
      </td>
      <td  bgcolor="#eeeeee" width="15%"><%=rs("subs")%></td>
      <td  bgcolor="#eeeeee"><%=rs("subsname")%></td>
      <td  bgcolor="#eeeeee" width="15%"><%=rs("subsnumber")%></td>
      <td  bgcolor="#eeeeee" width="15%"> 
        <input type="Text" name="<%="Q_" & rs("bookbm")%>" value="<%=Quatity%>" size="3">
      </td>
      <td  bgcolor="#eeeeee" width="13%"> 
        <div align="center"><%=FormatNumber(csng(rs("price"))*Quatity,2)%></div>
      </td>
    </tr>
    <%
     rs.MoveNext
     Wend
%> 
    <tr bgcolor="#6699CC"> 
      <td colspan="4"><font color="#000000"></font> <font color="#000000"></font> 
        <div align="center"><font color="#000000"> 
          <input type="submit" name="order" value="确认订购">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <input type="submit" name="payment" value="开始支付">
          </font></div>
        <font color="#000000"></font> </td>
      <td colspan="2"> 
        <div align="right"><font color="#000000"></font> <font color="#000000">总价格=<%=Sum%></font></div>
      </td>
    </tr>
<tr> 
      <td  bgcolor="#6699CC" colspan="6"><font color="#FFFFFF">一、如果您想取消已在购物车内的物品,请点取消,然后点确认购买<br><br>二、如果您满意您所购买的物品,请点开始支付<br><br>
        三、如果您想重新购物,请点<a href="main.asp">这里</a></font></td>
    </tr>
  </table>
  </form> 
</body>  
</html>  

⌨️ 快捷键说明

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