📄 cashsave.asp
字号:
<!--#include file="conn.asp"--><head>
<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>
<link href=css.css rel=STYLESHEET type=text/css>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>购物成功!请填写收货人的详细信息</title>
<link href="img/style.css" rel="stylesheet" type="text/css">
</head>
<body topmargin="0">
<font color="#FFFFFF"><b>
<%
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%><%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
%>
<br>
<form method="POST" language="javascript" onsubmit="return form1_onsubmit()" name="form1" action="saveto.asp?sub_number=<%=sub_number%>">
<TABLE
width=388 border=0 align="center" cellPadding=5 cellSpacing=1 bgColor=#999999>
<TBODY>
<TR>
<TD align=middle bgColor=#fff2d5>
<div align="center"><font color="#990000">谢谢您从本站购物!您的订单号为:<font color=#000000><b><%=sub_number%></b></font></font></div></TD>
</TR>
<TR>
<TD align=middle
bgColor=#ffffff><div align="center">
<% dim sql2
sql2="select * from member where user_name='"&session("user_name")&"'"
rs.open sql2,conn,3,3
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td><table width="100%" height="34" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="398" height="120" valign="bottom" bgcolor="f7f7f7" ><br>
<font color="#666666">请记牢本订单号,你可以使用本订单号对成交情况进行查询和投诉</font><br> <br> <div align="center">
<center>
<table width="90%" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" height="243">
<tr bgcolor="f7f7f7" background="img/pics/tile_bg.gif">
<td height="25" colspan="2"><font color="#990000">请填写收货人的详细信息</font></td>
</tr>
<tr bgcolor="f7f7f7">
<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=biaodan value="<%=rs("user_name")%>">
</td>
</tr>
<tr bgcolor="f7f7f7">
<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=biaodan value="<%=rs("user_adds")%>">
</td>
</tr>
<tr bgcolor="f7f7f7">
<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=biaodan value="<%=rs("user_postcode")%>">
</td>
</tr>
<tr bgcolor="f7f7f7">
<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=biaodan value="<%=rs("user_tel")%>">
</td>
</tr>
<tr bgcolor="f7f7f7">
<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=biaodan value="<%=rs("user_mail")%>">
</td>
</tr>
<tr bgcolor="f7f7f7">
<td width="19%" height="19">
<div align="right">付款方式:</div></td>
<td height="19">
<select name="qian" size="1" class="beizhu">
<option value="货到付款">货到付款</option>
<option value="银行转帐">银行转帐</option>
<option value="邮政汇款">邮政汇款</option>
</select>
</td>
</tr>
<tr>
<td width="19%" height="39" bgcolor="f7f7f7">
<div align="right">备注:<br>
(50汉字内) </div></td>
<td height="39" bgcolor="f7f7f7">
<textarea name="other" cols="30" rows="3" class="beizhu" style="FONT-SIZE: 12px; WIDTH: 250px"></textarea></td>
</tr>
<tr bgcolor="f7f7f7">
<td height="35" colspan="2">
<table width="40%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> <div align="center">
<input name="B1" type="submit" id="B1" value="确定">
</div></td>
<td> <div align="center">
<input type="reset" value="清除" name="B2" class=input>
</div></td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>
<br>
</td>
</tr>
<tr>
<td height="1" colspan="3" valign="top"></td>
</tr>
</table></td>
</tr>
</table>
<%
rs.close
%>
</div></TD>
</TR>
</TBODY>
</TABLE>
</form>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -