<!--#include file="conn.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" 
    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>所有友情链接_<%=WebName & ChannelName%> - Powered By ttdv</title>
<link rel="stylesheet" href="style.css">
</head>
<BODY background="images/back.gif">
<!--#include file="top.asp"-->

<div class="bt<%=skin%>">
您的位置:<a href="<%=WebUrl%>">首页</a> -- <a href="index.asp"><%=ChannelName%></a> -- <a href="friendlink.asp" >所有友情链接</a> 
</div>
<div class="mainbar_a<%=skin%>">
	<%
	dim rs
	set rs=hx.execute("select username,tturl,ttname,ttlogo,ttinfo,inp from tt_Link where (inp>="&inpc&" and IsVerify="&strTrue&") or (gd=1 and IsVerify="&strTrue&") order by top desc,inp desc")
	dim i,n,j,tdwidth,arrSQL,flag
	i=1
	n=1
	j=1
	dim strjs
	tdwidth=formatnumber(100/LineNum,1)
	strjs="<table border=0 cellpadding=3 cellspacing=0 width=""100%"">"
	strjs="<div class=""tr"&skin&""">"
	if rs.eof then
		strjs=strjs + "<tr><td align=center>暂时还没有友情链接</td></tr>"
		flag = 0
	else
		arrSQL = rs.getrows(-1)
		flag = 1
	end if	
	rs.close:set rs=nothing	
	
	if flag = 1 then		
			For i=0 to ubound(arrSQL,2)
				if i mod LineNum = 0 then
					strjs=strjs + "<tr class=""tr1"">"
				end if
				if i < LineNum then
					strjs=strjs + "<td width="""&tdwidth&"%"">"
				else
					strjs=strjs + "<td>"					
				end if				
					strjs=strjs + "<a href=""http://"&hx.BaseUrl&"ttout.asp?username="&arrSQL(0,i)&""" target=""_blank"">"
				if i < LineNum * LineLogo then			
					strjs=strjs + "<img src="""&hx.htmlencode2(arrSQL(3,i))&""" width=""88"" height=""31"" border=""0"" alt="""&hx.htmlencode2(arrSQL(2,i))&" -- "&hx.htmlencode2(arrSQL(4,i))&""">"
				else			
					strjs=strjs + hx.htmlencode2(arrSQL(2,i))
				end if
					strjs=strjs + "</a>"				
					strjs=strjs + "</td>"					
				if i mod LineNum = LineNum-1 then
					strjs=strjs + "</tr>"
				end if				
			Next
		
			if i mod LineNum>0 then	
				for j=1 to LineNum-i mod LineNum
				strjs=strjs + "<td></td>"
				next
				strjs=strjs + "</tr>"
			end if				
	end if	
	strjs=strjs + "</table>"
	response.write strjs
	%>
</div>
<!--#include file="under.asp"-->
<%set hx=nothing%>
</body>
</html>
