<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="inc/function.asp"-->
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/Conn_User.asp"-->
<%
'请勿改动下面这三行代码
const ChannelID=2
Const ShowRunTime="Yes"
SkinID=0
dim sqlLink,rsLink,LinkType
LinkType=trim(request("LinkType"))
strFileName="FriendSite.asp?LinkType=" & LinkType
MaxPerPage=20
PageTitle="友情链接"

sqlLink="select * from FriendSite where IsOK=True "
if LinkType<>"" then
	LinkType=CInt(LinkType)
	if LinkType=1 then
		sqlLink=sqlLink & " and LinkType=1 "
	elseif LinkType=2 then
		sqlLink=sqlLink & " and LinkType=2 "
	end if
end if
sqlLink=sqlLink & " order by id desc"
set rsLink=server.createobject("adodb.recordset")
rsLink.open sqlLink,conn,1,1
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=SiteName%> >>> 友情链接</title>
<link href="img0415/css.CSS" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.STYLE1 {
	color: #FF6600;
	font-weight: bold;
}
.STYLE2 {
	color: #993300;
	font-weight: bold;
}
-->
</style>

</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="5" bgcolor="f2f2f2"></td>
    <td width="1" bgcolor="cccccc"></td>
    <td width="888" align="center" bgcolor="#FFFFFF"> 
      <table width="870" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="4" rowspan="2" valign="top"><img src="img0415/top1.gif" width="4" height="6"></td>
          <td height="6" background="img0415/topbg.gif"><img src="img0415/topbg2.gif" width="8" height="6"></td>
          <td width="223" rowspan="2" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="23"><img src="img0415/top2.gif" width="23" height="25"></td>
                <td background="img0415/topbbg.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr align="center"> 
                      <td><a href=# onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('<%=SiteUrl%>');">设为首页</a></td>
                      <td width="1"><img src="img0415/hline.gif" width="1" height="24"></td>
                      <td><a target=_top href=javascript:window.external.AddFavorite('<%=SiteUrl%>','<%=SiteName%>')>
加入收藏</a></td>
                      <td width="1"><img src="img0415/hline.gif" width="1" height="24"></td>
                      <td><a href=mailto:<%=WebmasterEmail%>>联系我们</a></td>
                    </tr>
                  </table></td>
                <td width="11"><img src="img0415/top3.gif" width="11" height="25"></td>
              </tr>
            </table></td>
        </tr>
        <tr> 
          <td><table width="100%" height="60" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td width="130"><img src="img0415/logo.gif" width="115" height="31"></td>
                <td width="60"><strong><font color="#FF6600">注册~</font></strong><br>
                  Register</td>
                <td valign="bottom">
<table border="0" align="right" cellpadding="0" cellspacing="0">
                    <tr>
                      <td><a href="index.asp"><img src="img0415/home1.gif" width="67" height="43" border="0"></a></td>
                      <td><a href="zone.asp"><img src="img0415/zone.gif" width="80" height="43" border="0"></a></td>
                      <td><a href="photo_index.asp"><img src="img0415/photo.gif" width="80" height="43" border="0"></a></td>
                      <td><a href="blog.asp"><img src="img0415/blog.gif" width="80" height="43" border="0"></a></td>
                      <td><a href="shop.asp"><img src="img0415/shop.gif" width="83" height="43" border="0"></a></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
    <td width="1" bgcolor="#CCCCCC"><img src="img0415/space.gif" width="1" height="1"><img src="img0415/space.gif"></td>
    <td width="5" bgcolor="f2f2f2"></td>
  </tr>
</table>
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="5" bgcolor="f2f2f2"></td>
    <td width="1" bgcolor="cccccc"></td>
    <td width="888" align="center" bgcolor="#FFFFFF"><table width="870" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="7"><img src="img0415/menu1.gif" width="7" height="31"></td>
          <td align="left" background="img0415/menubg.gif"><strong><font color="#FFFFFF">
            <% call ShowUserLogin2() %>
          </font></strong></td>
          <td width="50" background="img0415/menubg.gif"><a href="help.asp" target="_blank"><img src="img0415/faq.gif" width="42" height="15" border="0"></a></td>
          <td width="7"><img src="img0415/menu2.gif" width="7" height="31"></td>
        </tr>
      </table> 
      
    </td>
    <td width="1" bgcolor="#CCCCCC"><img src="img0415/space.gif" width="1" height="1"><img src="img0415/space.gif"></td>
    <td width="5" bgcolor="f2f2f2"></td>
  </tr>
