<% Dim msgID, arr,i, arrAllMeg, allrow, edit, Mem, forumtitle, lockedTopic Dim key, language, m, tmode, p, allCat Dim strConn, objRS, allData, email, datecreated, author, threadID, subject, body, ip, forumID,upfile, disDate Dim timeoffset,dateSignUp,location,sigpicture, emailview, messageNotAvailable, showResult,msgIcons Dim siteWideSigUpload, siteWideAvatar, siteWideSubscription, forumSubscription, allowmail Dim disPicture, avatar, memberchoice, ispoll, deleteRight, alwaysExpand,maxShortMsg, NoAvatar dim NoIMGinPosts, allowShortMsg, acceptShortMsg dim smode, keyAndLan, mpage, forumMods siteWideSigUpload = Application(dbName&"allowsigupload") siteWideAvatar = Application(dbName&"allowAvatar") key = request.queryString("key") language = request.queryString("language") p = request.queryString("p") m = request.queryString("m") appid = request.queryString("appid") timeoffset = Application(dbName&"timeoffset") showResult = request.queryString("showResult") allforum = Application(dbName&"foruminfo") siteWideSubscription = Application(dbName&"enableSubscribe") allowmail = iff(lcase(Application(dbName&"maildll"))<>"nomail",true,false) maxShortMsg = Application(dbName&"maxShortMsg") keyAndLan = "&key="& Server.URLEncode(""&key) 'key = HTMLEncode(""&key) 'language = HTMLEncode(""&language) %> <% NoAvatar = ""&request.cookies(dbName&"ASPplayground_forum_Speed")("NoAvatar") mpage = ""&request.queryString("mpage") if len(mpage) = 0 or not isnumeric(mpage) then mpage = 1 messageNotAvailable = false if m <> "" then if memBrowser <> "moz6" then response.redirect("tm.asp?"&queryString) response.end end if strConn = dbOwnerPrefix&"spDisMsg ("&m&")" set objRS = server.createobject("adodb.recordset") with objRS .CacheSize = 1 .open strConn, datastore, , , adcmdStoredProc If .EOF then messageNotAvailable = true else allData = .getrows End if .close end with set objRS=nothing Dim withsig, signature Dim rating, rateTimes, moderated, customTitle, score, Revision, isRecycled, recycleReason,deletetime Dim hideprofile if not messageNotAvailable then threadID=allData(0,0) body=allData(1,0)''0000000 ip=allData(2,0)''00000000 forumID=allData(3,0) edit=allData(4,0)'000000 upfile=allData(5,0)'00000 lockedTopic=allData(6,0) datecreated=allData(7,0) author = allData(8,0) email = allData(9,0) subject = allData(10,0) mem = allData(11,0) totalposts = allData(12,0) dateSignUp = allData(13,i) location = allData(14,i) sigpicture = allData(15,i) emailview = allData(16,i) msgIcons = allData(17,i) avatar = allData(18,i) memberchoice = allData(19,i) signature = allData(20,i) withsig = allData(21,i) isPoll = allData (22,i) rating = allData(23,i) rateTimes = allData(24,i) moderated = allData(25,i) customTitle = JSEncode(""&allData(26,i)) score = allData(27,i) Revision = allData(28,i) allowShortMsg = allData(29,i) acceptShortMsg = allData(30,i) isRecycled = iff(isNull(allData(31,i)),false,true) recycleReason = allData(32,i)&"" deletetime = allData(33,i) hideprofile = allData(34,i) disDate = SQLdate(datecreated, timeoffset, true) Dim isThreadRecycled:isThreadRecycled = isRecycled erase allData dim rights, allforum, mode, pgdCode, enableRating, allowpoll,allowvote, showratelink appid = ForumIdToAppid(forumID) 'this is to mediate problem of bug #1 --message moved if request.queryString("appid")<>"" and cStr(appid) <> request.queryString("appid") then messageNotAvailable = true if isNumeric(appid) then appid = clng(request.queryString("appid")) end if end if 'end of bug #1 forumtitle = allforum(1,appid) pgdCode = allforum(13,appid) forumSubscription = allforum(16,appid) deleteRight = allforum(21,appid) enableRating = allForum(22,appid) NoIMGinPosts = allForum(25,appid) forummods = ","&allforum(11,appid)&"," Dim allModsForReport:allModsForReport = allForum(11,appid) '##### Test Permission code begin Dim objPermission Set objPermission = new PermissionSetting With objPermission .memID = memID .appid = appid .GetPermission(true) rights = .post Mode = .isModerator allowpoll = .poll allowVote = .vote enableRating = .enableRating showRateLink = .rate End With Set objPermission = nothing '##### Test Permission code end if rights<1 then messageNotAvailable = true Dim bIgnore, bLink bIgnore = False If len(memBlockList) <> 0 Then If Instr(1, ","&memBlockList, "," & mem & ",", 0) > 0 Then bIgnore = True subject = tmSubBlockedDesc avatar = "" sigpicture = "" upfile = "" dispicture = "" signature = "" location = "" withsig = 0 body = replace(tmMsgBlockedDesc,"{mem}",mem) End If End If if isRecycled then subject = ttDeletedTopic avatar = "" sigpicture = "" upfile = "" dispicture = "" signature = "" location = "" withsig = 0 Dim unTouchedBody:unTouchedBody = body body = replace(ttTmMsgRecycledDesc,"{deletetime}",SQLDate(deletetime, timeoffset, true)) & iff(len(recycleReason),tmRecycledReason&recycleReason,"") if mode or isadmin then body = body & "

