<% dim messageID,page,objRS,Subject,Body,Name,Email,access,arrEdit,mem,forumID,appid,PGDCode, allforum, allowupload, oriMsgIcon, withsig dim sig, locked, upRestriction,isUploadAllowed,strSQL, temparr, onload,datecreated,timeBeforeEditDel Dim upfile,NoIMGinPosts, mode,returnedValue, upSetting, objCom, needRevision, isFAQ, isTOP, allowpoll, addpoll Dim isPoll, parent messageID = request("messageID") PGDCode = application(dbName&"foruminfo")(13,appid) timeBeforeEditDel = Application(dbName&"timeBeforeEditDel") addpoll = ""&request.querystring("addpoll") if len(messageID) = 0 then response.redirect("redirect.asp") set objRS = Server.CreateObject("ADODB.RECORDSET") objRS.open dbOwnerPrefix&"spGetEdit("&messageID&")", datastore, , , adCmdStoredProc if not (objRS.EOF and objRS.BOF) then arrEdit=objRS.getrows objRS.close set objRS=nothing mem=arrEdit(0,0) Name=HTMLEncode(""&arrEdit(1,0)) Body=arrEdit(2,0) Subject=arrEdit(3,0) Email=HTMLEncode(""&arrEdit(4,0)) forumID=arrEdit(5,0) upfile=arrEdit(6,0) oriMsgIcon = arrEdit(7,0) withsig = arrEdit(8,0) sig = arrEdit(9,0) locked = arrEdit(10,0) datecreated = arrEdit(11,0) isTop = arrEdit(12,0) isFAQ = arrEdit(13,0) isPoll = arrEdit(14,0) parent = arrEdit(15,0) if Email = "none" then Email="" access = false allforum = Application(dbName&"foruminfo") appid = ForumIdToAppid(forumID) PGDCode = allforum(13,appid) needRevision = allforum(27,appid) Dim objPermission Set objPermission = new PermissionSetting With objPermission .memID = memID .appid = appid .GetPermission(true) Mode = .isModerator allowpoll = .poll if not isGuest and memID = ""&mem then if timeBeforeEditDel = 0 then access = true else if Datediff("d", SQLMediumDate(datecreated), SQLNowdate()) < timeBeforeEditDel then _ access = true end if end if if locked = 1 then access = false if mode then access = true if isAdmin then access = true if not (isnull(sig) or sig="") then sig = SQLout(sig) if access then subject = SQLout(subject) body = SQLout(body) onload = "onload=""document.forms[0].body.focus();""" end if if access and not isAdmin then upsetting = .Upload upRestriction = .UploadRestriction returnedValue = .UploadReturnedValue end if End With Set objPermission = nothing Dim displayPollInput:displayPollInput = false Dim displayPollButton:displayPollButton = false if addpoll="true" and allowpoll and isPoll<>1 and parent = 0 then displayPollInput = true if addpoll="" and allowpoll and isPoll<>1 and parent = 0 then displayPollButton = true if access and memID = ""&mem then isUploadAllowed = true if not isAdmin then if upSetting<>"" and returnedValue <> -1 then 'see if the user is allowed to upload temparr = split(upSetting,"|") if isArray(temparr) then 'see if the user is allowed to upload again UpLoadSizeLimit = temparr(0) if ubound(temparr)=1 then 'these two lines are requirements for user to upload uploadformat = temparr(1) 'both uploadformat and UpLoadSizeLimit have to have some values else uploadformat = "" end if if (UpLoadSizeLimit = "0" or UpLoadSizeLimit="") or (uploadformat="") then 'user not allowed to upload isUploadAllowed = false end if else isUploadAllowed = false 'temparr is empty end if else isUploadAllowed = false end if end if else isUploadAllowed = false end if NoIMGinPosts = allforum(25,appid) 'response.write(upSetting&"
") 'response.write(mode&"
") 'response.write(returnedValue) %> <%= Application(dbName&"forumtitle") %> <%= NoScript() %> <%= OutputCSS() %> " <%= onload %> style="margin:0px 0px 0px 0px" <%= Application(dbName&"bodyoption") %>>
<% if access then %> <% if displayPollInput then Dim numberOfOptions:numberOfOptions = 10 '## Define your default number of options here ## Dim iOption %> <% end if %> <% if (isAdmin or mode) then %> <% End If %> <% else %> <% end if %>
<%= editDesc %>
class="c2" rowspan="2"><%= tmName %> class="cat">  <%= ( Name ) %>   <% if mem<>-1 then %> > <%= signatureDesc %> <% end if %>
>  
class="c2"><%= tmSubject %> > <% if displayPollButton then %> '" tabindex="0" class="buttons"> <% end if %> <% if displayPollInput then %>   <%= pollAllowMulDesc %> <% end if %>
<% call pgdMsgIcons %>
class="c2">

<%= bodyFieldDesc %>

<% if PGDCode = "1" then call pgdSmiley%>
> <% if PGDCode = 1 then call pgdCodes%>
<% Dim rowNumber:if displayPollInput then rowNumber = "10" else rowNumber = "14"%> <%= pgdBodyArea(body,rowNumber) %>
><%= pollOptionDesc %>

> <% for iOption = 1 to numberOfOptions%> <% next %>
<%= iOption %>.
class="c2"><%= uploadFieldDesc %> > <% if isUploadAllowed or (isAdmin or mode) then %> <% if upfile <>"" then Dim i, arrUpfiles:arrUpfiles = split(upfile,"|") response.write (""&tmAttachedFile&"   ") response.write (""&deleteUploadedFile&" ") else response.write (" ") end if%> <% if isUploadAllowed then %> <% Dim maxnumupload:maxnumupload = allforum(30,appid) %> <%= uploadAnotherFileDesc %> <% if NoIMGinPosts&"" <> "1" then %>    <%= embedPicDesc %> <% Else %>   <%= NoIMGinPostsDesc %> <% end if %> <% end if %> <% end if %>
class="c2"><%= postExtraDesc %> > ><%= adminLockDesc %> | ><%= adminFAQDesc %> | ><%= adminPinDesc %> | ><%= EditRevDesc %>
colspan="2" class="subhead" align="center"><%= RightViolationMessage %>

<% if access then %> "> "> "> "> <% If not(isadmin or Mode) then %> "> "> "> "> <% End If %> <% If displayPollInput then %> <% End If %> <% end if %>

<% call pgdResize(iff(displayPollInput,450,350),"body") %>