<!--#include file="include/nowshop.asp" -->

<html><head><title>收藏箱-<%=sitename%>-<%=siteurl%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Robots" content="index,follow">
<LINK href="images/css.css" type=text/css rel=stylesheet>
<LINK href="list/newhead.css" type=text/css rel=stylesheet>
<STYLE type=text/css>.style1 {
	FONT-SIZE: 12px; COLOR: #666666; LINE-HEIGHT: 15px; FONT-FAMILY: "宋体"; TEXT-DECORATION: none
}
.style2 {
	FONT-SIZE: 12px; COLOR: #ff6600; LINE-HEIGHT: 15px; FONT-FAMILY: "宋体"; TEXT-DECORATION: none
}
.style3 {
	FONT-SIZE: 12px; COLOR: red; LINE-HEIGHT: 15px; FONT-FAMILY: "宋体"; TEXT-DECORATION: none
}
.tab {
	BORDER-RIGHT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid; BORDER-BOTTOM: #cccccc 1px solid
}
</STYLE>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
<center>
<%
set rsuser=conn.execute("select * from buser where UserId='"&request.cookies("buyok")("userid")&"'")
%>

<!--#include file="top.asp"-->
  <table width="768" border="0" cellspacing="0" cellpadding="0">
    <tr> 
      <td width="186" align="center" valign="top" bgcolor="#f4f5fd"><!--#include file="zuo_member.asp"-->
</td>
      <td align="center" valign="top"> <TABLE width=560 border=0 cellPadding=0 cellSpacing=0 bordercolor="#587ad9">
          <TBODY>
            <TR> 
              <TD height=12><table>
                  <tr> 
                    <td align="center" valign="middle"><TABLE cellSpacing=0 cellPadding=0 width=547 border=0 style="BORDER-RIGHT: #b1bfee 1px solid; BORDER-TOP: #b1bfee 1px solid; BORDER-LEFT: #b1bfee 1px solid; BORDER-BOTTOM: #b1bfee 1px solid" 
>
                        <TBODY>
                          <TR> 
                            <TD bgColor=#f4f5fd height=30><font color="#FF0000"><b>&nbsp;<%=rsuser("UserID")%>&nbsp;</b></font>的收藏夹</TD>
                          </TR>
                        </TBODY>
                      </TABLE></td>
                  </tr>
                  <tr> 
                    <td align="center" valign="middle"> <table width="547" border="0" cellpadding="0" cellspacing="0">
                        <TR align=middle> 
                          <TD height=35> <%
call aspsql()

if request.cookies("buyok")("userid")="" then 
response.redirect "alogin1.asp"
response.end
end if
Set rs = conn.Execute("select * from 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 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 bproduc where ProdId in ("&fav&") order by ProdId") 
%> <table width="547" border="0" cellspacing="0" cellpadding="0" align="center">
                              <tr> 
                                <td> <table border="0" align="center" cellpadding="0" cellspacing="0">
                                    <form action="fav.asp" method="POST" name="check">
                                      <tr align="center" bgcolor="#EEEEEE"> 
                                        <td> <table width="100%"  border="0" cellpadding="0" cellspacing="1" bgcolor="#b1bfee">
                                            <tr bgcolor="#f0f0f0"> 
                                              <td width="60" height="30" align="center" bgcolor="#f4f5fd">选择</td>
                                              <td width="100" align="center" bgcolor="#f4f5fd">商 
                                                品 编 号</td>
                                              <td width="167" height="30" align="center" bgcolor="#f4f5fd">商 
                                                品 名 称</td>
                                              <td width="60" align="center" bgcolor="#f4f5fd">市场价</td>
                                              <td width="60" align="center" bgcolor="#f4f5fd">优惠价</td>
                                              <td width="100" align="center" bgcolor="#f4f5fd">购买</td>
                                            </tr>
                                            <%
Sum = 0
While Not rs.eof
buynum=split(replace(buylist,"'",""),", ")
for i=0 to ubound(buynum)
if rs("prodid")=buynum(i) then
Quatity=buynum(i+1)
exit for
end if
next
if not isNumeric(Quatity) then Quatity=1
If Quatity <= 0 Then Quatity = 1
Sum = Sum + csng(rs("PriceList"))*Quatity*checkuserkou()/10
shichangSum = shichangSum + csng(rs("PriceOrigin"))*Quatity*checkuserkou()/10
%>
                                            <tr bgcolor="#FFFFFF"> 
                                              <td height="30" align="center" valign="middle"> 
                                                <input name="ProdId" type="CheckBox" value="<%=rs("ProdId")%>" checked></td>
                                              <td align="center" valign="middle"><%=rs("ProdId")%></td>
                                              <td height="30" align="center" valign="middle"><font color="B0266D"><A 
                              href="list.asp?ProdId=<%=rs("ProdId")%>" 
                              target=_blank><%=rs("ProdName")%></a></font></td>
                                              <td align="center" class="shich_cont"><%=formatnumber(rs("PriceOrigin"),2)&"元"%></td>
                                              <td align="center"><font color="#FF0000"><SPAN class=hy_cont><font color=#FF3300><%=formatnumber(rs("PriceList"),2)&"元"%></font></SPAN></font></td>
                                              <td align=center><a  href=shop.asp?ProdId=<%=rs("ProdId")%> target="_blank"><img src="images/buy.gif" alt="放入购物车" width="80" height="20" border="0"></a></td>
                                            </tr>
                                            <%
rs.MoveNext
Wend
rs.close
set rs=nothing
%>
                                          </table></td>
                                      </tr>
                                      <tr>
                                        <td colspan="6" bgcolor="#ffffff" height=20 align=left><font color=red>注意：若要删除收藏箱中的商品，请去掉商品前的小勾，再单击“更新收藏”。</font>	
                                        </td>
                                      </tr>
                                      <tr> 
                                        <td colspan="6" bgcolor="#ffffff" height=40 align=center> 
                                          <input name="fav" type="submit" id="fav" class=button value="更新收藏箱"> 
                                          <input name="edit" type="hidden" id="edit" value="ok"> 
                                        </td>
                                      </tr>
                                      <tr> 
                                        <td colspan="6" bgcolor="#ffffff" height=20 align=center> 
                                          &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
                                          &nbsp;&nbsp;&nbsp; </td>
                                      </tr>
                                    </form>
                                  </table></td>
                              </tr>
                            </table></TD>
                        </TR>
                      </table></td>
                  </tr>
                </table></TD>
            </TR>
          </TBODY>
        </TABLE>
        
      </td>
    </tr>
  </table>
  <!--#include file="down.asp"-->

</center>
</body></html>
<%
conn.close
set conn=nothing
%>
