<%
'商易仿淘宝4.0(多用户)
'ACCESS版演示网站：http://www.ftaobao.com(商易仿淘宝商城)
'SQL版演示网站：http://sql.ftaobao.com
'电话：0571-56907100
'QQ：1147100
%>
<%titlename="我的收藏"%>
<body onLoad="show(A31),show(A32)">
<!--#include file="top.asp"-->
<!--#include file="../include/money.asp"-->
<!--#include file="../include/tishi.asp"-->
<html><head>
<meta http-equiv=Content-Type content='text/html; charset=gb2312'>
<link href="/include/css.css" rel="stylesheet" type="text/css">
<title><%=my_name%>-----会员中心-----我的收藏</title></head>
<%hy "login.asp"
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
%>
<table width="762" border="0" align="center" cellpadding="2" cellspacing="0" style='BORDER-COLLAPSE: collapse;MARGIN: 3px'>
  <tr> 
    <td height="22" colspan="2"><a href="../index.asp">首页</a> &gt;&gt; 我的收藏</td>
  </tr>
  <tr> 
    <td width="180" valign="top"> 
      <!--#include file="left.asp"-->
    </td>
    <td width="582" height="280" valign="top">
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr> 
              <td> 
                <table border="0" align="left" cellpadding="0" cellspacing="0">
                  <tr> 
                    <td width="1"><IMG SRC="../images/mytaobaobj1_3.gif" WIDTH=3 HEIGHT=25 ALT=""></td>
                    <td width="120" align="center" background="../images/mytaobaobj1_4.gif"><font color="#FFFFFF" span class="C"><a href="?type=1">我收藏的商品</a></font></td>
                    <td width="1"><IMG SRC="../images/mytaobaobj1_6.gif" WIDTH=7 HEIGHT=25 ALT=""></td>
                  </tr>
                </table>
                <table border="0" align="left" cellpadding="0" cellspacing="0">
                  <tr> 
                    <td width="1"><IMG SRC="../images/mytaobaobj1_8.gif" WIDTH=3 HEIGHT=25 ALT=""></td>
                    <td width="120" align="center" background="../images/mytaobaobj1_9.gif"><font color="#FF0000"><span class="C"><a href="?type=2">我收藏的店铺</a></span></font></td>
                    <td width="1"><IMG SRC="../images/mytaobaobj1_11.gif" WIDTH=7 HEIGHT=25 ALT=""></td>
                  </tr>
                </table>
                <table border="0" align="left" cellpadding="0" cellspacing="0">
                  <tr> 
                    <td width="1"><IMG SRC="../images/mytaobaobj1_8.gif" WIDTH=3 HEIGHT=25 ALT=""></td>
                    <td width="120" align="center" background="../images/mytaobaobj1_9.gif"><font color="#FF0000"><span class="C"><a href="?type=3">我收藏的搜索</a></span></font></td>
                    <td width="1"><IMG SRC="../images/mytaobaobj1_11.gif" WIDTH=7 HEIGHT=25 ALT=""></td>
                  </tr>
                </table>
              </td>
            </tr>
        </table>
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
	      <tr>
	        <td height="4" bgcolor="1E88C1"></td>
	      </tr>
      </table>				  
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td height="5"></td>
          </tr>
      </table>
	  
<%
If request("type")<>"" And request("id")<>""  And request("del")="" then
select case request("type")
Case "1"
if shopnet("id")<>"" then
set rs = conn.execute("select * from shoucang where cp_id="&decode(shopnet("id"))&" and huiyuan='"&Request.Cookies(Rikee)("huiyuan")&"' and type=1")
if rs.eof then
conn.execute("Insert into shoucang(cp_id,huiyuan,type)values("&decode(shopnet("id"))&",'"&Request.Cookies(Rikee)("huiyuan")&"',"&shopnet("type")&")")
Else
response.Write("<Script>alert('该商品已经收藏！');window.location='"&server_v1&"';</script>")
end if
End If
Case "2"
if shopnet("id")<>"" then
set rs = conn.execute("select * from shoucang where shopid="&shopnet("id")&" and huiyuan='"&Request.Cookies(Rikee)("huiyuan")&"' and type=2")
if rs.eof then
conn.execute("Insert into shoucang(shopid,huiyuan,type)values("&shopnet("id")&",'"&Request.Cookies(Rikee)("huiyuan")&"',"&shopnet("type")&")")
Else
response.Write("<Script>alert('该店铺已经收藏！');window.location='"&server_v1&"';</script>")
end if
End If
Case "3"
if shopnet("id")<>"" then
set rs = conn.execute("select * from shoucang where sousuo='"&server_v1&"' and huiyuan='"&Request.Cookies(Rikee)("huiyuan")&"' and type=3")
if rs.eof Then
If shopnet("lbid")="" Then 
lbid=0
Else
lbid=shopnet("lbid")
End If

If shopnet("xlbid")="" Then 
xlbid=0
Else
xlbid=shopnet("xlbid")
End If
conn.execute("Insert into shoucang(xlbid,lbid,sousuo,huiyuan,type)values("&xlbid&","&lbid&",'"&server_v1&"','"&Request.Cookies(Rikee)("huiyuan")&"',"&shopnet("type")&")")
Else
response.Write("<Script>alert('该搜索页面已经收藏！');window.location='"&server_v1&"';</script>")
end if
End If
End Select 
End if
'处理请求
if request("del")="yes" and request("id")<>""then

if Request.Cookies(Rikee)("huiyuan")<>"" then
conn.execute("Delete * from shoucang where id="&decode(shopnet("id"))&"")
Response.redirect "shoucang.asp?type="&shopnet("type")&""
else
Response.Write("对不起，您不能删除该条信息。如有疑问请与网站管理员联系。")
end if
end if
%> <%If shopnet("type")=1 then%>
<br>
<%msg1=conn.execute("select count(id) from shoucang where huiyuan='"&Request.Cookies(Rikee)("huiyuan")&"' and type=3")(0)  
if msg1="" then
msg1=0
End If
msg=" 您一共收藏了 "&msg1&" 个商品."
%>
<%wmsg()%>
<Br>
<table width="98%" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="#efefef">
          
          <tr bgcolor="#f1f1f1"> 
            <td width="241" height="21" valign="middle" background="../image/bk.gif" bgcolor="#f1f1f1" class="d13"> <div align="center">商品名称</div></td>
            <td width="112" height="21" valign="middle" background="../image/bk.gif" bgcolor="#f1f1f1" class="d13"> <div align="center">剩余商品数量</div></td>
            <td width="75" height="21" valign="middle" background="../image/bk.gif" bgcolor="#f1f1f1" class="d13"> <div align="center">价格</div></td>
            <td width="50" height="21" valign="middle" background="../image/bk.gif" bgcolor="#f1f1f1" class="d13"> <div align="center">购买</div></td>
            <td width="50" height="21" align="center" valign="middle" background="../image/bk.gif" bgcolor="#f1f1f1" class="d13"> <div align="center">操作</div></td>
          </tr>
<%set rs = conn.execute("select * from shoucang where huiyuan='"&Request.Cookies(Rikee)("huiyuan")&"' and type=1")		  

if rs.eof then
response.write"<tr><td colspan=5 align=center bgcolor=white>没有收藏商品！</td></tr>"
end if 

while not rs.eof
set rs2 = conn.execute("select * from chanpin where id="&rs("cp_id")&"")%>
          <tr> 
            <td height="11" bgcolor="#FFFFFF" class="unnamed1"> <div align="center"><a href=../merchandise.asp?id=<%=encode(rs2("id"))%> target=_blank><%=rs2("mc")%></a></div></td>
            <td width="112" height="11" bgcolor="#FFFFFF" class="unnamed2"> <div align="center"><font color="#FF0000"><b><%=rs2("number")%></b></font></div></td>
            <td width="75" height="11" bgcolor="#FFFFFF" class="unnamed1"> <div align="center"><font color="#FF0000"><b><%=rs2("jg2")%></b></font></div></td>
            <td width="50" height="11" bgcolor="#FFFFFF" class="unnamed1"> <div align="center"><a href="../buy.asp?userid=<%=encode(rs2("userid"))%>&cpid=<%=encode(rs2("id"))%>">购买</a></div></td>
            <td width="50" height="11" bgcolor="#FFFFFF" class="unnamed1"> <div align="center"><a href="?type=<%=shopnet("type")%>&del=yes&id=<%=encode(rs("id"))%>">移除</a> 
              </div></td>
          </tr>
          <tr>
            <td height="21" colspan="5" background="../image/bk1.gif" bgcolor="#FFFFFF" class="unnamed1">&nbsp;</td>
          </tr>
<%rs2.close
set rs2=nothing
rs.movenext
wend
rs.close
set rs=nothing%>
    </table>
<br>

      <%elseIf shopnet("type")=2 then%>
<br>
<%msg1=conn.execute("select count(id) from shoucang where huiyuan='"&Request.Cookies(Rikee)("huiyuan")&"' and type=2")(0)  
if msg1="" then
msg1=0
End If
msg=" 您一共收藏了 "&msg1&" 个店铺."
%>
<%wmsg()%>
<br>
	  <table width="98%" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="#efefef">
        <tr bgcolor="#f1f1f1">
          <td width="241" height="21" valign="middle" background="../image/bk.gif" class="d13"><div align="center">店铺名称</div></td>
          <td width="112" height="21" valign="middle" background="../image/bk.gif" class="d13"><div align="center">店铺掌柜</div></td>
          <td height="21" valign="middle" background="../image/bk.gif" class="d13"><div align="center">收藏时间</div>            <div align="center"></div></td>
          <td width="50" height="21" align="center" valign="middle" background="../image/bk.gif" class="d13"><div align="center">操作</div></td>
        </tr>
        <%set rs = conn.execute("select * from shoucang where huiyuan='"&Request.Cookies(Rikee)("huiyuan")&"' and type=2")		  
if rs.eof then
response.write"<tr><td colspan=4 align=center bgcolor=white>没有收藏店铺！</td></tr>"
end if 

while not rs.eof
set rs2 = conn.execute("select * from shop where id="&rs("shopid")&"")%>
        <tr>
          <td height="11" bgcolor="#FFFFFF" class="unnamed1"><div align="center"><a href=../shop/1/myshop.asp?shopid=<%=rs2("id")%> target=_blank><%=rs2("name")%></a></div></td>
          <td width="112" height="11" bgcolor="#FFFFFF" class="unnamed2"><div align="center"><font color="#FF0000"><b><a href="../zhanneixin/fa.asp?huiyuan=<%=rs2("huiyuan")%>"><%=rs2("name2")%></a></b></font></div></td>
          <td height="11" bgcolor="#FFFFFF" class="unnamed1"><div align="center"><font color="#FF0000"><b><%=rs("sj")%></b></font></div></td>
          <td width="50" height="11" bgcolor="#FFFFFF" class="unnamed1"><div align="center"><a href="?type=<%=shopnet("type")%>&del=yes&id=<%=encode(rs("id"))%>">移除</a> </div></td>
        </tr>
        <tr>
          <td height="21" colspan="4" background="../image/bk1.gif" bgcolor="#FFFFFF" class="unnamed1">&nbsp;</td>
        </tr>
        <%rs2.close
set rs2=nothing
rs.movenext
wend
rs.close
set rs=nothing%>
      </table>
      <br>
      <%else%>
<br>
<%msg1=conn.execute("select count(id) from shoucang where huiyuan='"&Request.Cookies(Rikee)("huiyuan")&"' and type=3")(0)  
if msg1="" then
msg1=0
End If
msg=" 您一共收藏了 "&msg1&" 个搜索."
%>
<%wmsg()%>
<br>
	  <table width="98%" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="#efefef">
        <tr bgcolor="#f1f1f1">
          <td width="196" height="21" valign="middle" background="../image/bk.gif" class="d13"><div align="center">类目</div></td>
          <td width="297" height="21" valign="middle" background="../image/bk.gif" class="d13"><div align="center">搜索页面</div>            <div align="center"></div></td>
          <td width="50" height="21" align="center" valign="middle" background="../image/bk.gif" class="d13"><div align="center">操作</div></td>
        </tr>
        <%set rs2 = conn.execute("select * from shoucang where huiyuan='"&Request.Cookies(Rikee)("huiyuan")&"' and type=3")		  
if rs2.eof then
response.write"<tr><td colspan=3 align=center bgcolor=white>没有收藏搜索！</td></tr>"
else
while not rs2.eof
%>
        <tr><%If Rs2("lbid")<>0 Then xxx=conn.execute("select lbname from lb where lbid="&Rs2("lbid")&"")(0) End if%>
		<%If Rs2("xlbid")<>0 Then xxxx=conn.execute("select xlbname from xlb where xlbid="&Rs2("xlbid")&"")(0) End if%>

          <td height="11" bgcolor="#FFFFFF" class="unnamed1"><div align="center"><a href="../ProductList.asp?lbid=<%=Rs2("lbid")%>"><%=xxx%></a><br><a href="../ProductList.asp?lbid=<%=Rs2("lbid")%>&xlbid=<%=Rs2("xlbid")%>"><%=xxxx%></a></div></td>
          <td height="11" bgcolor="#FFFFFF" class="unnamed2"><div align="center"><font color="#FF0000"><b><a href="<%=rs2("sousuo")%>"><%=InterceptString(rs2("sousuo"),36)%>....</a></b></font></div>            <div align="center"></div>            <div align="center"></div></td>
          <td width="50" height="11" bgcolor="#FFFFFF" class="unnamed1"><div align="center"><a href="?type=<%=shopnet("type")%>&del=yes&id=<%=encode(rs2("id"))%>">移除</a> </div></td>
        </tr>
       
        <%
rs2.movenext
Wend
rs2.close
set rs2=nothing
%> <tr>
          <td height="21" colspan="3" background="../image/bk1.gif" bgcolor="#FFFFFF" class="unnamed1">&nbsp;</td>
        </tr><%end if%>
      </table>
      <br>
    </td>
      </tr>
      </table>
    </td>
      </tr>
</table>

      <%End if%>
      </td>
  </tr>
</table>
<!--#include file="../bottom.asp"-->
