<!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=utf-8" />
<title>无标题文档</title>
<link type="text/css" rel="stylesheet" href="../Css/style.css" />
<script language="javascript" type="text/javascript" src="../jQuery/lib/jquery.js"></script>
<script language="javascript" type="text/javascript" src="../js/WebSite.js"></script>
</head>
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/Function.asp"-->
<!--#include file="../../inc/Config.asp"-->
<%Call ChkLogin(session("WebAdminsUserName"))%>
<body>
<form action="Delete.asp" method="post" name="frm" onsubmit="return Confirm('确定要执行此操作吗?')">
<input type="hidden" name="Action" value="DelLink">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <th width="5%">序号</th>
    <th width="20%">图片</th>
    <th width="12%">文字名称</th>
    <th width="15%">类别</th>
	<th width="10%">发布人</th>
    <th width="15%">发布日期</th>
    <th width="20%">操作</th>
  </tr>
  <%
  	Call ConnectionDataBase(2)
	ArrLinkType = Split(LinkType,",")	
	Sql = "SELECT * FROM T_FriendLink WHERE Recycle=true ORDER BY SortID DESC,AddTime DESC"
	SetRs Rs,Sql,conn,1,1
	IF Rs.eof And Rs.bof Then
		Response.write "<tr><td colspan='7'>&nbsp;没有相关记录!</td></tr>"
	Else
		n=0
		Rs.pagesize=10
		IF Not isempty(request("page")) And isnumeric(request("page")) Then 				  
			p=cint(request("page"))   
			IF p>Rs.pagecount Then p=Rs.pagecount
		Else   
			p=1
		End IF             
		Rs.AbsolutePage=p
		do while not Rs.eof	
		IF Rs("PicPath")="" Then
			PicPath = "../images/nopic.jpg"
		Else
			PicPath = "../../UpLoadFiles/FriendLink/" & Rs("PicPath")
		End IF
  %>
  <tr>
    <td align="center"><%=n+1%></td>
    <td align="center"><img src="<%=PicPath%>" width="100" height="30" style="border:1px solid #ccc; margin:5px 0 5px 0"></td>
    <td align="center"><%=Rs("LinkName")%></td>
    <td align="center">
	<%For i=0 To UBOUND(LinkClass)
	IF Rs("LinkType")=LinkClass(i,0) Then 
		Response.Write LinkClass(i,1)
		Exit For
	End IF
	Next%>
	</td>
	<td align="center">
	<%
	IF Rs("UserID")=0 Then
		Response.Write("管理员")
	Else
		StrSql="Select TOP 1 UserName From T_Users Where ID=" & Rs("UserID")
		SetRs Rs1,StrSql,conn,1,1
		IF Not Rs1.Eof Then Response.Write(Rs1("UserName"))
		DisRs Rs1
	End IF
	%>
	</td>
    <td align="center"><%=Formatdatetime(Rs("AddTime"),2)%></td>
    <td align="center">
    <input type="button" value="修改" class="btn1" onclick="window.location.href='LinkEdit.asp?Act=Edit&id=<%=Rs("ID")%>'" />
    <input name="ChkBox" type="checkbox" value="<%=Rs("ID")%>" />
    </td>
  </tr>
  <%  
		n=n+1     
		Rs.movenext
		IF n>=Rs.pagesize Then Exit Do
		Loop
    End IF
  %>
  <tr>
    <th colspan="6" align="right" class="FontWeight">
	<%Call showpage(Rs.pagesize,Rs.recordcount,p,Rs.pagecount,"")%>
	</th>    
	<th>
    <input type="submit" name="btnSubmit" value="还原" class="btn">
    <input type="submit" name="btnSubmit" value="清空" class="btn">
    <input name="" type="checkbox" value="" style="margin-left:10px" onclick="CheckAll(this.checked);"/>全选/反选
    <%
	DisRs Rs
	Call CloseDataBase
	%>
    </th>
  </tr>
</table>
</form>
</body>
</html>
