<% Dim objRS, sig, bodyquote, messageID, threadID dim rights,allforum, emnotify, PGDCode, forumID Dim r_do, appid, subject, arrReply, emailview, allowupload, isPostAllowed Dim oriMsgIcon, alwaysSig, upRestriction,isUploadAllowed, temparr,NoIMGinPosts Dim parentAuthor, upSetting, mode, returnedValue,objCom, uploadErrMsgDisp, memberModerated Dim needRevision, isTop, isFAQ, locked, allowpoll r_do = request.queryString("do") isPostAllowed = true allforum = Application(dbName&"foruminfo") messageID = request.queryString("messageID") if messageID = "" then messageID = 0' fill in messageID for r_do<>"reply" for spPostOrReply if len(r_do) = 0 then response.redirect ("redirect.asp") if r_do="reply" then set objRS = server.createobject("adodb.recordset") objRS.open dbOwnerPrefix&"spPostOrReply("& MemID &", "& messageID &")", datastore, , ,adCmdStoredProc if not (objRS.state = adStateClosed) then sig = objRS(0).value alwaysSig = objRS(1).value memberModerated = objRS(2).value set objRS = objRS.nextrecordset arrReply = objRS.getRows objRS.close else isPostAllowed = false end if set objRS = nothing if isPostAllowed then parentAuthor = arrReply(1,0) threadID = arrReply(2,0) forumID = arrReply(3,0) subject = SQLout(arrReply(4,0)) isTop = arrReply(5,0) isFAQ = arrReply(6,0) locked = arrReply(7,0) Dim quoteContent:quoteContent = arrReply(0,0) bodyquote = vbcrlf & "[quote]" & quotePrefix & " " & parentAuthor & vbcrlf & vbcrlf & SQLout(quoteContent) & vbcrlf &"[/quote]"& vbcrlf appid = ForumIdToAppid(forumID) PGDCode = allforum(13,appid) end if else set objRS = server.createobject("adodb.recordset") objRS.open dbOwnerPrefix&"spPostOrReply("& MemID &", "& messageID &")", datastore, , ,adCmdStoredProc sig = objRS(0).value alwaysSig = objRS(1).value memberModerated = objRS(2).value objRS.close set objRS = nothing ' appid = request.queryString("appid") ' forumID = allforum(0,appid) forumid = request.querystring("forumid") appid = ForumIdToAppid(forumID) PGDCode = allforum(13,appid) end if Dim objPermission Set objPermission = new PermissionSetting With objPermission .memID = memID .appid = appid if r_do="poll" then .GetPermission(true) allowpoll = .poll else .GetPermission(false) end if rights = .post Mode = .isModerator If r_do="reply" then if not ( rights = 2 or rights = 4 ) then isPostAllowed = false else if r_do="poll" and not allowpoll then isPostAllowed = false if rights < 3 then isPostAllowed = false end if if isPostAllowed and not isAdmin then 'Get upload permission upsetting = .Upload upRestriction = .UploadRestriction returnedValue = .UploadReturnedValue end if End With Set objPermission = nothing if not (isadmin or mode) and locked = 1 then isPostAllowed = false end if if isPostAllowed then 'Checking Upload Permission sig = SQLout(sig) isUploadAllowed = true if not isAdmin then if upSetting<>"" and returnedValue <> -1 then 'see if the user is allowed to upload; returnedValue = -1 means not meet upload requirement 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 len(UpLoadSizeLimit)=0) or (len(uploadformat)=0) then 'user not allowed to upload isUploadAllowed = false uploadErrMsgDisp = replace(RightViolationMessage,"
","") end if else isUploadAllowed = false 'temparr is empty end if else isUploadAllowed = false if isGuest then uploadErrMsgDisp = replace(RightViolationMessage,"
","") else uploadErrMsgDisp = replace(uploadErrorMsg,"{0}",upRestriction) end if end if end if end if NoIMGinPosts = allforum(25,appid) 'response.write(upSetting&"
") 'response.write(mode&"
") 'response.write(returnedValue) Dim key, language %> <%= Application(dbName&"forumtitle") %> <%= NoScript() %> <%= OutputCSS() %> <% Dim onload if isPostAllowed then if r_do="reply" then onload = "onload=""if (opener.document.selectedText.selectedText.value!=''){document.forms[0].body.value += '[quote]'+opener.document.selectedText.selectedText.value+'[/quote]'};document.forms[0].body.focus();""" else onload = "onload=""document.forms[0].subject.focus();""" end if end if %> style="margin:0px 0px 0px 0px" <%= Application(dbName&"bodyoption") %>>
<% if isPostAllowed then %> <% if r_do = "poll" then Dim numberOfOptions:numberOfOptions = 10 '## Define your default number of options here ## Dim iOption %> <% end if %> <% if r_do<>"poll" and (isAdmin or mode)then %> <% End If %> <% else %> <% end if %>
<%if r_do="add" then%> <%= postDesc %> <% elseif r_do="reply" then %> <%= replyDesc %> <% elseif r_do="poll" then %> <%= postPollDesc %> <% end if %>
rowspan="2" valign="top" class="c2"><%= tmName %> <%=( memLogin ) %>   <% if not isGuest then %> > <%= signatureDesc %> <% end if %>
> <%if not isGuest then %> <%if not (Application(dbName&"maildll")="NoMail" or Application(dbName&"enableSubscribe")=0 or _ Application(dbName&"foruminfo")(16,appid)<1) then %> <%= notifyViaEmailDesc %> <% else %>  <%= SubscriptionErrorMessage %> <% end if %> <% else %>   <% end if %>
class="c2" valign="top"> <% if r_do <> "poll" then response.write(tmSubject) else response.write(pollQDesc)%> > value="<%= replySubjectPre(subject)%>" <%end if %> tabindex="0"> <% if r_do = "poll" then %>   <%= pollAllowMulDesc %> <% end if %>
<% call pgdMsgIcons %>
class="c2">

<%= bodyFieldDesc %>

<% if PGDCode = 1 then call pgdSmiley() %>
> <% if PGDCode = 1 then call pgdCodes()%> <% if r_do="reply" then %>    <% end if %>
<% Dim rowNumber:if r_do = "poll" then rowNumber = "10" else rowNumber = "14"%> <%=pgdBodyArea("",rowNumber)%>
><%= pollOptionDesc %>

> <% for iOption = 1 to numberOfOptions%> <% next %>
<%= iOption %>.
class="c2"><%= uploadFieldDesc %> > <% if isUploadAllowed then%> <% Dim i, maxnumupload:maxnumupload = allforum(30,appid) %> <%= uploadLinkDesc %> <% if NoIMGinPosts&"" <> "1" then %>    <%= embedPicDesc %> <% Else %>   <%= NoIMGinPostsDesc %> <% end if %> <% Else %> <%= uploadErrMsgDisp %> <% end if %>
class="c2"><%= postExtraDesc %> > ><%= adminLockDesc %> | ><%= adminFAQDesc %> | ><%= adminPinDesc %> "><% ' make it default on if admin or mode are replying to a locked topic/post %>
colspan="2" align="center" class="subhead"><%= RightViolationMessage %>

<% if isPostAllowed then %> <% if r_do="reply" then %> "> "> "> "> <% else %> <% end if %> <% If not(isadmin or Mode) then %> "> "> "> <% End If %> "> "> <% end if %>

<% call pgdResize(iff(r_do = "poll",450,350),"body") %>