📄 moderate.asp
字号:
mM_NAME = 20
tLAST_POST_AUTHOR_NAME = 21
currForum = 0
currTopic = 0
dim Cat_Status
dim Forum_Status
dim mdisplayed
mdisplayed = 0
rec = 1
for iTopic = 0 to iTopicCount
if (rec = strPageSize + 1) then exit for
Cat_Status = arrTopicData(cCAT_STATUS, iTopic)
Cat_Name = arrTopicData(cCAT_NAME, iTopic)
Forum_ID = arrTopicData(fFORUM_ID, iTopic)
Forum_Subject = arrTopicData(fF_SUBJECT, iTopic)
Forum_Cat_ID = arrTopicData(fCAT_ID, iTopic)
Forum_PrivateForums = arrTopicData(fF_PRIVATEFORUMS, iTopic)
Forum_FPasswordNew = arrTopicData(fF_PASSWORD_NEW, iTopic)
Forum_Status = arrTopicData(fF_STATUS, iTopic)
Topic_ID = arrTopicData(tTOPIC_ID, iTopic)
Topic_Author = arrTopicData(tT_AUTHOR, iTopic)
Topic_Subject = arrTopicData(tT_SUBJECT, iTopic)
Topic_Status = arrTopicData(tT_STATUS, iTopic)
Topic_LastPost = arrTopicData(tT_LAST_POST, iTopic)
Topic_LastPostAuthor = arrTopicData(tT_LAST_POST_AUTHOR, iTopic)
Topic_Replies = arrTopicData(tT_REPLIES, iTopic)
Topic_UReplies = arrTopicData(tT_UREPLIES, iTopic)
Topic_ViewCount = arrTopicData(tT_VIEW_COUNT, iTopic)
Topic_MemberID = arrTopicData(mMEMBER_ID, iTopic)
Topic_MemberName = arrTopicData(mM_NAME, iTopic)
Topic_LastPostAuthorName = arrTopicData(tLAST_POST_AUTHOR_NAME, iTopic)
Dim AdminAllowed, ModerateAllowed
if mLev = 4 then
AdminAllowed = 1
else
AdminAllowed = 0
end if
if mLev = 4 then
ModerateAllowed = "Y"
elseif mLev = 3 and ModOfForums <> "" then
if (strAuthType = "nt") then
if (chkForumModerator(Forum_ID, Session(strCookieURL & "username")) = "1") then ModerateAllowed = "Y" else ModerateAllowed = "N"
else
if (instr("," & ModOfForums & "," ,"," & Forum_ID & ",") <> 0) then ModerateAllowed = "Y" else ModerateAllowed = "N"
end if
else
ModerateAllowed = "N"
end if
if ModerateAllowed = "Y" and Topic_UReplies > 0 then
Topic_Replies = Topic_Replies + Topic_UReplies
end if
if chkDisplayForum(Forum_PrivateForums,Forum_FPasswordNew,Forum_ID,MemberID) then
if (currForum <> Forum_ID) and (currTopic <> Topic_ID) then
Response.Write " <tr>" & vbNewLine & _
" <td height=""20"" colspan=""6"" bgcolor=""" & strCategoryCellColor & """ valign=""middle""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><a href=""default.asp?CAT_ID=" & Forum_Cat_ID & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>" & ChkString(Cat_Name,"display") & "</b></font></a> / <a href=""forum.asp?FORUM_ID=" & Forum_ID & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>" & ChkString(Forum_Subject,"display") & "</b></font></a></td>" & vbNewline
if (ModerateAllowed = "Y") or (lcase(strNoCookies) = "1") then
Response.Write " <td align=""center"" valign=""middle"" bgcolor=""" & strCategoryCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """>" & vbNewLine
Call ForumAdminOptions()
Response.Write " </font></td>" & vbNewLine
elseif (mLev = 3) then
Response.Write " <td align=""center"" valign=""middle"" bgcolor=""" & strCategoryCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b> </b></font></td>" & vbNewLine
end if
Response.Write " </tr>" & vbNewLine
currForum = Forum_ID
end if
if currTopic <> Topic_ID then
Response.Write " <tr>" & vbNewline
if Cat_Status <> 0 and Forum_Status <> 0 and Topic_Status <> 0 then
' DEM --> Added if statement to display topic status properly
if Topic_Status = 2 then
UnApprovedFound = "Y"
Response.Write " <td bgcolor=""" & strForumCellColor & """ align=""center""><a href=""topic.asp?TOPIC_ID=" & Topic_ID & """>" & getCurrentIcon(strIconFolderUnmoderated,"Topic UnModerated","hspace=""0""") & "</a></td>" & vbNewline
elseif Topic_Status = 3 then
HeldFound = "Y"
Response.Write " <td bgcolor=""" & strForumCellColor & """ align=""center""><a href=""topic.asp?TOPIC_ID=" & Topic_ID & """>" & getCurrentIcon(strIconFolderHold,"Topic Held","hspace=""0""") & "</a></td>" & vbNewline
else
Response.Write " <td bgcolor=""" & strForumCellColor & """ align=""center""><a href=""topic.asp?TOPIC_ID=" & Topic_ID & """>" & ChkIsNew(Topic_LastPost) & "</a></td>" & vbNewline
end if
else
if Cat_Status = 0 then
strAltText = "Category Locked"
elseif Forum_Status = 0 then
strAltText = "Forum Locked"
else
strAltText = "Topic Locked"
end if
Response.Write " <td bgcolor=""" & strForumCellColor & """ align=""center""><a href=""topic.asp?TOPIC_ID=" & Topic_ID & """>" & getCurrentIcon(strIconFolderLocked,strAltText,"hspace=""0""") & "</a></td>" & vbNewline
end if
Response.Write " <td bgcolor=""" & strForumCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>"
Response.Write "<span class=""spnMessageText""><a href=""topic.asp?TOPIC_ID=" & Topic_ID & """>" & ChkString(left(Topic_Subject, 50),"display") & "</a></span> </font>" & vbNewLine
if strShowPaging = "1" then
TopicPaging()
end if
Response.Write " </td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ valign=""middle"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """><span class=""spnMessageText"">" & profileLink(chkString(Topic_MemberName,"display"),Topic_Author) & "</span></font></td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ valign=""middle"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & Topic_Replies & "</font></td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ valign=""middle"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & Topic_ViewCount & "</font></td>" & vbNewLine
if IsNull(Topic_LastPostAuthor) then
strLastAuthor = ""
else
strLastAuthor = "<br />by: <span class=""spnMessageText"">" & profileLink(Topic_LastPostAuthorName,Topic_LastPostAuthor) & "</span>"
end if
Response.Write " <td bgcolor=""" & strForumCellColor & """ valign=""middle"" align=""center"" nowrap><font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strFooterFontSize & """><b>" & ChkDate(Topic_LastPost, "</b> " ,true) & strLastAuthor & "</font></td>" & vbNewLine
if (ModerateAllowed = "Y") or (lcase(strNoCookies) = "1") then
Response.Write " <td bgcolor=""" & strForumCellColor & """ valign=""middle"" align=""center"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & vbNewLine
call TopicAdminOptions
Response.Write " </font></td>" & vbNewLine
elseif (mlev = 3) then
Response.Write " <td bgcolor=""" & strForumCellColor & """ valign=""middle"" align=""center"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """> </font></td>" & vbNewLine
end if
Response.Write " </tr>" & vbNewLine
currTopic = Topic_ID
rec = rec + 1
end if
mdisplayed = mdisplayed + 1
end if
next
if mdisplayed = 0 then
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ colspan=""6""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>No Matches Found</b></font></td>" & vbNewLine
if (mlev = 4 or mlev = 3) or (lcase(strNoCookies) = "1") then
Response.Write " <td align=""center"" bgcolor=""" & strForumCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """> </font></b></td>" & vbNewLine
end if
Response.Write " </tr>" & vbNewLine
end if
end if
Response.Write " </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine
Response.Write " </table>" & vbNewLine
if maxpages > 1 then
Response.Write " <table border=""0"" width=""100%"" align=""center"">" & vbNewline & _
" <tr>" & vbNewLine
Call DropDownPaging(2)
Response.Write " </tr>" & vbNewLine & _
" </table>" & vbNewLine
end if
Response.Write " <table width=""100%"" align=""center"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""left"" valign=""top"">" & vbNewLine & _
" <table>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td nowrap>" & vbNewLine & _
" <p><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & vbNewLine & _
" " & getCurrentIcon(strIconFolderNew,"New Posts","align=""absmiddle""") & " New posts since last logon.<br />" & vbNewLine & _
" " & getCurrentIcon(strIconFolder,"Old Posts","align=""absmiddle""") & " Old Posts."
if lcase(strHotTopic) = "1" then Response.Write (" (" & getCurrentIcon(strIconFolderHot,"Hot Topic","align=""absmiddle""") & " " & intHotTopicNum & " replies or more.)<br />" & vbNewLine)
Response.Write " " & getCurrentIcon(strIconFolderLocked,"Locked Topic","align=""absmiddle""") & " Locked topic.<br />" & vbNewLine
' DEM --> Start of Code added for moderation
if HeldFound = "Y" then
Response.Write " " & getCurrentIcon(strIconFolderHold,"Held Posts","align=""absmiddle""") & " Held Posts.<br />" & vbNewline
end if
if UnApprovedFound = "Y" then
Response.Write " " & getCurrentIcon(strIconFolderUnmoderated,"UnModerated Posts","align=""absmiddle""") & " UnModerated Posts.<br />" & vbNewline
end if
' DEM --> End of Code added for moderation
Response.Write " </font></p></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine
WriteFooter
Response.End
sub ForumAdminOptions()
if (ModerateAllowed = "Y") or (lcase(strNoCookies) = "1") then
' DEM --> Added code to allow for moderation
if UnModeratedPosts > 0 then
if ModerateAllowed = "Y" and (CheckForUnModeratedPosts("FORUM", Forum_Cat_ID, Forum_ID, 0) > 0) then
ModString = "CAT_ID=" & Forum_Cat_ID & "&FORUM_ID=" & Forum_ID
Response.Write " <a href=""JavaScript:openWindow('pop_moderate.asp?" & ModString & "')"">" & getCurrentIcon(strIconFolderModerate,"Approve/Hold/Reject All UnModerated Posts in this Forum","") & "</a>" & vbNewline
UnModeratedFPosts = 1
end if
end if
' DEM --> End of code added to allow for moderation
end if
end sub
sub TopicPaging()
mxpages = (Topic_Replies / strPageSize)
if mxPages <> cLng(mxPages) then
mxpages = int(mxpages) + 1
end if
if mxpages > 1 then
Response.Write(" <table border=""0"" cellspacing=""0"" cellpadding=""0"">" & vbNewLine)
Response.Write(" <tr>" & vbNewLine)
Response.Write(" <td valign=""middle""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & getCurrentIcon(strIconFolderPosticon,"","") & "</font></td>" & vbNewLine)
for counter = 1 to mxpages
ref = " <td align=""right"" valign=""middle"" bgcolor=""" & strForumCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>"
if ((mxpages > 9) and (mxpages > strPageNumberSize)) or ((counter > 9) and (mxpages < strPageNumberSize)) then
ref = ref & " "
end if
ref = ref & widenum(counter) & "<span class=""spnMessageText""><a href=""topic.asp?"
ref = ref & ArchiveLink
ref = ref & "TOPIC_ID=" & Topic_ID
ref = ref & "&whichpage=" & counter
ref = ref & """>" & counter & "</a></span></font></td>"
Response.Write ref & vbNewLine
if counter mod strPageNumberSize = 0 then
Response.Write(" </tr>" & vbNewLine)
Response.Write(" <tr>" & vbNewLine)
Response.Write(" <td> </td>" & vbNewLine)
end if
next
Response.Write(" </tr>" & vbNewLine)
Response.Write(" </table>" & vbNewLine)
end if
end sub
sub TopicAdminOptions()
' DEM --> Start of Code for Full Moderation
if UnModeratedFPosts > 0 then
if CheckForUnModeratedPosts("TOPIC", Forum_Cat_ID, Forum_ID, Topic_ID) > 0 then
TopicString = "TOPIC_ID=" & Topic_ID & "&CAT_ID=" & Forum_Cat_ID & "&FORUM_ID=" & Forum_ID
Response.Write " <a href=""JavaScript:openWindow('pop_moderate.asp?" & TopicString & "')"">" & getCurrentIcon(strIconFolderModerate,"Approve/Hold/Reject All UnModerated Posts for this Topic","hspace=""0""") & "</a>" & vbNewline
end if
end if
' DEM --> End of Code for Full Moderation
end sub
sub DropDownPaging(fnum)
if maxpages > 1 then
if mypage = "" then
pge = 1
else
pge = mypage
end if
Response.Write " <form name=""PageNum" & fnum & """ action=""moderate.asp"" method=""post"">" & vbNewLine
Response.Write " <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
if strArchiveState = "1" and ArchiveView = "true" then Response.Write(" <input name=""ARCHIVE"" type=""hidden"" value=""" & ArchiveView & """>" & vbNewLine)
if fnum = 1 then
Response.Write(" <b>Page: </b><select name=""whichpage"" size=""1"" onchange=""ChangePage(" & fnum & ");"">" & vbNewLine)
else
Response.Write(" <b>There are " & maxpages & " Pages of Unmoderated Posts: </b><select name=""whichpage"" size=""1"" onchange=""ChangePage(" & fnum & ");"">" & vbNewLine)
end if
for counter = 1 to maxpages
if counter <> cLng(pge) then
Response.Write " <option value=""" & counter & """>" & counter & "</option>" & vbNewLine
else
Response.Write " <option selected value=""" & counter & """>" & counter & "</option>" & vbNewLine
end if
next
if fnum = 1 then
Response.Write(" </select><b> of " & maxPages & "</b>" & vbNewLine)
else
Response.Write(" </select>" & vbNewLine)
end if
Response.Write(" </font></td>" & vbNewLine)
Response.Write(" </form>" & vbNewLine)
end if
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -