%
TopLinksName = "Top " & Display_limit & " referrals"
Select Case Database_Type
Case "Access"
DRIVER="DRIVER={Microsoft Access Driver (*.mdb)};"
DataBase=DRIVER & "DBQ=" & Server.MapPath("\linksys\linksys.mdb")
TopLinksSQL = "SELECT TOP " & Display_limit & " websitetitle, reciprocallink, bannerlink, websiteurl, hitsin, hitsout, linkid FROM LinkSysLinks order by hitsin desc"
Case "My_SQL"
database = "driver={MySQL};server="&MY_SQL_SERVER&";uid="&MY_SQL_UID&";pwd="&MY_SQL_PASSWORD&";database="&MY_SQL_DATABASE_NAME&";option=NUM"
' TopLinksSQL = "SELECT * FROM LinkSysLinks where Approved = 'Yes' AND hitsout > '0' AND hitsin > '0' order by ((hitsin + hitsout) / 2) desc;"
TopLinksSQL = "SELECT * FROM LinkSysLinks where Approved = 'Yes' AND hitsout > '0' AND hitsin > '0' order by hitsin desc;"
Case Else
Response.Write " DATABASE SELECTION IS NOT VALID "
End Select
Set DataBaseConnection = Server.CreateObject("ADODB.Connection")
Set CategoryRecordSet = Server.CreateObject("ADODB.Recordset")
Set TopLinksRecordSet = Server.CreateObject("ADODB.Recordset")
Set CategoryCountRecordSet = Server.CreateObject("ADODB.Recordset")
Set UnApprovedLinksRecordSet = Server.CreateObject("ADODB.Recordset")
DataBaseConnection.Open DataBase
CategorySQL = "Select category, categorydescript, LinkedCategory, categoryorder FROM LinkSysCategory ORDER by Categoryorder asc"
CategoryRecordSet.Open CategorySQL, database
TopLinksRecordSet.Open TopLinksSQL, database
%>
<%
rankem = 0
DO WHILE rankem < Display_Limit
if Not TopLinksRecordSet.EOF then
TopLinks = Trim(TopLinksRecordSet("websitetitle"))
TopLinks = Left(Toplinks,40)
HyperLink = TopLinksRecordSet("websiteurl")
TrafficIn = Trim(TopLinksRecordSet("hitsin"))
TrafficOut = Trim(TopLinksRecordSet("hitsOut"))
TopBanners = Trim(TopLinksRecordSet("bannerlink"))
TopReciprocalLink = Trim(TopLinksRecordSet("ReciprocalLink"))
LinkID = Trim(TopLinksRecordSet("LinkID"))
TopCategory = Trim(TopLinksRecordSet("category"))
FavoritesSQL = "Select status from Linksyscategory where category = '" & TopCategory & "';"
Set FavoritesRS = Server.CreateObject("ADODB.Recordset")
FavoritesRS.Open FavoritesSQL, database
status = TRIM(FavoritesRS("status"))
FavoritesRS.Close
Set FavoritesRS = nothing
if status = "Yes" then
If TopReciprocalLink <> "none" then
%>
<%
end if
CategoryRecordSet.MoveNext
WEND
TopLinksRecordSet.Close
CategoryRecordSet.Close
DatabaseConnection.Close
Set CategoryCountRecordSet = Nothing
Set TopLinksRecordSet = Nothing
Set CategoryRecordSet = Nothing
Set DatabaseConnection = Nothing
Set UnApprovedLinksRecordSet = Nothing
%>
Hit
counts are reset on the 1st of every month
Total Approved Links : [ <%=TotalLinks%> ]
Pending Links : [ <%=TotalUnApprovedLinks%> ]
Neither this site, nor its webmaster nor
host, assume any responsibility for, and makes no guarantees
or representations as to the accuracy of, the content of any third-party
sites whose links appear herein.