TXT

Check

By Monica Bennett,2014-04-11 08:46
6 views 0
Check

<%@ 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>

Report this document

For any questions or suggestions please email
cust-service@docsford.com