% If validateID(aID) = True Then Set rsAdmin = Server.CreateObject("ADODB.RecordSet") AdminSql="SELECT * FROM tbl_Admin" rsAdmin.Open AdminSql,cString allowEmailFriend = rsAdmin("allowEmailFriend") allowRateArticle = rsAdmin("allowRateArticle") rsAdmin.Close Set rsAdmin = Nothing Set rsKbSearch = Server.CreateObject("ADODB.RecordSet") StrSql="SELECT * FROM tbl_KbIndex WHERE ID=" & aID rsKbSearch.Open StrSql,cString %>
<%=Replace(rsKbSearch("articleTitle"), "''", "'")%><%If allowRateArticle = "Yes" Then%> - <%If rsKbSearch("numRatings") = 1 Then%>This article has a rating of<%Else%>This article has been rated a<%End If%> <%If rsKbSearch("numRatings") <> 1 Then Response.Write(Round((rsKbSearch("articleRating") / rsKbSearch("numRatings")), 1)) Else Response.Write(rsKbSearch("articleRating")) End If%><%If rsKbSearch("numRatings") > 1 Then%> by <%=(rsKbSearch("numRatings") - 1)%> <%If rsKbSearch("numRatings") > 1 Then%>people<%Else%>person<%End If%><%End If%>.<%End If%>
<%=Replace(rsKbSearch("articleText"), "''", "'")%> <% If allowEmailFriend = "Yes" OR allowRateArticle = "Yes" Then %><% If allowEmailFriend = "Yes" Then %>Email this article to a friend<% End If %> <% If allowEmailFriend = "Yes" AND allowRateArticle = "Yes" Then %> | <% End If %> <% If allowRateArticle = "Yes" Then %>Rate this article<% End If %>
<% End If %>Back to mode=<%=pageMode%>&<%End If%>searchQ=<%=searchQ%>">Knowledge Base Search
<% Server.Execute("inc_footer.asp") %> <% Else %>Sorry, the article ID (aID) you entered is not valid! Please go back and try again.
<% Server.Execute("inc_footer.asp") %> <% End If %>