<!--#include file="../fy_inc/fy.User.asp"-->
 <!--#include file="../fy_inc/cls_pageview.asp"-->
<% 
	 dim   UserHS,ModeID,ID
  	Set UserHS = New ACT_User
	IF Cbool(UserHS.UserLoginChecked)=false then
	  echo "<script>top.location.href ='login.asp' ;</script>"
	  Response.end
	End If	
 	
	
   if request("Action")="Add" then 
		set rs=fycms.actexe("select * from Show_fy  Where   UserID="& UserHS.UserID &" and  acticleID= "&ChkNumeric(fycms.s("ID")))
    	if not rs.eof then echo "该内容已经被收藏":response.end
		set rs=fycms.actexe("select * from "&fycms.ACT_C(ChkNumeric(fycms.s("ModeID")),2)&"  Where  ID= "&ChkNumeric(fycms.s("ID")))
    	if  rs.eof then echo "没有该文章":response.end
		Dim  rs2
		sql = "Select  * from Show_fy"
		Set rs2 = Server.CreateObject("Adodb.RecordSet")
		rs2.Open sql, Conn, 1, 3
		rs2.AddNew
		rs2("UserID") = UserHS.UserID
		rs2("acticleID") = ChkNumeric(fycms.s("ID"))
		rs2("ModeID") = ChkNumeric(fycms.s("ModeID"))
 		
		rs2("AddDate") =now
 		rs2.Update
		rs2.Close:Set rs2 = Nothing
		
		echo "收藏成功,请继续":response.end
   
   end if 
  if request("A")="Del" then 
    ID=ChkNumeric(fycms.s("ID"))
	If ID="0" Then Call fycms.Alert("你没有选中要删除的内容!",""):Response.End
	Conn.execute("Delete from Show_fy  Where   UserID="& UserHS.UserID &"  and  id= "&ID)
 	Response.Redirect "?"
  End if
	
	
%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>会员中心</title>
<script language="JavaScript" src="main.js"></script>
 <link href="images/css.css" rel="stylesheet" type="text/css" />
 </head>
<body style="background-color:#fff">
<div id="head">
  <div id="logo"><a href="index.asp" alt=""><img src="images/logo_member.gif" alt="fycms"></a></div><div id="banner"></div>
</div>
<div id="membermenu">
<!--#include file="menu.asp"-->

</div>
 
<div id="main">
 <div id="left">
  <div id="treemenu">
    <h5>基本设置</h5>
    <div style="text-align:center;">
    <img src="<%If Trim(UserHS.myface)<>"" Then 
		echo UserHS.myface
	Else 
		echo "images/nophoto.gif" 
	End If 
	
	%> " alt="fycms" height="150" width="150"/>
	</div>
    <table cellpadding="0" cellspacing="0" class="member_info">
    <tr>
      <th>用户名：</th><td><%=UserHS.username%></td>
    </tr>
    <tr>
      <th>用户组：</th><td><%=UserHS.G_Name%></td>
    </tr>
     </table>
    <ul>
       <li><a href="edit.asp">修改资料</a></li>
      <li><a href="editpwd.asp">修改密码</a></li>
    </ul>
  </div>
  <ol>
    <li class="local"><a href="<%= fycms.Domain%>">返回网站首页</a></li>
    <li class="exit"><a href="Checklogin.asp?Action=LoginOut">退出登录</a></li>
  </ol>
</div>
  <div id="right">

<p id="position"><strong>当前位置：</strong><a href="index.asp">会员中心</a>收藏夹管理</p>
<div class="clear"></div>
<div class="clear"></div>


 <table cellpadding="0" cellspacing="1" class="table_list">
  <caption>管理信息</caption>
<tr>
<th width="45">ID</th>
<th width="460">标题</th>
<th width="70">收藏时间</th>
<th width="120">管理操作</th>
</tr>
<% 	Dim strLocalUrl
	strLocalUrl = request.ServerVariables("SCRIPT_NAME")
	
	Dim intPageNow
	intPageNow = request.QueryString("page")
	
	Dim intPageSize, strPageInfo
	intPageSize = 20
	
	Dim arrinfo, i
	Dim sql, sqlCount,Sqls,pages
	pages = "page"
    Sqls = " where   UserID="& UserHS.UserID 
  	sql = "SELECT [ModeID],[acticleID],[userid],[id],[AddDate]" & _
		" FROM [Show_fy]" &Sqls& _
		" ORDER BY [ID] DESC"
 	sqlCount = "SELECT Count([ID])" & _
			" FROM [Show_fy]"&Sqls
		Dim clsRecordInfo
		Set clsRecordInfo = New Cls_PageView
			clsRecordInfo.intRecordCount = 2816
			clsRecordInfo.strSqlCount = sqlCount
			clsRecordInfo.strSql = sql
			clsRecordInfo.intPageSize = intPageSize
			clsRecordInfo.intPageNow = intPageNow
			clsRecordInfo.strPageUrl = strLocalUrl
			clsRecordInfo.strPageVar = pages
		clsRecordInfo.objConn = Conn		
		arrinfo = clsRecordInfo.arrinfo
		strPageInfo = clsRecordInfo.strPageInfo
		Set clsRecordInfo = nothing
 		If IsArray(arrinfo) Then
			For i = 0 to UBound(arrinfo, 2)
 	%>
    <tr>
    <td align="center"><%= arrinfo(4,i) %></td>
<td class="align_left">
<%dim rs,title
set Rs=fycms.ActExe("Select * from "&fycms.ACT_C(arrinfo(0,i),2)&"  Where ID=" & arrinfo(1,i) & "")
if not rs.eof then title=rs("title")
 %>

<a  href="../List.asp?C-<%= arrinfo(0,i) %>-<%= arrinfo(1,i) %>.Html" target="_blank">
<%= title %></a></td>
<td class="align_c"><%= arrinfo(4,i) %></td>
<td class="align_c"><a href="?A=Del&ID=<%= arrinfo(3,i) %>"  onClick="return confirm('确认删除该收藏吗?此操作不可恢复!')">删除</a> 
        
           </td>
</tr>

<% 
	Next
	End If
	%>
     </table>
    <div class="button_box">
        </div>
 <div id="pages">
<%= strPageInfo%>
 </div>


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

</body>
</html>