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

📄 check.asp

📁 北京商务网
💻 ASP
字号:
<%@ LANGUAGE="VBSCRIPT" codepage ="936" %><!--#include file="ADOVBS.INC"--><!--#include file="util.asp" --><!--#include file="../conn/dbCONN1.ASP" --><%ProductList = Session("ProductList")Products = Split(Request("cpbh"), ", ")For I=0 To UBound(Products)PutToShopBag Products(I), ProductListNextSession("ProductList") = ProductList %><%If Request("cmdShow") ="Yes" ThenProductList =""Products = Split(Request("cpbh"), ", ")For I=0 To UBound(Products)PutToShopBag Products(I), ProductListNextSession("ProductList") = ProductListEnd IfProductList = Session("ProductList")If Len(ProductList) = 0 Thenresponse.write"<SCRIPT language=JavaScript>alert('对不起,你尚未下定单!');"response.write"javascript:window.close();</script>"response.endend ifsql ="Select * From spzs"sql = sql & " Where cpbh In (" & ProductList & ")"sql = sql & " Order By cpbh"Set rs = conn.Execute( sql )%><html><script language="Javascript">//函数名:fucCheckNUM//功能介绍:检查是否为数字//参数说明:要检查的数字//返回值:1为是数字,0为不是数字function fucCheckNUM(NUM){var i,j,strTemp;strTemp="0123456789";if ( NUM.length== 0)return 0for (i=0;i<NUM.length;i++){j=strTemp.indexOf(NUM.charAt(i)); if (j==-1){//说明有字符不是数字return 0;}}//说明是数字return 1;}function clean(){ window.location.href="clear.asp"}</script><head><title>购物车清单</title></head><body leftmargin="18" bgcolor="#F4FAFF"><LINK href="../IMAGES/default.css" type=text/css rel=stylesheet><META content="Microsoft FrontPage 5.0" name=GENERATOR><style><!--.C {FONT-SIZE: 13px}TD {COLOR: #000; FONT-FAMILY: 宋体; FONT-SIZE: 12px}TD {FONT-SIZE: 12px; LINE-HEIGHT: 150%}td {font-size:12px;font-family:宋体;}--></style><form Action="CHECK.ASP" Method="POST" name=form1><div align="center"><center><table Border="1" cellspacing="1" cellpadding="0" bordercolorlight="#3766D0" bordercolordark="#3766D0" width="100%" style="border-collapse: collapse" bordercolor="#5CA3EF" height="90"><tr align="center"> <td width="121" height="17" bgcolor="#5CA3EF"><font color="#F4FAFF">产品编号</font></td><td width="204" height="17" bgcolor="#5CA3EF"><font color="#F4FAFF">&nbsp;产品名称</font></td><td width="111" height="17" bgcolor="#5CA3EF"><font color="#FFFFFF">产品产地</font></td><td width="112" height="17" bgcolor="#5CA3EF"><font color="#F4FAFF">售价(元)</font></td><td width="40" height="17" bgcolor="#5CA3EF"> <p align="center"><font color="#F4FAFF">数量</font></p></td><td width="144" height="17" bgcolor="#5CA3EF"><font color="#F4FAFF">总价</font></td></tr><%Sum = 0While Not rs.EOFQuatity = CInt( Request( "Q_" & rs("cpbh")) )If Quatity <= 0 Then Quatity = CInt( Session(rs("cpbh")) )If Quatity <= 0 Then Quatity = 1End IfSession(rs("cpbh")) = QuatitySum = Sum + csng(rs("cpjg")) * QuatitySum=FormatNumber(Sum,2) %><tr align="center"> <td width="121" height="19" align="left"> <p align="center"><%=rs("cpbh")%></td><td width="204" height="19" align="center"><%=rs("Cpmc")%></td><td width="111" height="19"><%=rs("Cpcd")%></td><td width="112" height="19"><font color="#FF6600"><%if rs("cpjg")="0" then response.write"价优" else response.write""&rs("cpjg")&"元" end if%></font></td><td width="40" height="19"> <font size="2"> <input Name="<%="Q_" & rs("cpbh")%>" Value="<%=Quatity%>" Size="3"></font> </td><td width="144" height="19" align="right"><font size="2"> <p align="center"><%=FormatNumber(csng(rs("cpjg"))*Quatity,2)%></font></td></tr><tr> <td width="742" height="18" ColSpan="6" Align="right" bgcolor="#E8F5FF"><font size="2"><font color="#000080">总价格=</font><font color="#FF0000"><%=Sum%></font>(人民币)</font></td> <% rs.MoveNext Wend %> </tr> <tr> <td width="742" height="29" ColSpan="6" Align="left" bgcolor="#5CA3EF"><p align="center"><input Type="submit" Value="确认订购" name="B1" style="border:1px solid #F4FAFF; font-size: 9pt; color:#F4FAFF; background-color:#000080">&nbsp;&nbsp; <input type="button" value="继续购物" name="B2" onclick="window.close();" style="border:1px solid #ECF7FF; font-size: 9pt; color:#ECF7FF; background-color:#000080">&nbsp;&nbsp; <input type="button" value="订单取消" name="B3" OnClick="clean()" style="border:1px solid #ECF7FF; font-size: 9pt; color:#ECF7FF; background-color:#000080">&nbsp;&nbsp; <input type="button" value="去收银台" name="B4" onclick="window.opener.location.href='BuyFinish.asp';window.close();" style="border:1px solid #ECF7FF; font-size: 9pt; color:#F4FAFF; background-color:#000080"> </td> </tr> </table> </center></div></form> </body> <script language="JavaScript"> </script> <p> </p></html>

⌨️ 快捷键说明

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