%@ 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 %>