% Option Explicit Dim section, sql, username, level, topic, id, recordnum, rsReply, replyText username = Request.Cookies("pb_username") level = Request.Cookies("level") id = Request.QueryString("id") topic = Request.QueryString("topic") recordnum = Request.QueryString("recordnum") if recordnum = "" then recordnum = 0 end if %> <% if id <> "" then if id = "root" then sql = "SELECT topics.*, forums.* FROM forums INNER JOIN topics ON forums.forumid = topics.forum WHERE topics.id = " & topic else sql = "SELECT replies.*, forums.*, topics.locked FROM (forums INNER JOIN topics ON forums.forumid = topics.forum) INNER JOIN replies ON topics.id = replies.root WHERE replies.id = " & id end if Set rsReply = Server.CreateObject("ADODB.Recordset") rsReply.Open sql, conn, 3, 3 replyText = RevFormatText(rsReply("message")) else sql = "SELECT forums.*, topics.locked FROM forums INNER JOIN topics ON forums.forumid = topics.forum WHERE topics.id = " & topic Set rsReply = Server.CreateObject("ADODB.Recordset") rsReply.Open sql, conn, 3, 3 replyText = "" end if if rsReply("by") <> username then Response.Redirect("philboard_read.asp?id=" & topic & "&recordnum=" & recordnum) end if %>
Forum : "><%=rsReply("forumname")%>
<% if rsReply("locked") = False then if username <> "" then%> <%if CInt(level) < rsReply("level") then%>Desværre, du har ikke rettighed til at poste i dette forum.
<%else%> <%end if%> <%else%>You must be logged in to post a topic.
<%end if else%>Desværre, dette emne er lukket. Tilbage til oversigt
<%end if%> <% rsReply.close set rsReply = nothing conn.close set conn = nothing %>