>

 

 

<% srchCat = request.form("Category") 'Create db connection and recordset objects 'Open the connection string ConnString = "driver={MySQL};server=localhost;uid=divarts;pwd=yCheU7RHL2g4;database=divineartsministry_com" Set conn = Server.CreateObject("ADODB.Connection") 'set sql statement to a local variable strSql = "SELECT URL, Ministry FROM Resources WHERE Reviewed = 'Y' ORDER BY Ministry;" mypage=request("whichpage") If mypage="" then mypage=1 end if mypagesize=request("pagesize") If mypagesize="" then mypagesize=20 end if mySQL=request("SQLquery") IF mySQL="" THEN mySQL=strSql END IF set rstemp=Server.CreateObject("ADODB.Recordset") rstemp.cursorlocation=aduseclient rstemp.cachesize=5 rstemp.open mySQL,ConnString rstemp.movefirst rstemp.pagesize=mypagesize maxpages=cint(rstemp.pagecount) maxrecs=cint(rstemp.pagesize) rstemp.absolutepage=mypage howmanyrecs=0 howmanyfields=rstemp.fields.count -1 response.write "

" & "List All Ministries by Name: " & "

" response.write "Page " & mypage & " of " & maxpages & "

" response.write "" ' Now loop through the data If rstemp.eof Then response.write "

" & "No records exist in the Database for this Topic" & "

" END IF DO UNTIL rstemp.eof OR howmanyrecs>=maxrecs QUOTE = chr(34) LT = chr(60) GT = chr(62) response.write "

" If howmanyrecs MOD 2 = 0 Then response.write "" rstemp.movenext howmanyrecs=howmanyrecs+1 LOOP response.write "
" Else response.write "
" End if curVal = LT & "A HREF=" & rstemp("URL") & GT response.write curVal response.write rstemp("Ministry") response.write "" response.write "

" ' close, destroy rstemp.close set rstemp=nothing ' Now make the page _ of _ hyperlinks Call PageNavBar sub PageNavBar() ' Thanks to Jeff Emrich pad="" scriptname=request.servervariables("script_name") response.write "" response.write "" response.write "
" response.write "" if (mypage mod 10) = 0 then counterstart = mypage - 9 else counterstart = mypage - (mypage mod 10) + 1 end if counterend = counterstart + 9 if counterend > maxpages then counterend = maxpages if counterstart <> 1 then ref="First : " Response.Write ref ref="Previous " Response.Write ref end if Response.Write "[" for counter=counterstart to counterend If counter>=10 then pad="" end if if cstr(counter) <> mypage then ref="" & pad & counter & "" else ref="" & pad & counter & "" end if response.write ref if counter <> counterend then response.write " " next Response.Write "]" if counterend <> maxpages then ref=" Next" Response.Write ref ref=" : Last" Response.Write ref end if response.write "
" response.write "
" end sub %>

Search Categories Again

 

 

Copyright 1999  Divine Arts Ministry "All Rights Reserved"
Site Design and Graphics by Divine Web Designs