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

📄 check.txt

📁 123基于web的网络购物系统附毕业设计论文
💻 TXT
字号:
<%@ LANGUAGE="VBSCRIPT" %>
<!--#include file="util.asp" -->
<!--#include file="conn.asp" -->
<%
ProductList = Session("ProductList")
Products = Split(Request("cpbm"), ", ")
For i=0 To UBound(Products)
   PutToShopBag Products(i), ProductList
Next
Session("ProductList") = ProductList

Head="以下是您所选购的物品清单"
'ProductList = Session("ProductList")
If Len(ProductList) =0 Then
 Response.Redirect "Nothing.asp"
 response.end
end if

'If Request("MySelf") = "Yes" Then
 '  ProductList = ""
'   Products = Split(Request("cpbm"), ", ")
'   For I=0 To UBound(Products)
'      PutToShopBag Products(I), ProductList
'   Next
'   Session("ProductList") = ProductList
'End If
'If Len(ProductList) = 0 Then
' Response.Redirect "Nothing.asp"
' response.end
'end if

set rs=server.createobject("adodb.recordset")
sql = "Select * From Product"
sql = sql & " Where Product_Id In (" & ProductList & ")"
rs.open sql,conn,3,3
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE type=text/css>.main {
	FONT-SIZE: 9pt
}
.main1 {
	FONT-SIZE: 14px
}

</STYLE>
<title>以下是您所选购的物品清单</title>
</head>
<script language="Javascript">
//函数名:fucCheckNUM
//功能介绍:检查是否为数字
//参数说明:要检查的数字
//返回值:1为是数字,0为不是数字
function fucCheckNUM(NUM)
{
	var i,j,strTemp;
	strTemp="0123456789";
	if ( NUM.length== 0)
		return 0
	for (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>
<SCRIPT language=javascript id=clientEventHandlersJS>
<!--
function form1_onsubmit(v) 
{
	newprice="Q_" & rs("Product_Id")
 	if ((fucCheckNUM(document.FORM1.newprice.value)==0) )
	{	alert ("会员价有非法字符,请填写正确会员价。");
		document.FORM1.newprice.focus();
		return false;
	}
//-->
}
</SCRIPT>
<body topmargin="5" bgcolor="#E6E4C4">
<div align="center"><center>

<table width="100%" border="0" cellspacing="0">
  <tr>
    <td width="80%" valign="top"><p align="center">
<font color="#FF0000" class=main1><%=Head%></font></p>
<form Action="Check.asp" Method="POST" onsubmit="return form1_onsubmit()">
      <input type="hidden" name="MySelf" value="Yes">
<div align="center"><center>
<table border="1" cellpadding="0" cellspacing="0" width="524" bordercolor="#008000" bordercolorlight="#008000" bordercolordark="#FFFFFF" class=main>
        <tr bgcolor="#6d8e4d">
          <td align="center" width="59"  height="22"><font color="#FFFFFF">商品编号</font></td>
          <td align="center" width="191"  height="22"><font color="#FFFFFF">商品名称</font></td>
          <td align="center" width="76" height="22"><font color="#FFFFFF">商品价格</font></td>
          <td align="center" width="77"  height="22"><font color="#FFFFFF">商品数量</font></td>
          <td align="center" width="34"  height="22"><font color="#FFFFFF">购买</font></td>
          <td align="center" width="73"  height="22"><font color="#FFFFFF">总价</font></td>
        </tr>
<%
   Sum = 0
   While Not rs.EOF
     Quatity = CInt( Request( "Q_" & rs("Product_Id")) )
     If Quatity <= 0 Then 
        Quatity = CInt( Session(rs("Product_Id")) )
        If Quatity <= 0 Then Quatity = 1 end if
     End If
     Session(rs("Product_Id")) = Quatity
     Sum = Sum + ccur(rs("P_NewPrice")) * Quatity
%>
        <tr>
          <td align="center" width="59"><%=rs("Product_ID")%>
</td>
          <td align="center" width="191"><%=rs("Product_Name")%>
</td>
          <td align="center" width="76"><%=rs("P_NewPrice")%>
</td>
          <td align="center" width="77"><!--webbot bot="Validation"
            S-Display-Name="请输入正确的商品数量!"
            S-Data-Type="Integer" S-Number-Separators="x" --><input Name="<%="Q_" & rs("Product_Id")%>" Value="<%=Quatity%>" Size="3"></td>
          <td Align="center" width="34"><input Type="CheckBox" Name="cpbm" Value="<%=rs("Product_Id")%>" Checked> 
</td>
          <td Align="center" width="73"><%=ccur(rs("P_NewPrice"))*Quatity%>.00元
</td>
        </tr>
<%
      rs.MoveNext
   Wend
%>
        <tr>
      <td Align="Right" ColSpan="6" width="520"><font Color="Red">总价格=人民币 <%=Sum%>.00元</font></td>  
        </tr>
      </table>
      </center></div>
	  <blockquote>
        <p align="center">
        <input Type="submit" Value="确认更改" name="B1" onsubmit="">&nbsp;&nbsp;&nbsp; 
        <input type="button" value="继续购物" name="B2" onclick="window.close();" style="font-size: 9pt">&nbsp;&nbsp;&nbsp; 
        <input type="button" value="订单取消" name="B3" OnClick="clean()" style="font-size: 9pt">&nbsp;&nbsp;&nbsp; 
        <input type="button" value="去收银台" name="B4" onclick="window.opener.location.href='PayMent.asp';window.close();" style="font-size: 9pt">
      </blockquote>
    </form>
</center>
</td></tr></table>
<%
rs.close
conn.close
%>

</body>
</html>













⌨️ 快捷键说明

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