<% 'Option Explicit Dim section,sql,username,level,topic,id,recordnum,rsReply,replyText username = Request.Cookies("junooni_userid") level = Request.Cookies("junooni_level") id = Request.QueryString("id") topic = Request.QueryString("topic") recordnum = Request.QueryString("recordnum") if recordnum = "" then recordnum = 0 end if %> <% Call Connjunooni(Conn) if not loginstatus(username)Then response.redirect "login.asp" end if if id <> "" then if id = topic then sql = "SELECT topics.*, forums.* FROM forums INNER JOIN topics ON forums.forumid = topics.forum WHERE topics.id = " & id 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")) replyText = "[quote]" & "posted by " & rsReply("reply_by") & chr(13) & chr(10) & "[b]" & replyText & "[/b][/quote]" 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 %>

Forum : <%=rsReply("forumname")%>

Post reply
<% if rsReply("locked") = False then if username <> "" then%> <%if CInt(level) < rsReply("level") then%>

Sorry, you do not have posting privaledges in this forum.

<%else%>
">
Name <%=username%>
Icon              
Message BoldItalicUnderlineInsert QuoteInsert ImageHappy :)Sad :(Laugh :DWink ;)razz :pAngry >:(Shocked 8O
<%end if%> <%else%>

You must be logged in to post a topic.

<%end if else%>

Sorry, this topic is closed. Back to topic

<%end if%> <% rsReply.close set rsReply = nothing conn.close set conn = nothing %>