<% @ Language=VBScript %> <% Option Explicit %> <% 'Set the response buffer to true Response.Buffer = True 'Dimension variables Dim blnLocked 'Set to true if the forums are locked 'Read in the details from the form blnLocked = CBool(Request.Form("lock")) 'Initialise the SQL variable with an SQL statement to get the configuration details from the database If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE " & strDbProc & "SelectConfiguration" Else strSQL = "SELECT " & strDbTable & "Configuration.* From " & strDbTable & "Configuration;" End If 'Set the cursor type property of the record set to Dynamic so we can navigate through the record set rsCommon.CursorType = 2 'Set the Lock Type for the records so that the record set is only locked when it is updated rsCommon.LockType = 3 'Query the database rsCommon.Open strSQL, adoCon 'If the user is changing changing the lock status then update the database If Request.Form("postBack") Then With rsCommon 'Update the recordset .Fields("Forums_closed") = blnLocked 'Update the database .Update 'Re-run the query to read in the updated recordset from the database .Requery End With 'Update the application variable Application("blnForumClosed") = blnLocked 'Empty the application level variable so that the changes made are seen in the main forum Application("blnConfigurationSet") = false End If 'Read in the deatils from the database If NOT rsCommon.EOF Then 'Read in the open forum status from the db blnLocked = CBool(rsCommon("Forums_closed")) End If 'Release Server Objects rsCommon.Close Set rsCommon = Nothing adoCon.Close Set adoCon = Nothing %> LOCK FORUM LOCK FORUM

IMPORTANT - PLEASE READ FIRST !!
From here you can Lock Down the Board, this is useful for maintenance.

If you Lock the Forums the entire board will be locked and anyone entering any part of the board will receive the message,
'Sorry, the forums are presently closed for maintenance'

This will mean no-one will be able to register, post messages, send private messages, or even login.

This will also mean that if you logout of this admin area you will NOT be able to login through the main forum

To log back into the admin area to un-lock the forums, point your browser at this admin folder and login into the admin area through the admin area login page.

 
FORUM STATUS
Please read the instructions at the top of the page
for further info on logging back in to un-lock the forums.
LOCKED >    UN-LOCKED >