" & unTouchedBody & "


" & replace(tmPostRestoreDesc,"{msgid}",m) else moderationRequired = true end if lockedTopic = 1 end if if Application(dbName&"allowHide") = 1 and hideProfile = 1 and not isAdmin and not (""&mem=memID) then location = "" dateSignUp = "" end if if score&"" = "" then score = 0 if emailview = 0 and not isAdmin then email= "" else if allowmail then email= "" else email= "" end if email = email & "" end if if edit<>"" then edit="


"&edit if isnull(upfile) or upfile="" then upfile="" else upfile=""&tmAttachedFile&" ("&(ubound(split(upfile,"|"))+1)&")" end if if NoAvatar <> "1" then disPicture = displayAvatarAndSelfPicture(avatar,sigpicture,memberchoice,mem,siteWideSigUpload,siteWideAvatar, totalposts) else disPicture = " " end if if isnull(location) or location="" then location=" " else location= memberFromDesc &" " & location end if If bIgnore Then bLink = " " Else if ((allowShortMsg = 1 and acceptShortMsg = 1) or isAdmin) and maxShortMsg<>0 then bLink = "  " end if bLink = bLink & " " bLink = bLink & " " End If 'Dim posChr1:posChr1 = instr(1,body,chr(1),0) 'if posChr1 > 0 then 'body = Right(body,len(body)-posChr1) 'end if Dim catID, catName, sCat, catApp allCat = Application(dbName&"Category") catID = allForum(5,appid) for sCat = 0 to ubound(allCat,2) if allCat(0,sCat) = catID then catApp = sCat exit for end if next catName = allCat(1,catApp) erase allCat smode = smodeProcess(request.queryString("smode")) tmode = tmodeProcess(request.queryString("tmode")) end if else messageNotAvailable = true end if if NoIMGinPosts&"" = "1" then NoImage = "1" NoImageRes = NoImage %> <% if not (rights=0 or messageNotAvailable) then response.write (SQLOut(subject)) %> <%= OutputCSS() %> > <% call headerHTML() DIM pgView,pgTitle,pgParent pgView = "tree" if rights<>0 and not messageNotAvailable then pgTitle = subject pgParent = "tree" %>
<% showpollid = threadID 'if not messageNotAvailable and rights <> 0 and isPoll=1 then call showPoll(threadID) %> <% call mTableHeader() %>
<% Dim timeBeforeEditDel:timeBeforeEditDel = Application(dbName&"timeBeforeEditDel") Dim editDeleteAllowed:editDeleteAllowed = false if not (isadmin or mode) then if (memID = cStr(mem)) and (Datediff("d", SQLMediumDate(datecreated), SQLNowdate()) < timeBeforeEditDel or timeBeforeEditDel = 0) then editDeleteAllowed = true end if end if Dim moderationRequired:moderationRequired = false Dim showModerateIcon:showModerateIcon = false if moderated=1 and not (isAdmin or mode or (CSTR(Mem)=memID and not isGuest)) then _ moderationRequired = true if moderated=1 and (isAdmin or mode) then _ showModerateIcon = true subject = SQLout(subject) body = SQLout(body) signature = SQLout(signature) %> <% if rights = 0 then messageNotAvailable = true %> <% if not messageNotAvailable then %> <% Dim objPGDCode Set objPGDCode = New RegExp objPGDCode.global = true objPGDCode.ignorecase = true %>
> <%if Mem <> -1 then%> <%= tmViewProfileDesc %> <%= email %><%= bLink %>
<% End If %> <%= author %> <%if Mem <> -1 then%>

<%= dispicture %>

<%= tmPostCountOfAuthor &" "& totalposts%>
<% if enableRating>0 then %> <%= tmScoreDesc&" "&score %>
<% end if %> <%= memberSinceDesc &" "& SQLDate(dateSignUp, timeoffset, false) %>
<%= location %> <%end if%>

>
<% if not moderationRequired then %> <%= shrink(subject,40) %> <%= PostRating(rating, ratetimes) %> <% if moderated=1 then %> <%= ttAwaitMode %> <% end if %> <% else %> <%= ttAwaitMode %> <% end if %> <% if showModerateIcon then %> <% end if %> <% if not (moderationRequired or bIgnore or isRecycled) then %> <% if (Mode or isAdmin or (editDeleteAllowed and deleteRight = 2 and rights >=2 and cStr(m) <> cStr(threadID)) _ or (editDeleteAllowed and deleteRight = 3 and rights >=3)) and not isGuest then %> <% end if %> <% if (rights = 2 or rights = 4) and (lockedTopic <> 1 or (isadmin or mode)) then %> <% end if %> <% if (editDeleteAllowed or isAdmin or Mode) and not isGuest and (lockedTopic <> 1 or (isadmin or mode)) then %> <% end if %> <% if allowmail and not isGuest then%> <% end if %> <% end if %>
<%= adminApproveDesc %> <%= adminDeleteDesc %> <%= tmReply %> <%= tmEdit %> <%= tmForward %>

<% if not moderationRequired then %> <%= (PGDCodeResolution(objPGDCode,body,PGDCode))%> <%= iff(len(upfile),"

"&upfile,"") %> <%= edit %> <% NoImage = NoSigImage %> <%= iff(withsig = 1,PGDCodeResolution(objPGDCode,sigDivider&signature,1),"") %> <% else %> <%= ttAwaitMode %> <% end if %>
>   > <% if not isGuest and maxShortMsg <> 0 then %> <%= tmReportDesc %> | <% Elseif allowmail then %> &subject=<%= JSEncode(""&tmReportDesc&": ("&m&")") %>&body=<%= JSEncode(""&forumdir&"fb.asp?m="&m) %>&do=report')"><%= tmReportDesc %> | <% Else %> <% end if %> <% if not ( moderated=1) and (showRateLink) then %><%= tmRateThisDesc %> | <% else %> <% end if %> <%= tmdate & SQLdate(datecreated, timeoffset, true) %> <% if Revision > 0 then response.write(" | "&tmRevision &Revision&" | ") %> <% if isAdmin then response.write (" | ID: "&m&" | IP: "&ip)%>
> <%= mExpTreeDesc %> >
id="treeRow<%= threadID %>" style="display:none;">
<% Set objPGDCode = nothing %> <% else Dim errorResponse if rights <> 0 or isEmpty(rights) then errorResponse = MessageUnavailableMessage else errorResponse = PrivateRightViolationMessage end if %>
align="center" nowrap class="subhead" colspan=2>
<%= errorResponse %>

<% end if %> <% call mTopNav(0) %> <% call jumpmenu() %> <% if not messageNotAvailable then %> <% end if %>
<% call iconLegend() %> <% call footerHTML() %>