<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Option Explicit %> <% '============================================================= ' ASP Reciprocal Link Exchange LITE / PROFESSIONAL / ULTIMATE ' ©2007 wsdw.co.uk - Web Site Design World - www.wsdw.co.uk '============================================================= ' All rights reserved. ' Use of this code is covered by the terms and ' conditions in the license agreement. No ' unauthorized duplication or distribution is ' permitted. wsdw.co.uk's copyright notices must ' remain in the ASP sections of the code. '============================================================= '----------------------------------------------- ' GET LINKS '----------------------------------------------- Dim arrLinks arrLinks = GetDBTable("SELECT * FROM LinkExchange WHERE Approved = 1 AND SiteCategory = " & 17 & " ORDER BY LEID DESC") '----------------------------------------------- ' NEW LINKS '----------------------------------------------- Dim arrNewLinks arrNewLinks = GetDBTable("SELECT TOP " & Application(COMPANYNAME & "DisplayNewLinks") & " * FROM LinkExchange WHERE Approved = 1 ORDER BY LEID DESC") '----------------------------------------------- ' CATEGORY NAME '----------------------------------------------- Dim rsCatName, CatLineage, CatTitle Set rsCatName = Server.CreateObject("ADODB.Recordset") rsCatName.ActiveConnection = strJETConn rsCatName.Source = "SELECT CID, Category, Lineage FROM Categories WHERE CID = " & 17 & " " rsCatName.CursorType = 0 rsCatName.CursorLocation = 2 rsCatName.LockType = 1 rsCatName.Open() If Not rsCatName.EOF Or Not rsCatName.BOF Then CatTitle = rsCatName("Category") CatLineage = rsCatName("Lineage") End If rsCatName.Close() Set rsCatName = Nothing '----------------------------------------------- ' GET CAT ROUTE '----------------------------------------------- '-------------------------------------------- ' CATEGORY ROUTE SETTINGS '-------------------------------------------- CatLineage = Replace(CatLineage,"/",",") CatLineage = left(CatLineage,len(CatLineage)-1) CatLineage = Right(CatLineage,len(CatLineage)-1) Function GetCat(CID) Dim MM_Cmd, LRS, CatName, CatFile, PrintCatRoute Set MM_Cmd = Server.CreateObject("ADODB.Command") MM_Cmd.ActiveConnection = strJETconn MM_Cmd.CommandText = "SELECT CID,Category,FileName FROM Categories WHERE CID = " & CID Set LRS = MM_Cmd.Execute CID = (LRS.Fields.Item("CID").Value) CatName = (LRS.Fields.Item("Category").Value) CatFile = (LRS.Fields.Item("FileName").Value) PrintCatRoute = PrintCatRoute + ("" & CatName & "") GetCat = PrintCatRoute LRS.Close End Function '------------------------------------------------- ' SUB CATEGORY '------------------------------------------------- Dim rsSubs Dim rsSubs_numRows Set rsSubs = Server.CreateObject("ADODB.Recordset") rsSubs.ActiveConnection = strJETConn rsSubs.Source = "SELECT CID, ParentID, Category , FileName,(SELECT COUNT(LEID) FROM LinkExchange WHERE LinkExchange.SiteCategory = Categories.CID AND LinkExchange.Approved = 1)AS CategoryCount FROM Categories WHERE ParentID = " & 17 & " Order BY Category ASC" rsSubs.CursorType = 0 rsSubs.CursorLocation = 2 rsSubs.LockType = 1 rsSubs.Open() rsSubs_numRows = 0 Dim HLooperSubCat__numRows HLooperSubCat__numRows = -1 Dim HLooperSubCat__index HLooperSubCat__index = 0 rsSubs_numRows = rsSubs_numRows + HLooperSubCat__numRows '----------------------------------------------- ' GET TEMPLATE FILE '----------------------------------------------- Call ReadTemplateFILE(TemplatePath,aTemplatePage,PageTitle) %> <%=CatTitle%> <% '----------------------------------------------- ' WRITE TEMPLATE PAGE FIRST ARRAY '----------------------------------------------- response.write(aTemplatePage(0)) %>
<% If Not rsSubs.BOF OR Not rsSubs.EOF Then %><% End If %>
Home > <% '----------------------------------------------- ' CATEGORY ROUTE '----------------------------------------------- Dim arrCatLineage, CatName, i arrCatLineage = Split(CatLineage,",") For i = 0 To UBOUND(arrCatLineage) CatName = GetCat(arrCatLineage(i)) If i <> ubound(arrCatLineage) Then CatName = CatName + " > " End If Response.Write(CatName) Next %>
<% Dim startrw, endrw, numberColumns, numrows startrw = 0 endrw = HLooperSubCat__index numberColumns = Application(COMPANYNAME & "DisplaySubCatColumns") ' SUB CATS numrows = -1 while((numrows <> 0) AND (Not rsSubs.EOF)) startrw = endrw + 1 endrw = endrw + numberColumns %> <% While ((startrw <= endrw) AND (Not rsSubs.EOF)) %> <% startrw = startrw + 1 rsSubs.MoveNext() Wend %> <% numrows=numrows-1 Wend ' CLOSE SUB CATS RECORDSET rsSubs.Close() Set rsSubs = Nothing %>
" class="sub_cats_lp"><%=(rsSubs.Fields.Item("Category").Value)%><% If Application(COMPANYNAME & "DisplayLinksTotal") = "on" then%>(<%=(rsSubs.Fields.Item("CategoryCount").Value)%>)<% End If %>
<% Response.Write("" & CatTitle & "

") %> <% If IsArray(arrLinks) Then For i = 0 to ubound(arrLinks, 2) %> <% If Application(COMPANYNAME & "WebShot") = "on" then%> <% End If %> <% If i <> ubound(arrLinks, 2) Then %><% End If %>
<% = arrLinks(5, i) %>
<% = arrLinks(6, i) %>
Date Added: <% = arrLinks(14, i) %>
<% ' TRIM STRING If Len(arrLinks(3, i)) > 75 Then Response.Write (Left(arrLinks(3, i), 75) & "...") Else Response.Write (arrLinks(3, i)) End If %>
<% = arrLinks(3, i) %>" alt="<% = arrLinks(3, i) %>" width="120" height="90" border="0" />
colspan="2"<% End If %> class="tdback">
<% Next Response.Write("
") Else Response.Write ("
No link found in this page!

") End If %>
Powered by Reciprocal Link Exchange Professional by wsdw.co.uk
<% '----------------------------------------------- ' WRITE TEMPLATE PAGE LAST ARRAY '----------------------------------------------- response.write(aTemplatePage(1)) %>