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

📄 payment.asp

📁 使用VFP工具开发的《订单管理系统》
💻 ASP
字号:
<!--#include file="inc/userconn.inc"-->
<html>
<head>
<title>开始支付</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="inc/guhongying.css">
</head>

<body bgcolor="316395" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<script language="JavaScript">
function CheckForm()
{
	if (document.payment.saddress.value.length == 0) {
		alert("请输入此订单收货人的地址.");
		document.payment.saddress.focus();
		return false;
	}

	if (document.payment.semail.value.length == 0) {
		alert("请输入此订单收货人的EMAIL.");
		document.payment.semail.focus();
		return false;
	}

	if (document.payment.semail.value.length > 0 && !document.payment.semail.value.match( /^.+@.+$/ ) ) {
	    alert("Email 错误!请重新输入");
	    document.payment.semail.focus();
	    return false;
	}
	return true;
}
</script>
<%
'判断是否正常购买,如果不是,需要登陆
if session("username")="" then 
response.redirect "error.asp?error=006"
end if

'判断购物车是否为空
ProductList = Session("ProductList")
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


%>
<table height="50" align="center"><tr><td></td></tr></table>
<form name="payment" action="dopayment.asp" method="POST"  onSubmit="return CheckForm();">
<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="15%">考试号</td>
      <td  bgcolor="#eeeeee">名 称</td>
      <td  bgcolor="#eeeeee" width="15%">题 数</td>
      <td  bgcolor="#eeeeee" width="15%">数 量</td>
      <td  bgcolor="#eeeeee" width="18%">单 价</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) 
session("sum")=sum
%> 
    <tr> 
      <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%"> <%=Quatity%> </td>
      <td  bgcolor="#eeeeee" width="15%"> 
        <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"> </div>
      </td>
      <td colspan="2"> 
        <div align="right"><font color="#000000"></font> <font color="#000000">总价格=<%=Sum%></font></div>
      </td>
    </tr>
  </table>
<table width="70%" border="0" cellspacing="1" cellpadding="6" bgcolor="#000000" align="center">
    <tr bgcolor="eeeeee"> 
      <td colspan="6">请您细致填写下列信息: </td>
    </tr>
    <tr bgcolor="#6699CC"> 
      <td colspan="2"><font color="#FFFFFF">请选择您的支付方式:</font></td>
      <td width="64%" colspan="3"><font color="#FFFFFF">
<select name="paymenttype" class="bk">
                <option value="" selected>请选择您的支付方式</option>
                <%
sqlp="select * from paydefault"
set rsp=server.createobject("ADODB.Recordset")
rsp.open sqlp,conn,1,1
while not rsp.eof
%>
                <option value="<%=rsp("paymenttype")%>"><%=rsp("paymenttype")%></option>
                <%
rsp.movenext
wend
rsp.Close()
%>
              </select>
        </font></td>
    </tr>
    <tr bgcolor="#6699CC"> 
      <td colspan="2"><font color="#FFFFFF">此订单收货人的地址:</font></td>
      <td width="64%" colspan="3"><font color="#FFFFFF"><font color="#FFFFFF">
        <input type="text" name="saddress" size="50">
        </font></font></td>
    </tr>
    <tr bgcolor="#6699CC"> 
      <td colspan="2"><font color="#FFFFFF">此订单收货人的EMAIL:</font> <font color="#FFFFFF"><font color="#FFFFFF"> 
        </font></font></td>
      <td width="64%" colspan="3"><font color="#FFFFFF"><font color="#FFFFFF">
        <input type="text" name="semail">
        </font></font></td>
    </tr>
    <tr bgcolor="#6699CC"> 
      <td colspan="2"><font color="#FFFFFF">你现在可以享受的折扣点数:</font> <font color="#FFFFFF"><font color="#FFFFFF"> 
        </font></font></td>
      <td width="64%" colspan="3"><font color="#FFFFFF"> <%
sql1="select * from user where username='"&session("username")&"'"
set rs1=server.createobject("adodb.recordset") 
rs1.open sql1,conn,1,1
response.write rs1("discount") & " 点 [每点在本站等于1RMB] &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
%> 使用折扣 
        <input type="checkbox" name="usediscount" value="1">
        </font></td>
    </tr>
    <tr bgcolor="eeeeee"> 
      <td colspan="6" height="63"> 
        <div align="center"><font color="#FFFFFF"><font color="#FFFFFF"><font color="#FFFFFF">
          <input type="submit" name="Submit2" value="确定">
          </font> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" name="reset" value="重填"> </font></font> </div>
      </td>
    </tr>
  </table>


</form> 

</body>
</html>

⌨️ 快捷键说明

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