%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
'response.write(session("txtMediaSearch")&" Media
")
'response.write(session("category")&" category
")
'response.write(session("all")&" ALL
")
'response.write(request("submit")&" BUTTON
")
If request("submitDis")="" and (request("submitLeg")="" and request("submitCom")="" and request("submitTop")="" and session("txtMediaSearch")="" and session("category")="" and request("SubmitText")="") then
'response.write("Initial search")
strSQL="select * from wcbol.tbl_article order by dateposted desc"
'return all results
Elseif request("button")="Display All" then
'response.write("Search ALL")
session("txtMediaSearch")=""
session("category")=""
Session("all")="all"
strSQL="select * from wcbol.tbl_article order by dateposted desc"
'return all results
Elseif Session("all")="all" and request("category")="0" and request("txtMediaSearch")<>"" then
'response.write("ALLLL")
strSQL="select * from wcbol.tbl_article order by dateposted desc"
'return all results
'check to see if a search has been performed
Elseif request("txtMediaSearch")<>"" then
session("txtMediaSearch")=Replace(request("txtMediaSearch"), "'", "''")
Session("all")=""
session("category")=""
strSQL="select * from wcbol.tbl_article where title like '%"& Session("txtMediaSearch") &"%' or subtitle like '%"& Session("txtMediaSearch") &"%' or content like '%"& Session("txtMediaSearch") &"%' order by dateposted desc"
'select text search
Elseif session("txtMediaSearch")<>"" and (request("submitDis")="" and request("submitLeg")="" and request("submitCom")="" and request("submitTop")="") then
strSQL="select * from wcbol.tbl_article where title like '%"& Session("txtMediaSearch") &"%' or subtitle like '%"& Session("txtMediaSearch") &"%' or content like '%"& Session("txtMediaSearch") &"%' order by dateposted desc"
ElseIf request("submitDis")="Submit" or request("submitLeg")="Submit" or request("submitCom")="Submit" or request("submitTop")="Submit" then
'response.write("Initial Category")
if request.querystring("categoryDis")<>"" Then
session("category")=CLng(request.querystring("categoryDis"))
Elseif request.querystring("categoryLeg")<>"" then
session("category")=CLng(request.querystring("categoryLeg"))
Elseif request.querystring("categoryCom")<>"" then
session("category")=CLng(request.querystring("categoryCom"))
ElseIf request.querystring("categoryTop")<>"" then
session("category")=CLng(request.querystring("categoryTop"))
End if
Session("all")=""
session("txtMediaSearch")=""
strSQL="SELECT distinct wcbol.tbl_Article.id, wcbol.tbl_Article.title, wcbol.tbl_Article.dateposted FROM wcbol.tbl_Article LEFT OUTER JOIN wcbol.tbl_ArticleCat ON wcbol.tbl_Article.ID = wcbol.tbl_ArticleCat.Article_ID RIGHT OUTER JOIN wcbol.tbl_Category ON wcbol.tbl_ArticleCat.Category_ID = wcbol.tbl_Category.ID where wcbol.tbl_ArticleCat.category_ID="& Session("category") &" order by dateposted desc"
ElseIf session("category")<>"" then
'response.write("Session Category")
strSQL="SELECT distinct wcbol.tbl_Article.id, wcbol.tbl_Article.title, wcbol.tbl_Article.dateposted FROM wcbol.tbl_Article LEFT OUTER JOIN wcbol.tbl_ArticleCat ON wcbol.tbl_Article.ID = wcbol.tbl_ArticleCat.Article_ID RIGHT OUTER JOIN wcbol.tbl_Category ON wcbol.tbl_ArticleCat.Category_ID = wcbol.tbl_Category.ID where wcbol.tbl_ArticleCat.category_ID="& Session("category") &" order by dateposted desc"
'End If
End If
'response.Write(strSQL)
Set rsArticle = Server.CreateObject("ADODB.Recordset")
rsArticle.ActiveConnection = dsnWCBOL
rsArticle.Source =strSQL
rsArticle.Pagesize=10
rsArticle.Cachesize=10
rsArticle.CursorType = 0
rsArticle.CursorLocation = 3
rsArticle.LockType = 1
rsArticle.Open()
If not rsArticle.bof and not rsArticle.eof then
If Len(Request("pagenum")) = 0 Then
rsArticle.AbsolutePage = 1
Else
If CInt(Request("pagenum")) <= rsArticle.PageCount Then
rsArticle.AbsolutePage = Request("pagenum")
Else
rsArticle.AbsolutePage = 1
End If
End If
Dim abspage, pagecnt
abspage = rsArticle.AbsolutePage
pagecnt = rsArticle.PageCount
End if
Set rsDis = Server.CreateObject("ADODB.Recordset")
rsDis.ActiveConnection = dsnWCBOL
rsDis.Source ="select * from wcbol.tbl_category where maincategory=1 and active=1 order by category"
rsDis.CursorType = 0
rsDis.CursorLocation = 2
rsDis.LockType = 1
rsDis.Open()
Set rsLeg = Server.CreateObject("ADODB.Recordset")
rsLeg.ActiveConnection = dsnWCBOL
rsLeg.Source ="select * from wcbol.tbl_category where maincategory=2 and active=1 order by category"
rsLeg.CursorType = 0
rsLeg.CursorLocation = 2
rsLeg.LockType = 1
rsLeg.Open()
Set rsComm = Server.CreateObject("ADODB.Recordset")
rsComm.ActiveConnection = dsnWCBOL
rsComm.Source ="select * from wcbol.tbl_category where maincategory=3 and active=1 order by category"
rsComm.CursorType = 0
rsComm.CursorLocation = 2
rsComm.LockType = 1
rsComm.Open()
Set rsTop = Server.CreateObject("ADODB.Recordset")
rsTop.ActiveConnection = dsnWCBOL
rsTop.Source ="select * from wcbol.tbl_category where maincategory=4 and active=1 order by category"
rsTop.CursorType = 0
rsTop.CursorLocation = 2
rsTop.LockType = 1
rsTop.Open()
%>
| District: | Legislator: |
| Committee: | Topic: |
*You must click the 'Display All' or 'Submit' button in order to produce results.
<% If rsArticle.eof and rsArticle.bof then %>
There are currently no press releases to display.
<%Else %>
Date |
Press Releases |
| <% =month(rsArticle("dateposted"))&"/"&day(rsArticle("dateposted"))&"/"&year(rsArticle("dateposted"))%> | " class="HEADERNAVY"> <% =rsArticle("title") %> | <% 'Next Response.Write "
<% ' Now showing first, next, back, last buttons Response.Write "
Next Page
" End If Response.Write " | " Response.Write "Last Page" Response.Write "Text: |
Print: | |
||
![]() |
||||
![]() |
||||
![]() |
||||