📄 gathering.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%Response.Expires = -100%>
<%
dim key,toppath,dbpath
key="a2"
toppath=""
dbpath=""
%>
<!--#include file="chk.asp" -->
<!--#include file="db_conn.asp"-->
<!--#include file="my_lib/my_request.asp"-->
<!--#include file="my_lib/nosql.asp" -->
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/main.css" rel="stylesheet" type="text/css">
<SCRIPT language="javascript">
<!--
function checkinput()
{
if (document.form1.yqj_realname.value == "")
{
window.alert("真实姓名不能为空!");
document.form1.yqj_realname.focus();
return (false);}
if (document.form1.yqj_address.value == "")
{
window.alert("联系地址不能为空!");
document.form1.yqj_address.focus();
return (false);}
if (document.form1.yqj_postal.value == "")
{
window.alert("邮政编码不能为空!");
document.form1.yqj_postal.focus();
return (false);}
if (document.form1.yqj_postal.value.length!=6)
{window.alert('邮政编码输入有错误');
document.form1.yqj_postal.focus();
return false;}
if (document.form1.yqj_phone.value == "")
{
window.alert("联系电话不能为空!");
document.form1.yqj_phone.focus();
return (false);}
if (document.form1.yqj_email.value == "")
{
window.alert("电子信箱不能为空!");
document.form1.yqj_email.focus();
return (false);}
if (!IsEmail(document.form1.yqj_email.value))
{window.alert('您的电子邮箱地址填写有误!');
document.form1.yqj_email.focus();
return false;}
if (document.form1.paymode.value == "")
{
window.alert("请选择支付方式!");
document.form1.paymode.focus();
return (false);}
if (document.form1.songid.value == "")
{
window.alert("请选择送货方式!");
document.form1.songid.focus();
return (false);}
function IsEmail(argValue)
{var emailStr=argValue.toLowerCase();
var checkTLD=1;
var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;
var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";
var validChars="\[^\\s" + specialChars + "\]";
var quotedUser="(\"[^\"]*\")";
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
var atom=validChars + '+';
var word="(" + atom + "|" + quotedUser + ")";
var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
var emailPat=/^(.+)@(.+)$/;
var matchArray=emailStr.match(emailPat);
if (matchArray==null)
{return false;}
var user=matchArray[1];
var domain=matchArray[2];
for (i=0; i<user.length; i++)
{if (user.charCodeAt(i)>127)
{return false;}
}
for (i=0; i<domain.length; i++)
{if (domain.charCodeAt(i)>127)
{return false;}
}
if (user.match(userPat)==null)
{return false;}
var IPArray=domain.match(ipDomainPat);
if (IPArray!=null)
{for (var i=1;i<=4;i++)
{if (IPArray[i]>255)
{return false;}
}
return true;
}
var atomPat=new RegExp("^" + atom + "$");
var domArr=domain.split(".");
var len=domArr.length;
for (i=0;i<len;i++)
{if (domArr[i].search(atomPat)==-1)
{return false;}
}
if (checkTLD && domArr[domArr.length-1].length!=2 && domArr[domArr.length-1].search(knownDomsPat)==-1)
{return false;}
if (len<2)
{return false;}
return true;
}
}
//--></SCRIPT>
<title>商品信息及个人资料</title>
</head>
<body topmargin="1">
<!--#include file="top.asp" -->
<%
id=session("chk_id")
ProductList = Session("ProductList")
If Len(ProductList) = 0 Then
response.write "<script language=javascript>alert('对不起,您的购物车为空!');location.href=""default.asp"";</script>"
response.End
end if
%>
<div align="center">
<table border="1" width="760" id="table1" cellpadding="0" style="border-collapse: collapse" bordercolor="#F47E36">
<tr>
<td valign="top">
<table border="0" width="758" id="table2" cellspacing="0" cellpadding="0">
<tr>
<td height="20" valign="top" bgcolor="#FF9900" colspan="4">
<p align="center">
<img border="0" src="images/cartpic.gif" width="25" height="22">商品列表及个人资料</td>
</tr>
<tr>
<td height="18" bgcolor="#FBE9D1" width="189">商品名称</td>
<td height="18" bgcolor="#FBE9D1" width="189">单价</td>
<td height="18" bgcolor="#FBE9D1" width="190">数量</td>
<td height="18" bgcolor="#FBE9D1" width="190">金额</td>
</tr>
<%
set rs2=server.createobject("adodb.recordset")
sql2 = "Select * From yqj_product"
sql2 = sql2 & " Where id In (" & ProductList & ")"
rs2.open sql2,conn,3,3
Sum = 0
While Not rs2.EOF
RMB=rs2("p_mmoney")
Quatity = CInt( Request( "Q_" & rs2("p_name")) )
If Quatity <= 0 Then
Quatity = CInt( Session(rs2("p_name")) )
If Quatity <= 0 Then Quatity = 1
End If
Session(rs2("p_name")) = Quatity
Sum = Sum + ccur(rmb) * Quatity
%>
<tr>
<td height="18" width="189"><%=rs2("p_name")%></td>
<td height="18" width="189">¥<%=rmb%>元</td>
<td height="18" width="190"><%=Quatity%></td>
<td height="18" width="190">¥<%=ccur(rmb)*Quatity%>元</td>
</tr>
<%
rs2.MoveNext
Wend
rs2.close
set rs2=nothing
%>
<tr>
<td height="18" colspan="4">
<p align="right">合计价格:¥<%=sum%>元</td>
</tr>
<tr>
<td colspan="4" valign="top">
<%
response.write "<form name=form1 action=setorder.asp method=post name=form1 onsubmit=""return checkinput();"">"
sql="select * from user_info_list where id="&id
set rs=conn.execute (sql)
%>
<table border="0" width="758" id="table3" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3" bgcolor="#FF9900" height="25">个人资料填写</td>
</tr>
<tr>
<td height="18" width="159">
<p align="right">真实姓名:</td>
<td height="18" width="299">
<input type="text" name="yqj_realname" size="28" maxlength="10" value="<%=rs("txt_realname")%>"></td>
<td height="18" width="300"><font color="#FF9900">*
必须填写,将是收货人姓名</font></td>
</tr>
<tr>
<td height="18" width="159">
<p align="right">联系地址:</td>
<td height="18" width="299">
<input type="text" name="yqj_address" size="36" maxlength="100" value="<%=rs("txt_address")%>">
<input type=hidden name=ishy value=0></td>
<td height="18" width="300"><font color="#FF9900">*
将是送货地址</font></td>
</tr>
<tr>
<td height="18" width="159">
<p align="right">邮政编码:</td>
<td height="18" width="299">
<input type="text" name="yqj_postal" size="20" maxlength="6" value="<%=rs("txt_postal")%>"></td>
<td height="18" width="300"><font color="#FF9900">*
将是送货邮政编码</font></td>
</tr>
<tr>
<td height="18" width="159">
<p align="right">联系电话:</td>
<td height="18" width="299">
<input type="text" name="yqj_phone" size="20" maxlength="18" value="<%=rs("txt_phone")%>"></td>
<td height="18" width="300"><font color="#FF9900">*
请如实填写,便与我们与您联系</font></td>
</tr>
<tr>
<td height="18" width="159">
<p align="right">电子信箱:</td>
<td height="18" width="299">
<input type="text" name="yqj_email" size="20" maxlength="20" value="<%=rs("txt_email")%>"></td>
<td height="18" width="300"><font color="#FF9900">*
请如实填写,便与我们与您联系</font></td>
</tr>
<tr>
<td height="18" width="159">
<p align="right">是否需要发票:</td>
<td height="18" width="299">
<input type="radio" value="1" name="yqj_invoice">需要
<input type="radio" value="0" checked name="yqj_invoice">不需要</td>
<td height="18" width="300"><font color="#FF9900">*
请选择</font></td>
</tr>
<tr>
<td height="18" width="159">
<p align="right">支付方式选择:</td>
<td height="18" width="299">
<select size=1 name=paymode>
<option value="" selected>选择支付方式</option>
<option value=银行汇款>银行汇款</option>
<option value=邮局汇款>邮局汇款</option>
<option value=上门取款>上门取款</option>
<option value=在线支付>在线支付</option>
</select></td>
<td height="18" width="300"><font color="#FF9900">*
请选择</font></td>
</tr>
<tr>
<td height="18" width="159">
<p align="right">送货方式选择:</td>
<td height="18" width="299">
<%
response.write "<select size=1 name=songid>"
response.write "<option value="""" selected>选择送货方式</option>"
sql="select id,deliver_name,price from deliver"
set rs=conn.execute (sql)
do while not rs.eof
response.write "<option value="&rs("id")&">"&rs("deliver_name")&"(¥附加"&rs("price")&"元)</option>"
rs.movenext
loop
rs.close
set rs=nothing
response.write "</select>"
%></td>
<td height="18" width="300"><font color="#FF9900">*
请选择,不同的送货方式其费用不一样</font></td>
</tr>
<tr>
<td height="18" width="159">
<p align="right">备 注:</td>
<td height="18" width="299">
<textarea rows="4" name="content" cols="35"></textarea></td>
<td height="18" width="300"><font color="#FF9900">*
您的特殊需求</font></td>
</tr>
<tr>
<td colspan="3" height="18">
<p align="center">
<input type=submit value="确认无误下单" name="B1" >
<input type=button value="返回修改" name="B2" onclick="window.location='my_cart_list.asp'" onFocus="this.blur()"></td>
</tr>
<tr>
<td colspan="3" height="25"><font color="#FF0000">
注意:以上信息,请认真如实填写,我们将以此给您发货。否则由此而造成的损失我们概不负责。</font></td>
</tr>
</table></form>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<!--#include file="end.asp" -->
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -