<% ' Get and validate linkid Dim linkid linkid = Request.Querystring("linkid") ' Basic validation - must be numeric and positive If Not IsNumeric(linkid) Or CLng(linkid) < 1 Then Response.Redirect("displayknowledgebase.asp") Response.End End If ' Get the article details Dim strSQL, rs, linkUrl strSQL = "SELECT kb.*, app.appname " &_ "FROM knowledgebase kb " &_ "INNER JOIN applications app ON kb.appid = app.appid " &_ "WHERE kb.linkid = " & CLng(linkid) & " AND kb.isactive = 1" Set rs = objConn.Execute(strSQL) If rs.EOF Then rs.Close Set rs = Nothing objConn.Close Response.Redirect("displayknowledgebase.asp") Response.End End If ' Store linkurl for later use linkUrl = rs("linkurl") & "" %> <% Dim theme theme = Request.Cookies("theme") IF theme = "" THEN theme="bg-theme1" END IF %>
Knowledge Base Article
Back to List
<% ' Display status messages Dim statusMsg, errorMsg statusMsg = Request.QueryString("status") errorMsg = Request.QueryString("msg") If statusMsg = "updated" Then %> <% ElseIf statusMsg = "error" Then If errorMsg = "" Then errorMsg = "An error occurred" %> <% End If %> <% ' Display Topic if present If NOT IsNull(rs("appid")) AND rs("appid") <> "" Then %> <% End If ' Check if article has a URL link If linkUrl <> "" Then %> <% End If If NOT IsNull(rs("keywords")) AND rs("keywords") <> "" Then %> <% End If %>
Description: <%=Server.HTMLEncode(rs("shortdescription") & "")%>
Topic: <%=Server.HTMLEncode(rs("appname") & "")%>
URL: <%=Server.HTMLEncode(rs("linkurl"))%>
Keywords: <%=Server.HTMLEncode(rs("keywords"))%>
Clicks: <%=rs("clicks")%>
Last Updated: <%=rs("lastupdated")%>

<% If linkUrl <> "" Then %> Open Article <% Else %> <% End If %> Edit
<% rs.Close Set rs = Nothing objConn.Close %>