📄 fav.asp
字号:
<!--#include file="../include/dbopenbd.asp" -->
<html><head><title>收藏箱-<%=sitename%>-<%=siteurl%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Robots" content="index,follow">
<link rel="stylesheet" href="../include/css.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
<%
if request.cookies("buyok")("userid")="" then
response.redirect "../error.asp?error=009"
response.end
end if
Set rs = conn.Execute("select * from s_buser where UserId='"&request.cookies("buyok")("userid")&"'")
if not (rs.eof and rs.bof) then fav=rs("fav")
if isnull(fav)=true then fav=""
set rs=nothing
if request("edit")="ok" then fav=""
buyid = Split(request("prodid"), ", ")
For I=0 To UBound(buyid)
if fav="" then
fav = "'"&buyid(I)&"'"
ElseIf InStr(fav, buyid(i)) <= 0 Then
fav = fav & ", '" & buyid(i) &"'"
End If
Next
if len(fav)>=200 then
response.redirect "../error.asp?error=012"
response.end
end if
Set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from s_buser where UserId='"&request.cookies("buyok")("userid")&"'"
rs.open sql,conn,3,3
rs("fav")=fav
rs.update
rs.close
set rs=nothing
if fav="" then
response.redirect "../error.asp?error=010"
response.end
end if
Set rs = conn.Execute("select * from s_produc where ProdId in ("&fav&") order by ProdId")
%>
<table width="630" border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td height="50"><br> <font color="#FF3333"><b>您选择的商品已经放入收藏箱,收藏箱中的商品将永久保存,除非您主动删除。</b></font><br></td></tr>
<tr><td>
<table border="0" cellspacing="1" cellpadding="4" align="center" width="567" bgcolor="#CCCCCC">
<form action="fav.asp" method="POST" name="check">
<tr bgcolor="#FFFFFF">
<td width="60" height="25" align="center"><font color="B0266D">选择</font></td>
<td width="120" align="center"><font color="B0266D">商 品 编 号</font></td>
<td width="340" align="center"><font color="B0266D">商 品 名 称</font></td>
<td width="170" align="center"><font color="B0266D">购 买</font></td>
</tr>
<%
if rs.eof and rs.bof then
response.redirect "../error.asp?error=011"
response.end
else
do While Not rs.eof
%>
<tr bgcolor="#FFFFFF">
<td height="20" align="center"> <input type="CheckBox" name="ProdId" value="<%=rs("ProdId")%>" Checked></td>
<td align="center"><%=rs("ProdId")%></td>
<td> <font color="B0266D"><%=rs("ProdName")%></font></td>
<td align=center><a href='shop.asp?ProdId=<%=rs("ProdId")%>' >放入购物车</a></td>
</tr>
<%
rs.MoveNext
loop
end if
set rs=nothing
%>
<tr><td colspan="4" bgcolor="#ffffff" height=40><font color=red>注意:若要删除收藏箱中的商品,请去掉商品前的小勾,再单击“更新收藏”。</font> </td></tr>
<tr bgcolor="#FFFFFF"> <td colspan="4" height="40" align="center" valign="middle">
<input type="submit" name="fav" value="更新收藏箱">
<input type="button" name="pay" value="查看购物车" onClick="javascript:location.href='check.asp';">
<input type="button" name="button" value=" 继续购物 " language=javascript onClick="javascript:window.close()">
<input type="hidden" name="edit" value="ok">
</td></tr>
</form>
</table>
</td></tr></table>
</body></html>
<%
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -