<!--#include file="inc/conn.asp"--> 
<!--#include file="usercookies.asp"-->
<!--#include file="inc/inc.asp"-->
<%dim sc
sc=Request.form("sc")%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=title%>-会员管理中心-收藏夹</title>
</head>
<SCRIPT language=JavaScript>
function CheckAll(form)
  {
  for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.name != 'chkall' )
       e.checked = form.chkall.checked;
    }
  }
//-->
</SCRIPT>
<body topmargin="0">
<%call t()%>
<div align="center">
<table width="755" id="table1" bgcolor="#FFFFFF" style="border-left:1px solid #999999; border-right:1px solid #999999; padding:1px; border-top-width:1px; border-bottom-width:1px" cellspacing="1">
<tr>
<td width="158" height="25" class=td1>
<p align="center">会员管理系统</td>
<td width="1" height="139" rowspan="2">　</td>
<td width="594" height="25" class=td1>
<p align="center">会员管理中心</font>-我的收藏</td>
</tr>
<tr>
<td width="158" height="113" bgcolor="#F6F6F6" valign="top"><!--#include file=userleft.asp--></td>
<td valign="top" bgcolor="#F6F6F6">
<table border="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">

<%if sc<>"" then 
username=request.cookies("cnmai")("username")
id=trim(request("selectedid"))
if trim(id)="" then
response.write "<script language=JavaScript>" & chr(13) & "alert('没有选择记录！');" & "history.back()" & "</script>"
response.end
end if
str2=split(id,",")
set rs=server.createobject("adodb.recordset")
for i=0 to ubound(str2)
sql="delete from [shoucang] where username='"&username&"' and id="&cstr(str2(i))
rs.open sql,conn,1,3
next
response.write "<script language=JavaScript>" & chr(13) & "alert('删除收藏成功！');" & "window.location='u_sc.asp'" & "</script>"
response.end
else%>
<FORM name=thisForm action="u_sc.asp" method=POST>        
<tr>
<td width="6%" height="25" align="center" bgcolor="#FFD8B0">
<p>编号</td>
<td width="59%" height="25" align="center" bgcolor="#FFD8B0">
标&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 题</td>
<td width="15%" height="25" align="center" bgcolor="#FFD8B0">
发布人</td>
<td width="17%" height="25" align="center" bgcolor="#FFD8B0">
收藏时间</td>
<td width="4%" height="25" align="center" bgcolor="#FFD8B0">
　</td>
</tr>
<%
dim ThisPage,Pagesize,Allrecord,Allpage
i=1
if request("page")="" then
  ThisPage=1		
else
  ThisPage=request("page")
end if
username=request.cookies("cnmai")("username")
set rs = Server.CreateObject("ADODB.RecordSet")
sql="select * from [shoucang] where username='"&username&"' order by scsj desc" 
rs.open sql,conn,1,1
if rs.eof then
response.write "<tr><td></td><td><li>没有收藏记录</td></tr>"
else
rs.Pagesize=21
Pagesize=rs.Pagesize
Allrecord=rs.Recordcount
Allpage=rs.Pagecount
if ThisPage<1 then                           
ThisPage=1
end if
On Error Resume Next
rs.move (ThisPage-1)*Pagesize
do while not rs.eof
%>
<tr>
<td width="6%" height="25" align="center" bordercolor="#E1E1E1" style="border-bottom-style: solid; border-bottom-width: 1">
<%=i%>
</td>
<%
set rs1 = Server.CreateObject("ADODB.RecordSet")
sql1="select biaoti,name,a,b from [jle_xinxi] where id="&cstr(rs("scid"))
rs1.open sql1,conn,1,1
b=trim(rs1("b"))
bb=len(b)
On Error Resume Next
%>
<td width="59%" height="25" align="center" bordercolor="#E1E1E1" style="border-bottom-style: solid; border-bottom-width: 1">
<p align="left"><a target="_blank" href="x.asp?cnmai=<%=rs("scid")%>"><%if rs1("a")="0" then%><%=rs1("biaoti")%><%else%><font color="#<%=rs1("a")%>"><%=rs1("biaoti")%></font><%end if%></a><%if b<>0 then%><img src="image/num/jsq.gif"><%for i=1 to bb%><img src="image/num/<%=Mid(b,i,1)%>.gif"><%next%><%end if%>
</td>
<td width="15%" height="25" align="center" bordercolor="#E1E1E1" style="border-bottom-style: solid; border-bottom-width: 1">
<%=rs1("name")%>
</td>
<%
rs1.close
set rs1=nothing
%>
<td width="17%" height="25" align="center" bordercolor="#E1E1E1" style="border-bottom-style: solid; border-bottom-width: 1">
<%=datevalue(rs("scsj"))%>
</td>
<td width="4%" height="25" align="center" bordercolor="#E1E1E1" style="border-bottom-style: solid; border-bottom-width: 1">
<input type="checkbox" name="selectedid" value="<%=rs("id")%>"></td>
</tr>
<%
i=i+1
rs.movenext
if i>=Pagesize then exit do
loop
end if
%>        <tr>
<td width="99%" height="25" colspan="5">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr> 
<td height="25" width="151">
<p align="center">
　</td>
<td height="25" width="126">
<p align="center">　</td>
<td height="25" width="118">
<p align="right">　</td>
<td height="25" width="200">
<p align="center">
<INPUT onclick=CheckAll(this.form) type=checkbox value=on name=chkall>选中所有记录&nbsp;&nbsp; 
<input onclick=javascript:showoperatealert(1) type="submit" value="删除" name="sc"></td>
</tr>
<tr> 
<td height="25" width="151" align="center" bgcolor="#FFD8B0">
共有&nbsp;<font color="#CC5200"><%=Allrecord%></font>&nbsp;条记录</td>
<td height="25" width="126" align="center" bgcolor="#FFD8B0">
共 <font color="#CC5200"><%=Allpage%></font> 页</td>
<td height="25" width="118" align="center" bgcolor="#FFD8B0">
现在是第 
<font color="#CC5200"><%=ThisPage%></font> 页</td>
<td height="25" width="200" align="center" bgcolor="#FFD8B0">
<%
if ThisPage<2 then     
response.write "<font color=""#808080"">首页</font>&nbsp;"
response.write "<font color=""#808080"">上一页</font>&nbsp;"     
else     
response.write "<a href=?page=1>首页</a>&nbsp;"
response.write "<a href=?page="&ThisPage-1&">上一页</a>&nbsp;"     
end if
if Allpage-ThisPage<1 then     
response.write "<font color=""#808080"">下一页</font>&nbsp;"
response.write "<font color=""#808080"">尾页</font>&nbsp;"  
else     
response.write "<a href=?page="&(ThisPage+1)&">下一页</a>&nbsp;"   
response.write "<a href=?page="&Allpage&">尾页</a>&nbsp;"     
end if
%></td>
</tr>
</table>
</td>
</tr>
</form>
<%end if%>
</table>
</td>
</tr>
</table>
</div>
<!--#include file="foot.asp"-->
</body>
</html>
<%
rs.close
set rs=nothing
closedb
%>