<%@LANGUAGE="VBSCRIPT"%>
<%
set rsCat = Server.CreateObject("ADODB.Recordset")
rsCat.ActiveConnection = MM_connDUdirectory_STRING
rsCat.Source = "SELECT *, (SELECT COUNT (*) FROM LINKS WHERE LINKS.CAT_ID = CATS.CAT_ID) AS LINK_COUNT FROM CATS ORDER BY CAT_NAME ASC"
rsCat.CursorType = 0
rsCat.CursorLocation = 2
rsCat.LockType = 3
rsCat.Open()
rsCat_numRows = 0
%>
<%
set rsSub = Server.CreateObject("ADODB.Recordset")
rsSub.ActiveConnection = MM_connDUdirectory_STRING
rsSub.Source = "SELECT * FROM SUBS ORDER BY SUB_NAME ASC"
rsSub.CursorType = 0
rsSub.CursorLocation = 2
rsSub.LockType = 3
rsSub.Open()
rsSub_numRows = 0
%>
<%
set rsHot = Server.CreateObject("ADODB.Recordset")
rsHot.ActiveConnection = MM_connDUdirectory_STRING
rsHot.Source = "SELECT *, (LINK_RATE/NO_RATES) AS RATING FROM LINKS WHERE LINK_APPROVED = Yes ORDER BY NO_HITS DESC"
rsHot.CursorType = 0
rsHot.CursorLocation = 2
rsHot.LockType = 3
rsHot.Open()
rsHot_numRows = 0
%>
<%
set rsNew = Server.CreateObject("ADODB.Recordset")
rsNew.ActiveConnection = MM_connDUdirectory_STRING
rsNew.Source = "SELECT * FROM LINKS WHERE LINK_APPROVED = Yes ORDER BY LINK_DATE DESC"
rsNew.CursorType = 0
rsNew.CursorLocation = 2
rsNew.LockType = 3
rsNew.Open()
rsNew_numRows = 0
%>
<%
Dim HLooper1__numRows
HLooper1__numRows = -2
Dim HLooper1__index
HLooper1__index = 0
rsCat_numRows = rsCat_numRows + HLooper1__numRows
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "="
MM_keepURL="":MM_keepForm="":MM_keepBoth="":MM_kee pNone=""
' add the URL parameters to the MM_keepURL string
For Each Item In Request.QueryString
NextItem = "&" & Item & "="
If (InStr(1,MM_removeList,NextItem,1) = 0) Then
MM_keepURL = MM_keepURL & NextItem & Server.URLencode(Request.QueryString(Item))
End If
Next
' add the Form variables to the MM_keepForm string
For Each Item In Request.Form
NextItem = "&" & Item & "="
If (InStr(1,MM_removeList,NextItem,1) = 0) Then
MM_keepForm = MM_keepForm & NextItem & Server.URLencode(Request.Form(Item))
End If
Next
' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
if (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
if (MM_keepURL <> "") Then MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)
if (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
If (firstItem <> "") Then
MM_joinChar = "&"
Else
MM_joinChar = ""
End If
End Function
%>
<%
If giEnabled Then
DoPageHeader
%>
<table cellspacing="10">
<tr align="center" valign="top">
<td align="left">
<table>
<%
startrw = 0
endrw = HLooper1__index
numberColumns = 2
numrows = -1
while((numrows <> 0) AND (Not rsCat.EOF))
startrw = endrw + 1
endrw = endrw + numberColumns
%>
<tr align="center" valign="top">
<%
While ((startrw <= endrw) AND (Not rsCat.EOF))
%>
<td>
<table border="0" cellspacing="2" cellpadding="1" width="305">
<tr align="left" valign="top">
<td valign="middle"><div class = "links"> <font face="Verdana, Arial, Helvetica, sans-serif" size="3">
"><%=(rsCat.Fields.Item("CAT_NAME").Value)%> <font size="2">(<%=(rsCat.Fields.Item("LINK_COUNT").Valu e)%>)</font></font>
<%
Dim Repeat1__numRows
Repeat1__numRows = 3
Dim Repeat1__index
Repeat1__index = 0
rsSub_numRows = rsSub_numRows + Repeat1__numRows
varID = rsCat.Fields.Item("CAT_ID").Value
rsSub.Filter = "CAT_ID = " & varID
%>
<%
Dim Repeat2__numRows
Repeat2__numRows = 5
Dim Repeat2__index
Repeat2__index = 0
rsHot_numRows = rsHot_numRows + Repeat2__numRows
%>
<%
Dim Repeat3__numRows
Repeat3__numRows = 5
Dim Repeat3__index
Repeat3__index = 0
rsNew_numRows = rsNew_numRows + Repeat3__numRows
%>
<% While ((Repeat1__numRows <> 0) AND (NOT rsSub.EOF)) %>
<font face="Verdana, Arial, Helvetica, sans-serif"> <font size="1">
&subid=<%=(rsSub.Fields.Item("SUB_ID").Value)%>">< %=(rsSub.Fields.Item("SUB_NAME").Value)%></font></font>
<% If Repeat1__index-1 > 0 Then %>
<font face="Verdana, Arial, Helvetica, sans-serif">
<font size="1">...</font></font>
<% Else %>
<font face="Verdana, Arial, Helvetica, sans-serif">
<font size="1">, </font></font>
<% End If %>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsSub.MoveNext()
Wend
%>
</div></td>
</tr>
</table>
</td>
<%
startrw = startrw + 1
rsCat.MoveNext()
Wend
%>
</tr>
<%
numrows=numrows-1
Wend
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="left" valign="top"></td>
</tr>
<tr>
<td align="center" valign="top">
<table border="0" cellspacing="3" cellpadding="3">
<tr align="center" valign="middle">
<td valign="top" align="right">
<table border="0" cellspacing="1" cellpadding="3" bgcolor="#009999" width="305">
<tr bgcolor="#00CC66" valign="middle" align="center">
<td colspan="3"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
<font color="#FFFFFF">Ãîðÿ÷èå ññûëêè</font></font></td>
</tr>
<tr bgcolor="#CCCCCC" valign="middle" align="center">
<td><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000000">Íàçâàíèå ñàéòà</font></td>
<td width="30"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000000">Õèòîâ</font></td>
<td width="58"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000000">Ðåéòèíã</font></td>
</tr>
<%
While ((Repeat2__numRows <> 0) AND (NOT rsHot.EOF))
%>
<tr bgcolor="#FFFFFF" valign="middle" align="left">
<td><div class = "links"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
&url=<%=(rsHot.Fields.Item("LINK_URL").Value)%> " target="_blank" onclick="window.location.reload(true);"><%=(rsHot. Fields.Item("LINK_NAME").Value)%></font></div></td>
<td align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><%=(rsHot.Fields.Item("NO_HITS").Value)%> </font></td>
<td align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">[img]assets/<%= FormatNumber((rsHot.Fields.Item([/img].gif" align="absmiddle">
</font></td>
</tr>
<%
Repeat2__index=Repeat2__index+1
Repeat2__numRows=Repeat2__numRows-1
rsHot.MoveNext()
Wend
%>
</table>
</td>
<td valign="top" align="left">
<table border="0" cellspacing="1" cellpadding="3" bgcolor="#009999" width="305">
<tr bgcolor="#00CC66" valign="middle" align="center">
<td colspan="2"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
<font color="#FFFFFF">Íîâûå ññûëêè</font></font></td>
</tr>
<tr bgcolor="#CCCCCC" valign="middle" align="center">
<td><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000000">Íàçâàíèå ñàéòà</font></td>
<td width="60"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#000000">Äàòà</font></td>
</tr>
<%
While ((Repeat3__numRows <> 0) AND (NOT rsNew.EOF))
%>
<tr bgcolor="#FFFFFF" valign="middle" align="left">
<td><div class = "links"> <font face="Verdana, Arial, Helvetica, sans-serif" size="1">
&url=<%=(rsNew.Fields.Item("LINK_URL").Value)%> " target="_blank" onclick="window.location.reload(true);"><%=(rsNew. Fields.Item("LINK_NAME").Value)%></font></div></td>
<td align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><%=(rsNew.Fields.Item("LINK_DATE").Value) %></font></td>
</tr>
<%
Repeat3__index=Repeat3__index+1
Repeat3__numRows=Repeat3__numRows-1
rsNew.MoveNext()
Wend
%>
</table>
</td>
</tr>
</table>
<%
DoPageFooter
Else
Response.Redirect "W3Disabled.asp"
End If
%>
<%
rsCat.Close()
%>
<%
rsSub.Close()
%>
<%
rsHot.Close()
%>
<%
rsNew.Close()
%>