<% Response.Buffer = True Session.LCID = 1053 If Request.Form("catid") = "" Then strCat = Request.QueryString("catid") Else strCat = Request.Form("catid") End If intPageSize = 25 intPage = Request.QueryString("page") If intPage = "" Then intPage = 1 Function FormatStr(String) on Error resume next String = Replace(String, CHR(13), "") String = Replace(String, CHR(10) & CHR(10), "

") String = Replace(String, CHR(10), "
") FormatStr = String End Function '===================================================================================================================== 'Öppnar databasen '===================================================================================================================== Set Connect = Server.CreateObject("ADODB.Connection") Connect.Open "driver={Microsoft Access Driver (*.mdb)};uid=;pwd=gurkmeja;dbq=" & Server.MapPath("../../../data/links.mdb") Set RSShow = Server.CreateObject("ADODB.Recordset") If Request.QueryString("what") = "all" Or Request.QueryString("what") = "" Then Visa = "SELECT * FROM Link ORDER BY LName" ElseIf Request.QueryString("what") = "search" Then Visa = "SELECT * FROM Link WHERE CatID = '" & strCat & "' ORDER BY LName" End If With RSShow .ActiveConnection = Connect .Source = Visa .PageSize = intPageSize .CursorType = 3 .LockType = 1 .Open End With If Not Request.QueryString("catID") = "" Then Set RSCatName = Server.CreateObject("ADODB.Recordset") CategoryName = "SELECT * FROM Category WHERE ID = " & Request.QueryString("catID") & " " RSCatName.Open CategoryName, Connect, adOpenDynamic, adLockOptimistic End If %> Länkar

<% If Request.QueryString("what") = "all" Or Request.QueryString("what") = "" Then %> Visar Alla Länkar!

<% Else %> Visar Länkar i Kategori: <% =RSCatName("Category") %>

<% End If %>
<% If Not RSShow.EOF Then RSShow.AbsolutePage = intPage intTotalPages = RSShow.PageCount Call PageNavigation(intPage, intTotalPages) %> <% If Request.QueryString("what") = "all" Or Request.QueryString("what") = "" Then %> <% Else %>
<% End If %> <% If Request.QueryString("what") = "all" Or Request.QueryString("what") = "" Then %> <% Else End If %> <% x = 0 Do Until RSShow.EOF OR intCounter >= intPageSize intCounter = intCounter + 1 If x mod 2 = 0 Then bgcolor = "" & strTblBkgndM & "" Else bgcolor = "" & strTblBkgndL & "" End If If Request.QueryString("what") = "all" Or Request.QueryString("what") = "" Then strCatID = RSShow("CatID") Set RSCat = Server.CreateObject("ADODB.Recordset") Cat = "SELECT * FROM Category WHERE ID = " & strCatID & " " RSCat.Open Cat, Connect, adOpenDynamic, adLockOptimistic End If %> <% If Request.QueryString("what") = "all" Or Request.QueryString("what") = "" Then %> <% Else End If %> <% x = x + 1 If Request.QueryString("what") = "all" Or Request.QueryString("what") = "" Then strCatID = 0 RSCat.Close End If RSShow.MoveNext Loop RSShow.Close Set RSShow = Nothing Connect.Close Set Connect = Nothing %>
LänkKategoriInfo
" target="_blank"><% =RSShow("LName") %> <% =RSCat("Category") %> <% =FormatStr(RSShow("Info")) %> 

<% Call PageNavigation(intPage, intTotalPages) Else Response.Write "
Inga Länkar hittade..." End If %>