<%@ CodePage=65001 Language="VBScript"%> <% Option Explicit %> <% GetConfigVariables SetupDatabase dim SQL, vUserInfo, rsForumList, bAllowDisplay, sNewCategory, sOldCategory, bIsAdminOrModerator dim iforumid, bAllowUpdate, vForumInfo if (sLogonType <> "ok") then response.redirect sValidatedBaseURL & "/logon.asp?error=needregistration" end if vUserInfo = GetUserInfo(sUsername) set rsForumList = server.CreateObject("ADODB.Recordset") if request.form("action") = "update" then dbConnection.execute "delete from [massnotifications] where [memberid]=" & vUserInfo(UI_memberid) rsMaster.Open "[massnotifications]", dbConnection, adOpenStatic, adLockOptimistic, adCmdTable for each iforumid in request.form("forumid") iforumid = ValidateNumeric(iforumid) bAllowUpdate = True bIsAdminOrModerator = isAdmin(sUsername, sPassword) or isModerator(sUsername, sPassword, iforumid) vForumInfo = GetForumInfo(iforumid) if (vForumInfo (FI_Invisible) = 1) and not bIsAdminOrModerator then bAllowUpdate= False if (vForumInfo (FI_Restricted) = 1) and not (bIsAdminOrModerator or _ InRestrictedList(sUsername, sPassword, iforumid)) then bAllowUpdate = False if bAllowUpdate = True then rsMaster.AddNew rsMaster("memberid") = vUserInfo(UI_memberid) rsMaster("forumid") = iforumid rsMaster.Update end if next rsMaster.Close response.redirect sValidatedBaseURL & "/controlpanel.asp" end if ' Retrieve list of subscribed threads SQL = "select [forumid] from [massnotifications] where [memberid]=" & vUserInfo(UI_memberid) rsMaster.open SQL, dbConnection, adOpenForwardOnly, adLockReadOnly SQL = "select [Categories].*, [Forums].[forumid], [Forums].[restricted], [Forums].[ForumName], [Forums].[Invisible] from [Categories], [Forums] " & _ "where [Categories].[CategoryID] = [Forums].[CategoryID] order by [Categories].[CategoryID], [name]" rsForumList.open SQL, dbConnection, adOpenForwardOnly, adLockReadOnly %> <%=validateField(sBBSName)%> : Mass subscribe to forums <% if bDisplayBBSQuotes = 1 then%>
<%=sBBSRandomQuoteText%> <%=GetRandomQuote%>

<% else %>
<% end if %>
Receive e-mail notifications for all new messages in a forum:
<% do until rsForumList.EOF bAllowDisplay = True sNewCategory = rsForumList("CategoryID") if sNewCategory <> sOldCategory then response.write "" & rsForumList("name") & "
" sOldCategory = sNewCategory end if bIsAdminOrModerator = isAdmin(sUsername, sPassword) or isModerator(sUsername, sPassword, rsForumList("forumid")) if (rsForumList("Invisible") = 1) and not (bIsAdminOrModerator or InRestrictedList(sUsername, sPassword, rsForumList("forumid"))) then bAllowDisplay = False if (rsForumList("restricted") = 1) and not (bIsAdminOrModerator or InRestrictedList(sUsername, sPassword, rsForumList("forumid"))) then bAllowDisplay = False if bAllowDisplay = True then rsMaster.Filter = "[forumid]=" & ValidateNumeric(rsForumList("forumid")) if rsMaster.EOF then response.write "" else response.write "" end if response.write validateField(rsForumList("ForumName")) & "
" & CRLF end if rsForumList.movenext loop rsForumList.Close rsMaster.Close %>