<%@ Language=VBScript %>
<!--#include File="../Functions2.asp"-->
<!--#include file="../../yns_chklogin.asp" -->
<!--#include File="../Const.asp"-->

<%
Dim Page
Page = Request("Page")
If Page = "" Then
  Page = 1
End If
Dim IsFirst
IsFirst = Request("IsFirst")
If IsEmpty(IsFirst) Or IsNull(IsFirst) Then
	IsFirst = 0
End If

Dim MyConn, RS, SqlSelect
Set MyConn = Server.CreateObject("Adodb.Connection")
Set MyConn = GetConnection
Set RS = Server.CreateObject("Adodb.RecordSet")

SqlSelect = "Select * From LinkInfo"

RS.Open SqlSelect, MyConn, 3, 3
RS.PageSize = LinkPageSize
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<link rel="stylesheet" href="../../zf.css">
<TITLE>友情连接列表</TITLE>
</HEAD>

<script language=javascript>
<!--
function ShowDetailLink(LinkID)
{
	window.open('ShowOneLink.asp?LinkID=' + LinkID,null,'top=' + screen.availHeight*0.382-150 + ',left=' + screen.availWidth*0.382-225 + ',height=300,width=450,status=no,toolbar=no,scrollbars=yes,menubar=no,location=no',false);
	return false;
}

function ifrefresh()
	{
	if (isfirst.value==0)
		isfirst.value=1;
	else
		window.location='ListLink.asp?IsFirst=0';
	}
//-->
</script>

<BODY onload="ifrefresh();" bgcolor="#ffffff">
<input type=hidden id=isfirst name=isfirst value=<%=IsFirst%>>
<table>
  <%If RS.EOF Then%>
  <tr>
    <td valign=middle height=60 align=center>
      对不起，系统中还没有友情连接！<br>
      <a href=../default.asp target=_top>返回</a>
      &nbsp;&nbsp;&nbsp;&nbsp;
      <a href=AddLink.asp>添加</a>
    </td>
  </tr>
  <%
  Else
  %>
   <tr>
    <td height=40 valign=bottom align=right>
      <a href=AddLink.asp>添加友情连接</a>
      /
      <a href=../default.asp target=_top>返回</a>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    </td>
  </tr>
  <tr>
    <td align=center>友情连接列表</td>
  </tr>
 <tr>
    <td><HR></td>
  </tr>
  <tr>
    <td><%ShowOnePageLink RS, Page%></td>
  </tr>
  <tr>
    <td height=20><HR></td>
  </tr>
  <tr>
    <td><%ShowPageBorrows FileName, Page, RS%></td>
  </tr>
</table>
<%
  End If
RS.Close
Set RS = Nothing
MyConn.Close
Set MyConn = Nothing
%>
</BODY>
</HTML>
