📄 payment.asp
字号:
<!--#include file="../Comm/subconn.asp" -->
<!--#include file="../indexconfig.asp" -->
<%'on error resume next%>
<%
'判断是否需要注册
if reg<>"1" then
'判断是否正常购买,如果不是,需要登陆
if session("estore_userid")="" then
response.redirect "../error.asp?error=006"
response.end
end if
end if
'判断购物车是否为空
ProductList = Session("ProductList")
if productlist<>"" then
sql="select * from ProdMain where ProdId in ("&productlist&") order by ProdId"
Set rs = conn.Execute( sql )
else
response.redirect "../error.asp?error=007"
response.end
end if
%>
<html>
<head>
<title>填写订单详细信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Robots" content="index,follow">
<meta name="Abstract" content="CycooShop">
<meta name="DC.Publisher" content="Cycoo Net Studio">
<meta name="Description" Content="欢迎使用 CycooShop 专业的电子商务平台 下载地址 www.cycoo.net">
<meta name="Keywords" Content="思高商城 免费下载">
<link rel="stylesheet" href="../cycoo15.css" type="text/css">
<script language="JavaScript">
function CheckForm()
{
if (document.payment.Recname.value.length == 0) {
alert("请输入收货人的 姓名.");
document.payment.Recname.focus();
return false;
}
if (document.payment.address.value.length == 0) {
alert("请输入收货人的 地址.");
document.payment.address.focus();
return false;
}
if (document.payment.PaytypeID.value.length == 0) {
alert("请选择您的支付方式.");
document.payment.PaytypeID.focus();
return false;
}
if (document.payment.Recmail.value.length == 0) {
alert("请输入此订单收货人的EMAIL.");
document.payment.Recmail.focus();
return false;
}
if (document.payment.Recmail.value.length > 0 && !document.payment.Recmail.value.match( /^.+@.+$/ ) ) {
alert("EMAIL 错误!请重新输入");
document.payment.Recmail.focus();
return false;
}
if (document.payment.RecPhone.value.length == 0) {
alert("请收货人的电话.");
document.payment.RecPhone.focus();
return false;
}
return true;
}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
<br>
<table border="0" cellspacing="1" cellpadding="0" align="center" width="520" bgcolor="B0266D">
<tr bgcolor="#FFFFFF">
<td colspan="4" height="25"> <font color=B0266D><%=session("estore_userid")%> 您选购的商品清单如下:</font>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="50%" height="25" align="center">
<font color="B0266D">商 品 名 称</font>
</td>
<td width="10%" align="center">
<font color="B0266D">数 量</font>
</td>
<td width="20%" align="center">
<font color="B0266D">单 价</font>
</td>
<td width="20%" align="center">
<font color="B0266D">合 计</font>
</td>
</tr>
<%
Sum = 0
While Not rs.EOF
Quatity = CInt( Request( "Q_" & rs("ProdId")) )
If Quatity <= 0 Then
Quatity = CInt( Session(rs("ProdId")) )
If Quatity <= 0 Then Quatity = 1
End If
Session(rs("ProdName")) = Quatity
Sum = Sum + csng(rs("PriceList")) * Quatity
Sum=FormatNumber(Sum,2)
session("sum")=sum
%>
<tr bgcolor="#FFFFFF">
<td width="50%" height="20"> <font color="B0266D"><%=rs("ProdName")%></font></td>
<td width="10%"> <font color="B0266D"><%=Quatity%></font></td>
<td width="20%"> <font color="B0266D"><%=FormatNumber(rs("PriceList"),2)%></font></td>
<td width="20%"> <font color="B0266D"><%=FormatNumber(csng(rs("PriceList"))*Quatity,2)%></font></td>
</tr>
<%
rs.MoveNext
Wend
rs.close
set rs=nothing
%>
<tr bgcolor="#FFFFFF">
<td colspan="4" height="25" align="right">
<b><font color="#B0266D">总价格=<%=Sum%></font>
</td>
</tr>
</table>
<br>
<br>
<table border="0" cellspacing="1" cellpadding="3" align="center" width="520" bgcolor="B0266D">
<form name="payment" action="previeworder.asp" method="POST" onSubmit="return CheckForm();">
<%
sql="select * from UserMain where userid='"&session("estore_userid")&"'"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
Zipcode=rs("ZipCode")
HomePhone=rs("HomePhone")
address=rs("Address")
email=rs("UserMail")
name=rs("UserName")
rs.close
set rs=nothing
%>
<tr bgcolor="#FFFFFF">
<td width="20%"> 收货人姓名</td>
<td width="30%"><input type="text" name="Recname" class="form" size="15" value=<%=name%>>
<b><font color="#FF3333">*</font></b> </td>
<td> 收货人电话</td>
<td><input type="text" name="RecPhone" class="form" size="15" value=<%=HomePhone%>>
<b><font color="#FF3333">*</font></b> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="27">收货人邮箱</td>
<td height="27"><input type="text" name="Recmail" size="16" value=<%=email%>> <b><font color="#FF3333">*</font></b></td>
<td height="30">邮政编码</td>
<td>
<input type="text" name="ZipCode" size="15" value=<%=Zipcode%>>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="30" align="center" bgcolor="#FFFFFF">支付方式<b><font color="#FF3333">*</font></b></td>
<td><select name="PaytypeID" onchange="showtips(this);">
<option value="">请选择支付方式</option>
<%
sqlp="select ID,paytype,paymentmessage from paydefault"
set rsp=server.createobject("ADODB.Recordset")
rsp.open sqlp,conn,1,1
while not rsp.eof
tips = tips&"{$$}"&rsp("paymentmessage")
%>
<option value="<%=rsp("ID")%>"><%=rsp("paytype")%></option>
<%
rsp.movenext
wend
rsp.close
set rsp=nothing
%>
</select>
<script>
function showtips(that) {
var TipsNUM = that.selectedIndex;
var sTmp='<%=Autolink(tips)%>';
var ATmp=sTmp.split("{$$}");
paytips.innerHTML=ATmp[TipsNUM];
paytips.style.color = "red";
}
</script> </td>
<td colspan=2 style="padding-left:0.5em;" id="paytips">
</td>
</tr>
<tr bgcolor="#FFFFFF"><td height="30" >
收货人地址</td><td colspan=3><input name="address" size=45 value='<%=address%>'><b><font color="#FF3333">*</font></b></td>
</tr>
<tr bgcolor="#FFFFFF"><td height="30" >备注留言</td><td colspan="3">
<textarea name="Notes" cols="35" rows="4"></textarea>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="35" colspan="4" align="center">
<input type=hidden name="Sum" value="<%=Sum%>">
<input type="button" name="Submit21" onclick="javascript:history.go(-1)" value="<< 返回修改">
<input type="submit" name="nextstep" value="确认订单 >>">
<input type="reset" name="reset" value="重新填写信息">
</td>
</tr>
</form>
</table><table align=center><tr bgcolor="#FFFFFF">
<td align="center"><font color="#333333">© 2006 <B><%=siteurl%></B> <%=sitename%> </font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="center" valign="top"></td>
</tr> </table>
</body>
</html>
<%
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -