<% if intCurrentMessageID<=0 then if intCurrentGroupID>0 then 'There is no message selected. Display the description of the group call ServerTransfer("groupdescription.asp") elseif intCurrentBoardID>0 then 'There is no group selected. Instruct user to select group call ServerTransfer("nogroupselected.asp") end if end if if not CheckReadMessage(GetDBCon(), intCurrentUserID, intCurrentMessageID, blnInArchive) then call RaisePermissionError() set objRs = GetMessage(GetDBCon(), intCurrentMessageID, blnInArchive) if objRs.EOF then objRs.close set objRs = nothing 'check if the message is in another archive setting set objRs = GetMessage(GetDBCon(), intCurrentMessageID, not blnInArchive) if objRs.EOF then call RaiseError(STR_ERROR_MESSAGE_NONEXSISTANT) 'switch archive setting if the message was found blnInArchive = not blnInArchive if blnInArchive then Response.Cookies(cLICENSE_ID)("archive") = "yes" else Response.Cookies(cLICENSE_ID)("archive") = "" end if end if strMessage = objRs("message") dtmTimestamp = objRs("timestamp") intAuthorID = objRs("authorID") strSubject = objRs("subject") strEmail = objRs("email") strAuthor = objRs("author") intDepth = objRs("debth") strIP = objRs("postingIP") blnAnyReplies = objRs.Fields.Item("anyreplies") blnAnyAttachments = objRs("anyattachments") blnApproved = objRs("isApproved") objRs.close set objRs = nothing if not blnInArchive then 'if intDepth<9 then 'maximum depth = 9 (base 0) blnCanReply = CheckWriteMessage(GetDBCon(), intCurrentUserID, intCurrentMessageID, blnInArchive) 'else ' blnCanReply = false 'end if if not blnCanReply then blnCanPost = CheckWriteGroup(GetDBCon(), intCurrentUserID, intCurrentGroupID) else blnCanPost = true end if else blnCanPost = false blnCanReply = false end if blnModerator = CheckModeratorForGroup(GetDBCon(), intCurrentUserID, intCurrentGroupID) if not blnModerator and not blnApproved then Response.Redirect("messagenotapproved.asp?f=messagesReload") blnCanAttach = Application(cLICENSE_ID & "cATTACHMENTS") and (blnCanReply and (not blnInArchive) and intCurrentUserID>0 and intCurrentUserID = intAuthorID and dtmTimestamp>(Now()-1) or blnModerator) blnCanEdit = blnModerator or ((blnCanReply and (not blnInArchive) and intCurrentUserID>0 and intCurrentUserID = intAuthorID and dtmTimestamp>(Now()-1) and not blnAnyReplies)) if intAuthorID>0 then blnShowEmail = (len(strEmail)>1 and (lookup(GetDBCon(),"optShowEmail", "forumUsers", "ID", intAuthorID) or blnModerator)) else blnShowEmail = (len(strEmail)>1 and (Application(cLICENSE_ID & "cSHOW_EMAILS") or blnModerator)) end if %>