📄 active.asp
字号:
"T.T_LAST_POST, " & _
"T.T_LAST_POST_REPLY_ID, " & _
"MEMBERS_1.M_NAME AS LAST_POST_AUTHOR_NAME, " & _
"F.F_PRIVATEFORUMS, " & _
"F.F_PASSWORD_NEW " & _
"FROM " & strMemberTablePrefix & "MEMBERS M, " & _
strTablePrefix & "FORUM F, " & _
strTablePrefix & "TOPICS T, " & _
strTablePrefix & "CATEGORY C, " & _
strMemberTablePrefix & "MEMBERS MEMBERS_1 " & _
"WHERE T.T_LAST_POST_AUTHOR = MEMBERS_1.MEMBER_ID "
if strPrivateForums = "1" and mLev < 4 then
strSql = strSql & " AND F.FORUM_ID IN (" & allAllowedForums & ") "
end if
strSql = strSql & "AND F.F_TYPE = 0 " & _
"AND F.FORUM_ID = T.FORUM_ID " & _
"AND C.CAT_ID = T.CAT_ID " & _
"AND M.MEMBER_ID = T.T_AUTHOR " & _
"AND (T.T_LAST_POST > '" & lastDate & "'"
' DEM --> if not an admin, all unapproved posts should not be viewed.
if mlev <> 4 then
strSql = strSql & " AND ((T.T_AUTHOR <> " & MemberID &_
" AND T.T_STATUS < 2)" ' Ignore unapproved/held posts
if mlev = 3 and ModOfForums <> "" then
strSql = strSql & " OR T.FORUM_ID IN (" & ModOfForums & ") "
end if
strSql = strSql & " OR T.T_AUTHOR = " & MemberID & ")"
end if
if Group > 1 and strGroupCategories = "1" then
strSql = strSql & " AND (C.CAT_ID = 0"
if recGroupCatCount <> "" then
for iGroupCat = 0 to recGroupCatCount
strSql = strSql & " or C.CAT_ID = " & allGroupCatData(1, iGroupCat)
next
strSql = strSql & ")"
else
strSql = strSql & ")"
end if
end if
strSql = strSql & ") "
strSql = strSql & " ORDER BY C.CAT_ORDER, C.CAT_NAME, F.F_ORDER, F.F_SUBJECT, T.T_LAST_POST DESC "
Set rs = Server.CreateObject("ADODB.Recordset")
if strDBType <> "mysql" then rs.cachesize = 50
rs.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
if rs.EOF then
recActiveTopicsCount = ""
else
allActiveTopics = rs.GetRows(adGetRowsRest)
recActiveTopicsCount = UBound(allActiveTopics,2)
end if
rs.close
set rs = nothing
' Sets up the Tree structure at the top of the page
Response.Write " <table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewline & _
" <tr>" & vbNewline & _
" <form name=""LastDateFrm"" action=""active.asp"" method=""post""><td>" & vbNewline & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" " & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
" " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpenTopic,"","") & " " & _
"Active Topics Since " & vbNewLine
Response.Write " <select name=""ShowSinceDateTime"" size=""1"" onchange=""SetLastDate();"">" & vbNewline & _
" <option value=""LastVisit"""
if ActiveSince = "LastVisit" or ActiveSince = "" then
Response.Write " selected"
end if
Response.Write "> Last Visit on " & ChkDate(Session(strCookieURL & "last_here_date"),"",true) & " </option>" & vbNewline & _
" <option value=""LastFifteen""" & chkSelect(ActiveSince,"LastFifteen") & "> Last 15 minutes</option>" & vbNewline & _
" <option value=""LastThirty""" & chkSelect(ActiveSince,"LastThirty") & "> Last 30 minutes</option>" & vbNewline & _
" <option value=""LastFortyFive""" & chkSelect(ActiveSince,"LastFortyFive") & "> Last 45 minutes</option>" & vbNewline & _
" <option value=""LastHour""" & chkSelect(ActiveSince,"LastHour") & "> Last Hour</option>" & vbNewline & _
" <option value=""Last2Hours""" & chkSelect(ActiveSince,"Last2Hours") & "> Last 2 Hours</option>" & vbNewline & _
" <option value=""Last6Hours""" & chkSelect(ActiveSince,"Last6Hours") & "> Last 6 Hours</option>" & vbNewline & _
" <option value=""Last12Hours""" & chkSelect(ActiveSince,"Last12Hours") & "> Last 12 Hours</option>" & vbNewline & _
" <option value=""LastDay""" & chkSelect(ActiveSince,"LastDay") & "> Yesterday</option>" & vbNewline & _
" <option value=""Last2Days""" & chkSelect(ActiveSince,"Last2Days") & "> Last 2 Days</option>" & vbNewline & _
" <option value=""LastWeek""" & chkSelect(ActiveSince,"LastWeek") & "> Last Week</option>" & vbNewline & _
" <option value=""Last2Weeks""" & chkSelect(ActiveSince,"Last2Weeks") & "> Last 2 Weeks</option>" & vbNewline & _
" <option value=""LastMonth""" & chkSelect(ActiveSince,"LastMonth") & "> Last Month</option>" & vbNewline & _
" <option value=""Last2Months""" & chkSelect(ActiveSince,"Last2Months") & "> Last 2 Months</option>" & vbNewline & _
" </select>" & vbNewline
Response.Write " <input type=""hidden"" name=""Cookie"" value=""2"">" & vbNewLine & _
" </font>" & vbNewline & _
" </td>" & vbNewline & _
" </form>" & vbNewline & _
" <td align=""center""> </td>" & vbNewline & _
" <form name=""ReloadFrm"" action=""active.asp"" method=""post"">" & vbNewline & _
" <td align=""right"">" & vbNewline & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & _
"<br />" & vbNewline & _
" <select name=""RefreshTime"" size=""1"" onchange=""autoReload();"">" & vbNewline & _
" <option value=""0""" & chkSelect(nRefreshTime,0) & ">Don't reload automatically</option>" & vbNewline & _
" <option value=""1""" & chkSelect(nRefreshTime,1) & ">Reload page every minute</option>" & vbNewline & _
" <option value=""2""" & chkSelect(nRefreshTime,2) & ">Reload page every 2 minutes</option>" & vbNewline & _
" <option value=""5""" & chkSelect(nRefreshTime,5) & ">Reload page every 5 minutes</option>" & vbNewline & _
" <option value=""10""" & chkSelect(nRefreshTime,10) & ">Reload page every 10 minutes</option>" & vbNewline & _
" <option value=""15""" & chkSelect(nRefreshTime,15) & ">Reload page every 15 minutes</option>" & vbNewline & _
" </select>" & vbNewline
Response.Write " <input type=""hidden"" name=""Cookie"" value=""1"">" & vbNewline & _
" </font>" & vbNewline & _
" </td>" & vbNewline & _
" </form>" & vbNewline & _
" </tr>" & vbNewline & _
" </table>" & vbNewline & _
" <font size=""" & strFooterFontSize & """><br /></font>" & vbNewLine
'### Start to build the table
Response.Write " <table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strTableBorderColor & """>" & vbNewline & _
" <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewline & _
" <tr>" & vbNewline & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """ valign=""middle""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>" & vbNewline
If recActiveTopicsCount <> "" and (mLev > 0) then
Response.Write " <form name=""MarkRead"" action=""active.asp"" method=""post"">" & vbNewline & _
" <input type=""hidden"" name=""AllRead"" value=""Y"">" & vbNewline & _
" <input type=""hidden"" name=""BuildTime"" value=""" & DateToStr(strForumTimeAdjust) & """>" & vbNewline & _
" <input type=""hidden"" name=""Cookie"" value=""2"">" & vbNewLine & _
" <acronym title=""Mark all topics as read""><input type=""image"" src=""" & strImageUrl & "icon_topic_all_read.gif"" value=""Mark all read"" id=""submit1"" name=""Mark all topics as read"" border=""0""" & dWStatus("Mark all topics as read") & "></acronym></font></td>" & vbNewLine & _
" </form>" & vbNewline
else
Response.Write " </font></td>" & vbNewline
end if
Response.Write " <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Topic</font></b></td>" & vbNewline & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Author</font></b></td>" & vbNewline & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Replies</font></b></td>" & vbNewline & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Read</font></b></td>" & vbNewline & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Last Post</font></b></td>" & vbNewline
if (mlev > 0) or (lcase(strNoCookies) = "1") then
Response.Write " <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>"
if (mLev = 4 or mLev = 3) or (lcase(strNoCookies) = "1") then
if UnModeratedPosts > 0 then
UnModeratedFPosts = 0
Response.Write "<a href=""moderate.asp"">" & getCurrentIcon(strIconFolderModerate,"View All UnModerated Posts","hspace=""0""") & "</a>"
else
Response.Write(" ")
end if
else
Response.Write(" ")
end if
Response.Write "</font></b></td>" & vbNewline
end if
Response.Write " </tr>" & vbNewline
if recActiveTopicsCount = "" then
Response.Write " <tr>" & vbNewline & _
" <td colspan=""7"" bgcolor=""" & strForumCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """><b>No Active Topics Found</b></font></td>" & vbNewline & _
" </tr>" & vbNewline
else
currForum = 0
fDisplayCount = 0
canAccess = 0
fFORUM_ID = 0
fF_SUBJECT = 1
fF_SUBSCRIPTION = 2
fF_STATUS = 3
fCAT_ID = 4
fCAT_NAME = 5
fCAT_SUBSCRIPTION = 6
fCAT_STATUS = 7
fT_STATUS = 8
fT_VIEW_COUNT = 9
fTOPIC_ID = 10
fT_SUBJECT = 11
fT_AUTHOR = 12
fT_REPLIES = 13
fT_UREPLIES = 14
fM_NAME = 15
fT_LAST_POST_AUTHOR = 16
fT_LAST_POST = 17
fT_LAST_POST_REPLY_ID = 18
fLAST_POST_AUTHOR_NAME = 19
fF_PRIVATEFORUMS = 20
fF_PASSWORD_NEW = 21
for RowCount = 0 to recActiveTopicsCount
'## Store all the recordvalues in variables first.
Forum_ID = allActiveTopics(fFORUM_ID,RowCount)
Forum_Subject = allActiveTopics(fF_SUBJECT,RowCount)
ForumSubscription = allActiveTopics(fF_SUBSCRIPTION,RowCount)
Forum_Status = allActiveTopics(fF_STATUS,RowCount)
Cat_ID = allActiveTopics(fCAT_ID,RowCount)
Cat_Name = allActiveTopics(fCAT_NAME,RowCount)
CatSubscription = allActiveTopics(fCAT_SUBSCRIPTION,RowCount)
Cat_Status = allActiveTopics(fCAT_STATUS,RowCount)
Topic_Status = allActiveTopics(fT_STATUS,RowCount)
Topic_View_Count = allActiveTopics(fT_VIEW_COUNT,RowCount)
Topic_ID = allActiveTopics(fTOPIC_ID,RowCount)
Topic_Subject = allActiveTopics(fT_SUBJECT,RowCount)
Topic_Author = allActiveTopics(fT_AUTHOR,RowCount)
Topic_Replies = allActiveTopics(fT_REPLIES,RowCount)
Topic_UReplies = allActiveTopics(fT_UREPLIES,RowCount)
Member_Name = allActiveTopics(fM_NAME,RowCount)
Topic_Last_Post_Author = allActiveTopics(fT_LAST_POST_AUTHOR,RowCount)
Topic_Last_Post = allActiveTopics(fT_LAST_POST,RowCount)
Topic_Last_Post_Reply_ID = allActiveTopics(fT_LAST_POST_REPLY_ID,RowCount)
Topic_Last_Post_Author_Name = chkString(allActiveTopics(fLAST_POST_AUTHOR_NAME,RowCount),"display")
Forum_PrivateForums = allActiveTopics(fF_PRIVATEFORUMS,RowCount)
Forum_FPasswordNew = allActiveTopics(fF_PASSWORD_NEW,RowCount)
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
fDisplayCount = fDisplayCount + 1
' -- Display forum name
if currForum <> Forum_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=" & Cat_ID & """><font color=""" & strCategoryFontColor & """><b>" & ChkString(Cat_Name,"display") & "</b></font></a> / <a href=""forum.asp?FORUM_ID=" & Forum_ID & """><font color=""" & strCategoryFontColor & """><b>" & ChkString(Forum_Subject,"display") & "</b></font></a></font></td>" & vbNewline
if (mlev > 0) or (lcase(strNoCookies) = "1") then
Response.Write " <td align=""center"" bgcolor=""" & strCategoryCellColor & """ nowrap valign=""middle"">" & vbNewLine
if (ModerateAllowed = "Y") or (lcase(strNoCookies) = "1") then
ForumAdminOptions
else
if Cat_Status <> 0 and Forum_Status <> 0 then
ForumMemberOptions
else
Response.Write " " & vbNewLine
end if
end if
Response.Write " </td>" & vbNewline
elseif (mLev = 3) then
Response.Write " <td align=""center"" bgcolor=""" & strCategoryCellColor & """ nowrap valign=""middle""> </td>" & vbNewline
end if
Response.Write " </tr>" & vbNewline
end if
Response.Write " <tr>" & vbNewline
Response.Write " <td bgcolor=""" & strForumCellColor & """ align=""center"" valign=""middle"">"
' -- Set up a link to the topic and display the icon appropriate to the status of the post.
Response.Write "<a href=""topic.asp?TOPIC_ID=" & Topic_ID & """>"
' - If status = 0, topic/forum/category is locked. If status > 2, posts are unmoderated/rejected
if Cat_Status <> 0 and Forum_Status <> 0 and Topic_Status <> 0 then
' DEM --> Added code for topic moderation
if Topic_Status = 2 then
UnApprovedFound = "Y"
Response.Write getCurrentIcon(strIconFolderUnmoderated,"Topic Not Moderated","hspace=""0""") & "</a>" & vbNewline
elseif Topic_Status = 3 then
HeldFound = "Y"
Response.Write getCurrentIcon(strIconFolderHold,"Topic on Hold","hspace=""0""") & "</a>" & vbNewline
' DEM --> end of code Added for topic moderation
elseif lcase(strHotTopic) = "1" and Topic_Replies >= intHotTopicNum then
Response.Write getCurrentIcon(strIconFolderNewHot,"Hot Topic with New Posts","hspace=""0""") & "</a>" & vbNewline
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -