📄 active.asp
字号:
<%
'#################################################################################
'## Snitz Forums 2000 v3.4.05
'#################################################################################
'## Copyright (C) 2000-05 Michael Anderson, Pierre Gorissen,
'## Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'## GNU General Public License for more details.
'##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
'##
'## Support can be obtained from our support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## manderson@snitz.com
'##
'#################################################################################
%>
<!--#INCLUDE FILE="config.asp"-->
<%
'## Do Cookie stuffs with reload
nRefreshTime = Request.Cookies(strCookieURL & "Reload")
if Request.form("cookie") = "1" then
if strSetCookieToForum = 1 then
Response.Cookies(strCookieURL & "Reload").Path = strCookieURL
end if
Response.Cookies(strCookieURL & "Reload") = Request.Form("RefreshTime")
Response.Cookies(strCookieURL & "Reload").expires = strForumTimeAdjust + 365
nRefreshTime = Request.Form("RefreshTime")
end if
if nRefreshTime = "" then
nRefreshTime = 0
end if
ActiveSince = Request.Cookies(strCookieURL & "ActiveSince")
'## Do Cookie stuffs with show last date
if Request.form("cookie") = "2" then
ActiveSince = Request.Form("ShowSinceDateTime")
if strSetCookieToForum = 1 then
Response.Cookies(strCookieURL & "ActiveSince").Path = strCookieURL
end if
Response.Cookies(strCookieURL & "ActiveSince") = ActiveSince
end if
Dim ModerateAllowed
Dim HasHigherSub
Dim HeldFound, UnApprovedFound, UnModeratedPosts, UnModeratedFPosts
Dim canView
HasHigherSub = false
%>
<!--#INCLUDE FILE="inc_sha256.asp" -->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_secure.asp" -->
<!--#INCLUDE FILE="inc_moderation.asp" -->
<!--#INCLUDE FILE="inc_subscription.asp" -->
<%
Select Case ActiveSince
Case "LastVisit"
lastDate = ""
Case "LastFifteen"
lastDate = DateToStr(DateAdd("n",-15,strForumTimeAdjust))
Case "LastThirty"
lastDate = DateToStr(DateAdd("n",-30,strForumTimeAdjust))
Case "LastFortyFive"
lastDate = DateToStr(DateAdd("n",-45,strForumTimeAdjust))
Case "LastHour"
lastDate = DateToStr(DateAdd("h",-1,strForumTimeAdjust))
Case "Last2Hours"
lastDate = DateToStr(DateAdd("h",-2,strForumTimeAdjust))
Case "Last6Hours"
lastDate = DateToStr(DateAdd("h",-6,strForumTimeAdjust))
Case "Last12Hours"
lastDate = DateToStr(DateAdd("h",-12,strForumTimeAdjust))
Case "LastDay"
lastDate = DateToStr(DateAdd("d",-1,strForumTimeAdjust))
Case "Last2Days"
lastDate = DateToStr(DateAdd("d",-2,strForumTimeAdjust))
Case "LastWeek"
lastDate = DateToStr(DateAdd("ww",-1,strForumTimeAdjust))
Case "Last2Weeks"
lastDate = DateToStr(DateAdd("ww",-2,strForumTimeAdjust))
Case "LastMonth"
lastDate = DateToStr(DateAdd("m",-1,strForumTimeAdjust))
Case "Last2Months"
lastDate = DateToStr(DateAdd("m",-2,strForumTimeAdjust))
Case Else
lastDate = ""
End Select
Response.Write " <script language=""JavaScript"" type=""text/javascript"">" & vbNewLine & _
" <!--" & vbNewLine & _
" function autoReload() { document.ReloadFrm.submit() }" & vbNewLine & _
" function SetLastDate() { document.LastDateFrm.submit() }" & vbNewLine & _
" function jumpTo(s) { if (s.selectedIndex != 0) location.href = s.options[s.selectedIndex].value;return 1;}" & vbNewLine & _
" //defaultStatus = ""You last loaded this page on " & chkDate(DateToStr(strForumTimeAdjust)," ",true) & " (Forum Time)""" & vbNewLine & _
" // -->" & vbNewLine & _
" </script>" & vbNewLine
if IsEmpty(Session(strCookieURL & "last_here_date")) then
Session(strCookieURL & "last_here_date") = ReadLastHereDate(strDBNTUserName)
end if
if lastDate = "" then
lastDate = Session(strCookieURL & "last_here_date")
end if
if Request.Form("AllRead") = "Y" then
'## The redundant line below is necessary, don't delete it.
Session(strCookieURL & "last_here_date") = Request.Form("BuildTime")
Session(strCookieURL & "last_here_date") = Request.Form("BuildTime")
lastDate = Session(strCookieURL & "last_here_date")
UpdateLastHereDate Request.Form("BuildTime"),strDBNTUserName
ActiveSince = ""
end if
if strModeration = "1" and mLev > 2 then
UnModeratedPosts = CheckForUnmoderatedPosts("BOARD", 0, 0, 0)
end if
' -- Get all the high level(board, category, forum) subscriptions being held by the user
Dim strSubString, strSubArray, strBoardSubs, strCatSubs, strForumSubs, strTopicSubs
If MySubCount > 0 then
strSubString = PullSubscriptions(0,0,0)
strSubArray = Split(strSubString,";")
if uBound(strSubArray) < 0 then
strBoardSubs = ""
strCatSubs = ""
strForumSubs = ""
strTopicSubs = ""
else
strBoardSubs = strSubArray(0)
strCatSubs = strSubArray(1)
strForumSubs = strSubArray(2)
strTopicSubs = strSubArray(3)
end if
End If
if mlev = 3 then
strSql = "SELECT FORUM_ID FROM " & strTablePrefix & "MODERATOR " & _
" WHERE MEMBER_ID = " & MemberID
Set rsMod = Server.CreateObject("ADODB.Recordset")
rsMod.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
if rsMod.EOF then
recModCount = ""
else
allModData = rsMod.GetRows(adGetRowsRest)
recModCount = UBound(allModData,2)
end if
RsMod.close
set RsMod = nothing
if recModCount <> "" then
for x = 0 to recModCount
if x = 0 then
ModOfForums = allModData(0,x)
else
ModOfForums = ModOfForums & "," & allModData(0,x)
end if
next
else
ModOfForums = ""
end if
else
ModOfForums = ""
end if
if strPrivateForums = "1" and mLev < 4 then
allAllowedForums = ""
allowSql = "SELECT FORUM_ID, F_SUBJECT, F_PRIVATEFORUMS, F_PASSWORD_NEW"
allowSql = allowSql & " FROM " & strTablePrefix & "FORUM"
allowSql = allowSql & " WHERE F_TYPE = 0"
allowSql = allowSql & " ORDER BY FORUM_ID"
set rsAllowed = Server.CreateObject("ADODB.Recordset")
rsAllowed.open allowSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
if rsAllowed.EOF then
recAllowedCount = ""
else
allAllowedData = rsAllowed.GetRows(adGetRowsRest)
recAllowedCount = UBound(allAllowedData,2)
end if
rsAllowed.close
set rsAllowed = nothing
if recAllowedCount <> "" then
fFORUM_ID = 0
fF_SUBJECT = 1
fF_PRIVATEFORUMS = 2
fF_PASSWORD_NEW = 3
for RowCount = 0 to recAllowedCount
Forum_ID = allAllowedData(fFORUM_ID,RowCount)
Forum_Subject = allAllowedData(fF_SUBJECT,RowCount)
Forum_PrivateForums = allAllowedData(fF_PRIVATEFORUMS,RowCount)
Forum_FPasswordNew = allAllowedData(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 chkForumAccessNew(Forum_PrivateForums,Forum_FPasswordNew,Forum_Subject,Forum_ID,MemberID) = true then
if allAllowedForums = "" then
allAllowedForums = Forum_ID
else
allAllowedForums = allAllowedForums & "," & Forum_ID
end if
end if
next
end if
if allAllowedForums = "" then allAllowedForums = 0
end if
'## Forum_SQL - Get all active topics from last visit
strSql = "SELECT F.FORUM_ID, " & _
"F.F_SUBJECT, " & _
"F.F_SUBSCRIPTION, " & _
"F.F_STATUS, " & _
"C.CAT_ID, " & _
"C.CAT_NAME, " & _
"C.CAT_SUBSCRIPTION, " & _
"C.CAT_STATUS, " & _
"T.T_STATUS, " & _
"T.T_VIEW_COUNT, " & _
"T.TOPIC_ID, " & _
"T.T_SUBJECT, " & _
"T.T_AUTHOR, " & _
"T.T_REPLIES, " & _
"T.T_UREPLIES, " & _
"M.M_NAME, " & _
"T.T_LAST_POST_AUTHOR, " & _
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -