<% sCaption = request.QueryString("Caption") function HTMLFormat(sInput) dim sAns sAns = replace(sInput, " ", "  ") sAns = replace(sAns, chr(34), """) sAns = replace(sAns, "", "-->") HTMLFormat = sAns end function Function MessageChildren(ID, IndentLevel, iCurrentMessage) dim oRs, oCmd, sSQL, sAns 'FIRST GET MESSAGE, TEXT, CLOSE dim oParam set oCmd = Server.CreateObject("ADODB.Command") set oCmd.ActiveConnection = conn oCmd.CommandText = "FORUM_MESSAGE" oCmd.CommandType = 4 set oParam = cmd.CreateParameter("MESSAGEID", 3, 1) oCmd.parameters.append oParam oParam.value = cint(ID) set oRs = oCmd.execute set oParam = nothing iIndent = IndentLevel set oRs = oCmd.execute if oRs.eof then oRs.close set oRs = Nothing set oCmd = nothing MessageChildren = "" exit function end if sAns = "" for i = 0 to iIndent - 1 sAns = sAns & "     " Next if oRs("ID") <> cLng(iCurrentMessage) then sAns = sAns & "* " 'response.write "CurMsg=" & iCurrentMessage & " ID = " & oRs("ID") sAns = sAns & oRs("Topic") & "" else sans = sans & "" & oRS("Topic") & "" end if sAns = sAns & "" & oRs("DATEPOSTED") & "" sAns = sAns &"" & oRs("HIT") & "" sAns = sAns & "" _ & ""& ors("AuthorName") &"" & "" oRs.close sSQL = "SELECT ID FROM FORUM_MESSAGES WHERE PARENTMESSAGE = " & ID oCmd.CommandText = sSQL oCmd.CommandType = 1 set oRs = oCmd.execute if ors.eof and iIndent = 0 then sAns = "" else do while not oRs.eof sAns = sAns & MessageChildren(oRs("ID"), iIndent + 1, iCurrentMessage) oRs.MoveNext Loop end if oRs.Close set oRs = nothing set oCmd = nothing MessageChildren = sAns End Function Function isBlank(Value) if isNull(Value) then bAns = true else bAns = trim(Value) = "" end if isBlank = bAns end function Function FixNull(Value) if isNull(Value) then sAns = "" else sAns = trim(Value) end if FixNull = sAns end function iMessageId = request.QueryString("ID") bValid = isNumeric(iMessageId) and iMessageId <> "" if bValid then cmd.CommandText = "Forum_Message" cmd.CommandType = 4 set Param = cmd.CreateParameter("MESSAGEID", 3, 1) cmd.parameters.append Param Param.value = iMessageId set rs = cmd.Execute iThreadParent = rs("ThreadParent") sMsg = HTMLFormat(rs("Comments")) sMsg = replace(sMsg, " ", "  ") sMsg = replace(sMsg, vbcrlf, "
") end if 'addhit %><% set rsh = Server.CreateObject("ADODB.Recordset") mySQLC = "select * from FORUM_MESSAGES where ID=" & int(Request("id")) rsh.Open mySQLC, conn, adOpenStatic, adLockOptimistic if not rsh.EOF then rsh("hit")=rsh("hit")+1 rsh.Update rsh.Close End If Set rsh=Nothing %> <%=sitename%> : Message <%=meta%> <%searchbox%><%loginform%>

Forum Message <%logincheck rs("AuthorName"),rs("id")%>

<% if not bValid then response.write "You cannot navigate to this page without selecting a forum message. Please " response.write "return to the forum index and try again." response.end end if sTopic = rs("Topic") %> <% if sCaption <> "" then response.write "" & sCaption & "

" end if %>
Topic: <%= rs("Topic") %> 
Posted by: <%=rs("AuthorName")%> [View Profile]
Date/Time: <%= rs("DatePosted")%>

<% =sMsg %>

"> "> ">

<% rs.close cmd.parameters.delete(0) sThread = MessageChildren(iThreadParent, 0, iMessageID) if sThread <> "" then response.write "
Entire Thread ::

" %> <% response.write sThread end if %>
 Topic  Date  View  Author
<% Sub logincheck(email,id) if session("useremail") = email or session("userisadmin") then response.write "[Delete] [Edit]" End Sub %>