📄 cashsave.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="css.asp"-->
<script language="JavaScript">
<!--
if (parent.frames.length > 0) {
parent.location.href = location.href;
}
function form1_onsubmit() {
if (document.form1.sub_to.value=="")
{
alert("收货人姓名不能为空。")
document.form1.sub_to.focus()
return false
}
else if(document.form1.sub_adds.value=="")
{
alert("收货人地址不能为空。")
document.form1.sub_adds.focus()
return false
}
else if(document.form1.sub_post.value=="")
{
alert("收货人邮编不能为空。")
document.form1.sub_post.focus()
return false
}
else if(document.form1.sub_tel.value=="")
{
alert("联系电话不能为空。")
document.form1.sub_tel.focus()
return false
}
else if(document.form1.sub_mail.value=="")
{
alert("联系信箱不能为空。")
document.form1.sub_mail.focus()
return false
}
}
// -->
</script>
<title>购物成功!请填写收货人的详细信息</title>
<%
if session("user_name")="" then
response.write "<br>"
response.write "<center>"
response.write "1.你尚未登录!请登录后再订购本站图书!"
response.write "<br>2.第一次来本站,请先注册会员(免费)!"
response.write "<br>"
response.write "<br>"
response.end
end if
dim sql,rs
set rs=server.createobject("adodb.recordset")
if request("action")="buy" then
if request("count")="" then
count=1
else
count=request("count")
end if
if request("hw_id")="" then
response.write "没有此货物!"
else
hw_id=request("hw_id")
end if
sql="select * from basket where hw_id='"&hw_id&"' and user_name='"&session("user_name")&"' and basket_check=false"
rs.open sql,conn,3,3
if rs.eof then
rs.addnew
rs("hw_id")=hw_id
rs("user_name")=session("user_name")
rs("basket_count")=count
rs("basket_date")=now()
rs("hw_name")=request("hw_name")
rs("hw_cash")=request("hw_cash")
rs("user_type")=request("user_type")
else
rs("basket_count")=int(rs("basket_count"))+int(count)
end if
rs.update
rs.close
%>
</b></FONT>
<%end if%>
<br>
<table width="400" border="0" cellspacing="0" cellpadding="0" align="center" height="65">
<tr>
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td valign="top" height="120"> <table border="0" width="100%" cellspacing="0" cellpadding="0" height="5" align="center">
<%if session("user_name")="" then
response.redirect "index.asp"
else
user_name=session("user_name")
end if
sql="select * from basket where user_name='"&user_name&"' and basket_check=false"
rs.open sql,conn,3,3
if rs.eof then
response.write "你没有订购任何商品"
response.end
else
on error resume next
sub_number=user_name&now()
sub_number=replace(sub_number,"-","")
sub_number=replace(sub_number," ","")
sub_number=replace(sub_number,":","")
do while not rs.eof
rs("basket_check")=true
rs("sub_number")=sub_number
hw_id=rs("hw_id")
sql1="select * from hw where hw_id="&int(hw_id)
set rs1=server.createobject("adodb.recordset")
rs1.open sql1,conn,3,3
rs1("hw_buys")=rs1("hw_buys")+rs("basket_count")
rs1.update
rs1.close
set rs1=nothing
rs.movenext
loop
rs.update
end if
rs.close
sql="select * from sub"
rs.open sql,conn,3,3
rs.addnew
rs("user_name")=user_name
rs("sub_number")=sub_number
rs.update
rs.close
%>
<tr>
<td width="380"> <form method="POST" language="javascript" onsubmit="return form1_onsubmit()" name="form1" action="saveto.asp?sub_number=<%=sub_number%>">
<table border="0" width="400" cellspacing="0" cellpadding="0">
<tr>
<td height="18"><TABLE style="BORDER-COLLAPSE: collapse" borderColor=#525e6b cellSpacing=0
cellPadding=0 width="100%" align=center border=1>
<TBODY>
<TR>
<TD width="100%"> <TABLE style="BORDER-COLLAPSE: collapse" borderColor=#111111
cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top width=300> <TABLE style="BORDER-COLLAPSE: collapse" borderColor=#111111
cellSpacing=0 cellPadding=0 width="100%"
background="images/pics2/infobg.gif"
border=0>
<TBODY>
<TR>
<TD width=45><IMG height=32
src="images/pics2/icon.gif"
width=40 border=0></TD>
<TD vAlign=middle><font color="#FFFFFF">谢谢您从本站购物!</font></TD>
<TD width=43> <P align=right><IMG height=32
src="images/pics2/edge(1).gif"
width=43 border=0></P></TD>
</TR>
</TBODY>
</TABLE></TD>
<TD align=right valign="middle"
background="images/pics2/rightbg.gif"> <IMG
alt=-
src="images/pics2/space1.gif" width="3" height="32"></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
<TR>
<TD width="100%"> <TABLE id=AutoNumber6 style="BORDER-COLLAPSE: collapse"
borderColor=#111111 cellSpacing=0 cellPadding=2 width="100%"
border=0>
<TBODY>
<TR>
<TD width="100%"><br> <table width="90%" border="0" align="center" cellpadding="0" cellspacing="1" background="IMAGES/pics2/infobg.gif">
<tr background="IMAGES/pics2/infobg.gif">
<td height="25" colspan="2"><b><font color="#FFFFFF">
<img src="IMAGES/pics2/next.gif" width="6" height="9">
您的订单号为:</font><font color=red><%=sub_number%></font></b></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="19%" height="25">
<div align="right">姓名:</div></td>
<td width="81%" height="25">
<input style="FONT-SIZE: 12px; WIDTH: 110px" type="text" name="sub_to" size="20" class=input>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="19%" height="25">
<div align="right">地址:</div></td>
<td height="25">
<input style="FONT-SIZE: 12px; WIDTH: 210px" type="text" name="sub_adds" size="40" class=input>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="19%" height="25">
<div align="right">邮编:</div></td>
<td height="25">
<input style="FONT-SIZE: 12px; WIDTH: 110px" type="text" name="sub_post" size="10" class=input>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="19%" height="25">
<div align="right">电话:</div></td>
<td height="25">
<input style="FONT-SIZE: 12px; WIDTH: 110px" type="text" name="sub_tel" size="20" class=input>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="19%" height="25">
<div align="right">E-mail:</div></td>
<td height="25">
<input style="FONT-SIZE: 12px; WIDTH: 110px" type="text" name="sub_mail" size="20" class=input>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="19%" height="12">
<div align="right">付款方式:</div></td>
<td height="12">
<select size="1" name="qian">
<option value="货到付款">货到付款(限北京市)</option>
<option value="招商银行">招商银行转帐</option>
<option value="龙卡转帐">建行转帐</option>
<option value="邮政汇款">邮政汇款</option>
</select> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="19%" height="12">
<div align="right">备注:<br>
(50汉字内) </div></td>
<td height="12">
<textarea style="FONT-SIZE: 12px; WIDTH: 250px" name="other" cols="30" class="input" rows="3"></textarea>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="35" colspan="2">
<table width="40%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> <div align="center">
<input
align=absMiddle alt=确认 cache name="B1"
src="IMAGES/pics2/s_button000.gif" type=image tppabs="" width="45" height="20">
</div></td>
<td> <div align="center">
<input type="reset" value="清除" name="B2" class=input>
</div></td>
</tr>
</table></td>
</tr>
</table>
<div align="center"><br>
请记牢本订单号,你可以使用本订单号对成交情况进行查询和投诉<br>
<br>
</div></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
<TR>
<TD width="100%" height="20" bgColor=#3e3e4b>
</TD>
</TR>
</TBODY>
</TABLE></td>
</tr>
<tr>
<td valign="top"></td>
</tr>
<tr>
<td></td>
</tr>
</table>
</form></td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -