<%
strSQL = "SELECT * FROM [" & STR_ITEM_TABLE & "]"
strSQL = strSQL & " WHERE [linkArchived] = '" & STR_ACTIVE & "'"
strSQL = strSQL & " ORDER BY [linkName],[linkID] DESC"
set rst = server.createObject("ADODB.recordset")
rst.Open strSQL,conn,1,3
%>
<% if not (rst.BOF and rst.EOF) then %>
<%
rst.MoveFirst
intRecordNum = INT_ITEM_USER_FIRST_ARTICLE
do while not(rst.EOF)
strLinkID = rst.Fields("linkID")
strLinkName = rst.Fields("linkName")
strLinkCat = rst.Fields("linkCat")
strLinkURL = fixHyperlink(rst.Fields("linkURL"))
strLinkDesc = rst.Fields("linkDesc1")
strLinkImage1 = rst.Fields("linkImage1")
strLinkDisplayURL = fixDisplayHyperlink(strLinkURL)
%>
<% if (strLinkCat <> strOldCat) then %>
<%=getCatName(STR_CTGY_TABLE, strLinkCat)%>
<% end if %>
<% if not(isEmpty(strLinkImage1)) then %>
<% if not(isEmpty(strLinkURL)) then %>
<%=strLinkDisplayURL%>
<% end if %> <% if not(isEmpty(strLinkDesc)) then %>
<%=strLinkDesc%> <% end if %>
<% else %>
<%=strLinkName%>
<% if not(isEmpty(strLinkURL)) then %>
<%=strLinkDisplayURL%>
<% end if %>
<% if not(isEmpty(strLinkDesc)) then %>
<%=strLinkDesc%>
<% end if %>
<% end if %>
<% if (intRecordNum < rst.RecordCount) then %>
<%=getListSeparator%>
<% end if %>
<%
if not(rst.EOF) then
rst.MoveNext
else
exit do
end if
if rst.EOF then
exit do
end if
intRecordNum = intRecordNum + 1
strOldCat = strLinkCat
loop
else
%>