</table>
<!--#include file="ad.asp"-->
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="5" bgcolor="f2f2f2"></td>
    <td width="1" bgcolor="cccccc"></td>
    <td width="888" align="center" bgcolor="#FFFFFF"><table width="760" border="0" align="center"  cellpadding="0" cellspacing="0">
      <tr>
        <td height="10"></td>
      </tr>
    </table>
      <table width="870" height="8" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="1" height="1"><img src="img0415/space.gif" width="1" height="1"></td>
              <td colspan="2" bgcolor="#CCCCCC"></td>
              <td width="1"></td>
            </tr>
            <tr>
              <td width="1" bgcolor="#CCCCCC"><img src="img0415/space.gif" width="1" height="1"></td>
              <td width="330" height="26" bgcolor="f2f2f2">&nbsp;&nbsp;<strong><font color="#0064B5" style='FONT-SIZE: 14px'>友情链接</font></strong>&nbsp;<font color="#999999" style='FONT-SIZE: 10px'>FriendSite</font></td>
              <td bgcolor="f2f2f2">&nbsp;</td>
              <td width="1" bgcolor="#CCCCCC"><img src="img0415/space.gif" width="1" height="1"></td>
            </tr>
          </table>
            <table width="100%" height="50" border="0" cellpadding="10" cellspacing="1" bgcolor="#CCCCCC">
              <tr>
                <td bgcolor="#FFFFFF"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="border2">
                  <tr>
                    <td height="30" valign="top"><div align="center"><a href="FriendSiteReg.asp">申请链接</a>&nbsp;|&nbsp;<a href="FriendSite.asp?LinkType=2">文字链接</a>&nbsp;|&nbsp;<a href="FriendSite.asp?LinkType=1">LOGO链接</a>&nbsp;|&nbsp;<a href="FriendSite.asp">所有链接</a></div></td>
                  </tr>
                  <tr>
                    <td><%
  	if rsLink.eof and rsLink.bof then
		response.write "<table width='760'align='center'><tr><td height='50'>目前共有 0 个友情链接</td></tr></table>"
	else
    	totalPut=rsLink.recordcount
		if currentpage<1 then
       		currentpage=1
    	end if
    	if (currentpage-1)*MaxPerPage>totalput then
	   		if (totalPut mod MaxPerPage)=0 then
	     		currentpage= totalPut \ MaxPerPage
		  	else
		      	currentpage= totalPut \ MaxPerPage + 1
	   		end if

    	end if
	    if currentPage=1 then
        	showContent
        	showpage strFileName,totalput,MaxPerPage,true,true,"个站点"
   	 	else
   	     	if (currentPage-1)*MaxPerPage<totalPut then
         	   	rsLink.move  (currentPage-1)*MaxPerPage
         		dim bookmark
           		bookmark=rsLink.bookmark
            	showContent
            	showpage strFileName,totalput,MaxPerPage,true,true,"个站点"
        	else
	        	currentPage=1
           		showContent
           		showpage strFileName,totalput,MaxPerPage,true,true,"个站点"
	    	end if
		end if
	end if

sub showContent
   	dim i
    i=0
%>
                        <table width="100%" border="0" align="center" cellpadding="8" cellspacing="1" bgcolor="#CCCCCC">
                          <tr bgcolor="f2f2f2" class="tdbg_leftall">
                            <td width="80" height="22" align="center">链接类型</td>
                            <td width="100" height="22" align="center">网站名称</td>
                            <td width="88" align="center">网站LOGO</td>
                            <td height="22" align="center">网站简介</td>
                            <td width="60" height="22" align="center">站长</td>
                          </tr>
                          <%
	do while not rsLink.eof
%>
                          <tr bgcolor="#FFFFFF">
                            <td width="80" align="center"><%
	  if rsLink("LinkType")=1 then
	  	response.write "<a href='FriendSite.asp?LinkType=1'>LOGO链接</a>"
	  else
		response.write "<a href='FriendSite.asp?LinkType=2'>文字链接</a>"
	  end if
	  %>                            </td>
                            <td width="100"><div align="center"><a href="<%=rsLink("SiteUrl")%>" target='blank' title="<%=rsLink("SiteUrl")%>"><%=rsLink("SiteName")%></a></div></td>
                            <td align="center"><%
if rsLink("LinkType")=1 then
	if rsLink("LogoUrl")<>"" and rsLink("LogoUrl")<>"http://" then
		if lcase(right(rsLink("LogoUrl"),3))="swf" then
			Response.Write "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='88' height='31'><param name='movie' value='" & rsLink("ImgUrl") & "'><param name='quality' value='high'><embed src='" & rsLink("LogoUrl") & "' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='88' height='31'></embed></object>"
		else
			response.write "<a href='" & rsLink("SiteUrl") & "' target='_blank' title='" & rsLink("LogoUrl") & "'><img src='" & rsLink("LogoUrl") & "' width='88' height='31' border='0'></a>"
		  end if
	else
		response.write "<a href='" & rsLink("SiteUrl") & "' target='_blank'><img src='images/nologo.gif' width='88' height='31' border='0'></a>"
	end if
else
	response.write "&nbsp;"
end if
%></td>
                            <td><%=rsLink("SiteIntro")%></td>
                            <td width="60" align="center"><a href="mailto:<%=rsLink("Email")%>"><%=rsLink("SiteAdmin")%></a></td>
                          </tr>
                          <%
	i=i+1
	if i>=MaxPerPage then exit do
	rsLink.movenext
loop
%>
                        </table>
                      <table width="760" border="0" align="center"  cellpadding="0" cellspacing="0">
                          <tr>
                            <td height="5"></td>
                          </tr>
                        </table>
                      <table width="97%" border="0" align="center" cellpadding="0" cellspacing="0" class="tdbg_rightall">
                          <tr class="tdbg_leftall">
                            <td><%
end sub 
%>
                            </td>
                          </tr>
                        </table>
                      </td>
                  </tr>
                </table></td>
              </tr>
          </table></td>
      </tr>
    </table>
      <table width="760" border="0" align="center"  cellpadding="0" cellspacing="0">
        <tr>
          <td height="10"></td>
        </tr>
      </table></td>
    <td width="1" bgcolor="#CCCCCC"><img src="img0415/space.gif" width="1" height="1"><img src="img0415/space.gif"></td>
    <td width="5" bgcolor="f2f2f2"></td>
  </tr>
</table>
<!--#include file="end.asp"-->
</body>
</html>
