📄 check-out.asp
字号:
<!--#include file="header.asp" -->
<!--#include file="conn/nosql.asp" -->
<%
Id=Session("LoginSuccess")
ProductList = Session("ProductList")
Products = Split(nosql(Request("cpbm")), ", ")
For I=0 To UBound(Products)
PutToShopBag Products(I), ProductList
Next
Session("ProductList") = ProductList
If Session("sia_user") ="" and Session("grade") ="" Then
Response.Redirect "cart-login.asp"
response.end
end if
ProductList = Session("ProductList")
If Len(ProductList) =0 Then
Response.Redirect "Nothing.asp"
response.end
end if
set rs2=server.createobject("adodb.recordset")
sql2 = "Select proname,disprice From sia_product"
sql2 = sql2 & " Where proname In (" & ProductList & ")"
rs2.open sql2,conn,3,3
%>
<TABLE width=778 align="center" cellPadding=0 cellSpacing=0>
<TR>
<TD width="185" valign="top" class="table-right">
<!--#include file="left.asp" -->
</TD>
<TD width="708" valign="top"> <table width="550" height="144" align="center">
<tr valign="top">
<td height="40" colspan="4" align="center"> <strong>购物步骤→购物车→结算中心→提交成功 </strong></td>
</tr>
<tr valign="middle" bgcolor="<%= rscss("tabcolor") %>">
<td height="20" colspan="4"><font color="#ffffff">>>购物结算--您的购物清单</font></td>
</tr>
<tr valign="middle" bgcolor="#f7f7f7">
<td height="20" align="center">产品名称</td>
<td width="15%" height="20" align="center">单 价</td>
<td width="15%" height="20" align="center">数 量</td>
<td width="15%" height="20" align="center">金 额</td>
</tr>
<%
Sum = 0
While Not rs2.EOF
Quatity = CInt( Request( "Q_" & rs2("proname")) )
If Quatity <= 0 Then
Quatity = CInt( Session(rs2("proname")) )
If Quatity <= 0 Then Quatity = 1
End If
Session(rs2("proname")) = Quatity
Sum = Sum + ccur(rs2("disprice")) * Quatity
set rssia_discount=server.createobject("adodb.recordset")
sqlsia_discount = "select * from sia_discount where grade="&session("grade")&""
set rssia_discount = conn.execute(sqlsia_discount)
discount=rssia_discount("discount")
price=sum*discount/100
price=FormatNumber(price,1)
%>
<tr valign="middle" bgcolor="#f7f7f7">
<td height="20"> <%=rs2("proname")%> </td>
<td width="15%" height="20" align="center"><%=rs2("disprice")%> </td>
<td width="15%" height="20" align="center"><%=Quatity%></td>
<td width="15%" height="20" Align="center"><%=ccur(rs2("disprice"))*Quatity%>元 </td>
</tr>
<%
rs2.MoveNext
Wend
%>
<tr valign="middle" bgcolor="#f7f7f7">
<td width="520" height="20" ColSpan="5" Align="Right"><font color="#999999">[总金额 = 货款总额<%=Sum%>元 *
<% Select case session("grade")
case "0"
Response.Write("会员")
case "1"
Response.Write("星级会员")
case "2"
Response.Write("铜牌会员")
case "3"
Response.Write("银牌会员")
case "4"
Response.Write("金牌会员")
End Select
%>折扣<%=discount%>%]</font> 总金额: <font Color="#ff3333"><strong>¥<%=price%>0元</strong></font></td>
</tr>
</table>
<script language="javascript">
<!--//
function checksignup() {
if ( document.formSignUp.name.value == '' ) {
window.alert('请输入您的名称!!');
document.formSignUp.name.focus();
return false;
}
if ( document.formSignUp.address.value == '' ) {
window.alert('请输入联系地址!!');
document.formSignUp.address.focus();
return false;
}
if ( document.formSignUp.address.value.length<5) {
window.alert('请输入详细的联系地址!!');
document.formSignUp.address.focus();
return false;
}
if ( document.formSignUp.zipcode.value == '' ) {
window.alert('请输入联系人邮政编码!!');
document.formSignUp.zipcode.focus();
return false;
}
if(isNaN(document.formSignUp.zipcode.value)||( document.formSignUp.zipcode.value.length!=6)) {
window.alert('邮政编码必须为6位西亚!');
document.formSignUp.zipcode.focus();
return false;
}
if ( document.formSignUp.tel.value == '' ) {
window.alert('请输入联系人电话!!');
document.formSignUp.tel.focus();
return false;
}
if(isNaN(document.formSignUp.tel.value)||(document.formSignUp.tel.value.length<7)) {
window.alert("请输入您的有效电话号码,只能是7位以上的西亚!!");
document.formSignUp.tel.focus();
return false;
}
if ( document.formSignUp.mail.value.length> 0 &&!document.formSignUp.mail.value.indexOf("@")==-1|document.formSignUp.mail.value.indexOf(".")==-1 ) {
window.alert('请输入您正确的Email地址!!');
document.formSignUp.mail.focus();
return false;
}
if ( document.formSignUp.payment.value == '' ) {
window.alert('请选择您的付款方式!!');
document.formSignUp.payment.focus();
return false;
}
if (document.formSignUp.remark.value.length>500)
{
window.alert("备注不能超过500个字符!");
document.formSignUp.remark.focus();
return false;
}
return true;
}
//-->
</script> <%
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select * from sia_user where sia_user='"&session("sia_user")&"'"
set rs = conn.Execute(sql)
%>
<TABLE width=550 align="center">
<FORM
action=check.asp method=post name=formSignUp id="formSignUp">
<TR valign="middle" bgcolor="<%= rscss("tabcolor") %>">
<TD height=20 colspan="2"><font color="#ffffff">>>购物结算--您的个人信息及付款方式</font></TD>
</TR>
<TR valign="middle" bgcolor="#f7f7f7">
<TD width="94" height=20 align="right" class=main1>真实姓名:</TD>
<TD width="444" height=20 class=main1> <INPUT name=name class="textbox" id="name" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" value="<%=rs("name")%>" size=13 maxLength=49>
<font color="#ff3333">*</font></TD>
</TR>
<tr valign="middle" bgcolor="#f7f7f7">
<TD height=20 align="right" class=main1>联系地址:</TD>
<TD height=20 class=main1> <INPUT name=address class="textbox" id="address" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" value="<%=rs("address")%>" size=35 maxLength=49>
<font color="#ff3333">*</font> </TD>
</tr>
<tr valign="middle" bgcolor="#f7f7f7">
<TD height=20 align="right" class=main1>邮政编码:</TD>
<TD height=20 class=main1> <INPUT name=zipcode class="textbox" id="zipcode" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" value="<%=rs("zipcode")%>" size=13 maxLength=16>
<font color="#ff3333">*</font> </TD>
</tr>
<tr valign="middle" bgcolor="#f7f7f7">
<TD height=20 align="right" class=main1>联系电话:</TD>
<TD height=20 class=main1> <INPUT name=tel class="textbox" id="tel" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" value="<%=rs("tel")%>" size=23 maxLength=40>
<font color="#ff3333">*</font> </TD>
</tr>
<tr valign="middle" bgcolor="#f7f7f7">
<TD height=20 align="right" class=main1>电子信箱:</TD>
<TD height=20 class=main1> <INPUT name=mail class="textbox" id="mail" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" value="<% if rs("mail")<>"无" then Response.Write(rs("mail"))%>" size=35 maxLength=49>
</TD>
</tr>
<tr valign="middle" bgcolor="#f7f7f7">
<TD height=20 align="right" class=main1>付款方式:</TD>
<TD height=20 class=main1> <select name="payment" size="1" class="textbox" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''">
<option selected>>>您的付款方式</option>
<% set rspayment=server.createobject("adodb.recordset")
sqlpayment="select * from sia_payment order by id DESC"
set rspayment = conn.execute(sqlpayment)
while not rspayment.eof%>
<option value="<%=rspayment("paymode")%>"><%=rspayment("paymode")%></option>
<%
rspayment.movenext
wend
%>
</select> <font color="#ff3333">*</font></TD>
</tr>
<tr valign="middle" bgcolor="#f7f7f7">
<TD height=20 colspan="2" class=main1> <%set rspayment=server.createobject("adodb.recordset")
set rspayment = conn.execute(sqlpayment)
while not rspayment.eof
Response.Write(" <font color="&rscss("tabcolor")&">["&rspayment("paymode")&"]")
Response.Write(" "&rspayment("sendmode")&"</font><br>")
rspayment.movenext
wend
%></TD>
</tr>
<tr valign="middle" bgcolor="#f7f7f7">
<TD height=20 align="right" class=main1>订单备注:</TD>
<TD height=20 class=main1> <textarea name="remark" cols="54" rows="5" class="textbox" id="remark" title="备注的内容,请保持在500字以内。
谢谢您对我们的支持!" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></textarea></TD>
</tr>
<tr valign="middle" bgcolor="#f7f7f7">
<TD height=20 align="center" class=main1> </TD>
<TD height=20 class=main1> <input name="Submit" type="submit" class="textbox-1" onClick="javascript:return checksignup()" value="提交订单" onFocus="this.blur()">
<input name="Submit2" type="reset" class="textbox-1" value="重新填写" onFocus="this.blur()">
<input name="sia_user" type="hidden" id="sia_user" value="<%=rs("sia_user")%>">
<input name="price" type="hidden" id="price" value="<%=price%>">
<input name="sia_discount" type="hidden" id="sia_discount" value="<%=sia_discount%>"></TD>
</tr>
<tr valign="middle" bgcolor="#f7f7f7">
<TD height=20 colspan="2" class=main1><font color=<%= rscss("tabcolor") %>>订单说明:<%= rscss("sendmode") %></font> </TD>
</tr>
</FORM>
</TABLE>
<br> </TD>
</TR>
</TABLE>
<%rspayment.close
set rspayment=nothing
%>
<!--#include file="footer.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -