<% Dim numArticles numArticles = 0 %> <% If searchQ = "" AND (pageMode = "search" OR Session("adminLoggedIn") <> True) Then %> <%=pageTitle%> - Knowledge Base Search - Search <% Server.Execute("inc_style.asp") %> <% Server.Execute("inc_header.asp") %> <% If Request.QueryString("error") = "emptyValue" Then %>

The search field was left empty, and therefore cannot be processed.  Please try again.

<% End If %>
?mode=search<%End If%>">

Search the Knowledge Base

Keywords:

<% If Session("adminLoggedIn") = True Then %>

Switch to Admin Mode Switch to Admin Mode

<% End If %> <% Server.Execute("inc_footer.asp") %> <% ElseIf Session("adminLoggedIn") = True Then Set rsKbSearch = Server.CreateObject("ADODB.RecordSet") StrSql="SELECT * FROM tbl_KbIndex" rsKbSearch.Open StrSql,cString %> <%=pageTitle%> - Knowledge Base Search - Admin <% Server.Execute("inc_style.asp") %> <% Server.Execute("inc_header.asp") %> <% If pageMode = "admin" AND Session("adminLoggedIn") = True Then %> <% Else %> <% End If %> <% While NOT rsKbSearch.EOF If searchKb(LCase(rsKbSearch("keywords")), LCase(searchQ)) OR (pageMode = "admin" AND Session("adminLoggedIn") = True) Then numArticles = numArticles + 1 %> tblOdd<%Else%>tblEven<%End If%>"> tblOdd<%Else%>tblEven<%End If%>"> tblOdd<%Else%>tblEven<%End If%>"> tblOdd<%Else%>tblEven<%End If%>"> <% End If rsKbSearch.MoveNext() WEnd %> <% If numArticles >= 1 AND pageMode = "admin" AND Session("adminLoggedIn") = True Then %> <% ElseIf numArticles >= 1 AND pageMode = "search" Then %> <% ElseIf numArticles = 0 AND pageMode = "search" Then %> <% Else %> <% End If %>
Welcome, <%=Session("adminName")%>.  Listed below are all articles.
Welcome, <%=Session("adminName")%>.  Your search for <%=searchQ%> yielded the following results:
Article ID: <%=rsKbSearch("ID")%>
Article Title: &<%If Session("adminLoggedIn") = True Then%>mode=<%=pageMode%>&<%End If%>searchQ=<%=searchQ%>" class="tblLink"><%=rsKbSearch("articleTitle")%>
Keywords: <%=rsKbSearch("keywords")%>
Description: <%=rsKbSearch("description")%>
<%=numArticles%> articles total.
<%=numArticles%> article<%If numArticles > 1 Then%>s<%End If%> found.
Sorry, no articles were found relating to <%=searchQ%>.
Search again?
There are no articles in this database.
<% Server.Execute("inc_footer.asp") %> <% Else %> <% Set rsKbSearch = Server.CreateObject("ADODB.RecordSet") StrSql="SELECT * FROM tbl_KbIndex" rsKbSearch.Open StrSql,cString %> <%=pageTitle%> - Knowledge Base Search - Search Results <% Server.Execute("inc_style.asp") %> <% Server.Execute("inc_header.asp") %> <% While NOT rsKbSearch.EOF If searchKb(LCase(rsKbSearch("keywords")), LCase(searchQ)) AND (rsKbSearch("articleIndexed") <> "No" OR Session("adminLoggedIn") = True) AND rsKbSearch("articleIndexed") = "Yes" Then numArticles = numArticles + 1 %> <% If numArticles = 1 Then %> <% End If %> tblOdd<%Else%>tblEven<%End If%>"> tblOdd<%Else%>tblEven<%End If%>"> tblOdd<%Else%>tblEven<%End If%>"> tblOdd<%Else%>tblEven<%End If%>"> <% End If rsKbSearch.MoveNext() WEnd %> <% If numArticles >= 1 Then %> <% Else %> <% End If %>
You searched for <%=searchQ%>, and we found the following article(s):
Article ID: <%=rsKbSearch("ID")%>
Article Title: &<%If Session("adminLoggedIn") = True Then%>mode=<%=pageMode%>&<%End If%>searchQ=<%=searchQ%>" class="tblLink"><%=rsKbSearch("articleTitle")%>
Keywords: <%=rsKbSearch("keywords")%>
Description: <%=rsKbSearch("description")%>
<%=numArticles%> article<%If numArticles > 1 Then%>s<%End If%> found.
Sorry, no articles were found relating to <%=searchQ%>.
Search again?
<% Server.Execute("inc_footer.asp") %> <% End If %>