<%
set rsCat = Server.CreateObject("ADODB.Recordset")
rsCat.ActiveConnection = MM_connDUdirectory_STRING
rsCat.Source = "SELECT *, (SELECT COUNT (*) FROM LINKS WHERE LINKS.CAT_ID = CATSLINK.CAT_ID AND LINK_APPROVED = 1) AS LINK_COUNT FROM CATSLINK 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 SUBSLINK 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 * FROM LINKS WHERE LINK_APPROVED = 1 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 = 1 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_keepNone=""
' 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
%>
<%
startrw = 0
endrw = HLooper1__index
numberColumns = 2
numrows = -1
while((numrows <> 0) AND (Not rsCat.EOF))
startrw = endrw + 1
endrw = endrw + numberColumns
%>
<%
While ((startrw <= endrw) AND (Not rsCat.EOF))
%>
"><%=(rsCat.Fields.Item("CAT_NAME").Value)%> (<%=(rsCat.Fields.Item("LINK_COUNT").Value)%>)
<%
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 = 10
Dim Repeat2__index
Repeat2__index = 0
rsHot_numRows = rsHot_numRows + Repeat2__numRows
%>
<%
Dim Repeat3__numRows
Repeat3__numRows = 10
Dim Repeat3__index
Repeat3__index = 0
rsNew_numRows = rsNew_numRows + Repeat3__numRows
%>
<% While ((Repeat1__numRows <> 0) AND (NOT rsSub.EOF)) %>
<%=(rsSub.Fields.Item("SUB_NAME").Value)%>
<% If Repeat1__index-1 > 0 Then %>
...
<% Else %>
,
<% End If %>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsSub.MoveNext()
Wend
%>
|
|
<%
startrw = startrw + 1
rsCat.MoveNext()
Wend
%>
<%
numrows=numrows-1
Wend
%>
|
New Links |
Date Added |
<%
While ((Repeat3__numRows <> 0) AND (NOT rsNew.EOF))
%>
|
<%=(rsNew.Fields.Item("LINK_DATE").Value)%> |
<%
Repeat3__index=Repeat3__index+1
Repeat3__numRows=Repeat3__numRows-1
rsNew.MoveNext()
Wend
%>
|
Hits |
<%
While ((Repeat2__numRows <> 0) AND (NOT rsHot.EOF))
%>
|
<%=(rsHot.Fields.Item("NO_HITS").Value)%> |
<%
Repeat2__index=Repeat2__index+1
Repeat2__numRows=Repeat2__numRows-1
rsHot.MoveNext()
Wend
%>
Submit a Link
*References to any organization, publication or Web site are external to the ICCS and are therefore the sole responsibility of the organization in question.
<%
rsCat.Close()
%>
<%
rsSub.Close()
%>
<%
rsHot.Close()
%>
<%
rsNew.Close()
%>
|
|