% ' Server-Side script Response.Buffer = True Dim oCN Dim oRS sCategory = Trim(Request.Form("Category")) If sCategory = "" Then sCategory = Trim(Request.QueryString("Category")) sStart = Trim(Request.Querystring("Start")) End if If sStart = "" Then sStart = 0 End if ' Create the object for DB access set oCN = Server.CreateObject("ADODB.Connection") ' Open the database oCN.Open Application("LinksManager_ConnectionString") sOptions = "" & Chr(13) & Chr(10) Set oRs = oCn.Execute("Select * from tblCategories Order by Description") Do while not oRs.EOF If Trim(oRs("Id")) = Trim(sCategory) Then sOptions = sOptions & "" & Chr(13) & Chr(10) Else sOptions = sOptions & "" & Chr(13) & Chr(10) End if oRs.Movenext Loop sLPP = 100 Set oRs = oCN.Execute("Select SettingValue from tblSystem Where SettingKey = 'LinksPerPage'") If not oRs.EOF Then sLPP = oRs(0) End if If sLPP <= 0 Then sLPP = 100 End if sLPP = CInt(sLPP) ' Get the links If sCategory <> "" then Set oRs = oCn.Execute("Select * from tblLinks Where Category = " & sCategory & " Order by LinkName") Else Set oRs = oCn.Execute("Select * from tblLinks Order by LinkName") End if ' Get the number of links iCounter = 0 Do while not oRs.EOF iCounter = iCounter + 1 oRs.Movenext Loop iNoPages = iCounter / sLPP If sStart = "" Then sStart = 0 End if If sCategory <> "" then Set oRs = oCn.Execute("Select * from tblLinks Where Category = " & sCategory & " Order by LinkName") Else Set oRs = oCn.Execute("Select * from tblLinks Order by LinkName") End if For iLup = 1 to sStart If not oRs.EOF Then oRs.Movenext End if Next %>
![]() |
||||||||
|
Home | My Story | Galleries | Pricing | Testimonials |
||||||||
|