Print Page | Close Window

Administering while forum is closed

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums Modifications
Forum Description: Mod's and Add-on's for Web Wiz Forums.
URL: https://forums.webwiz.net/forum_posts.asp?TID=24198
Printed Date: 30 March 2026 at 4:12am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Administering while forum is closed
Posted By: jckruger
Subject: Administering while forum is closed
Date Posted: 17 August 2007 at 2:15am
Removed by me as it is incorrect.



Replies:
Posted By: jckruger
Date Posted: 17 August 2007 at 7:02am

This seems to have worked: The redirect shown below has been removed from common.asp and moved to default.asp. I don't know if will make any other pages fail yet as it is just being tested.
UPDATED: Changes in RED


<% @ Language=VBScript %>
<% Option Explicit %>

<!--#include file="common.asp" -->
<%
' ############ New addition for Admins when the forum is closed ##########
If Request.QueryString("adminmode") = 1 then
  blnForumClosed = False
 End If
' ############ New addition for Admins when the forum is closed ##########

' ##################### Moved from common.asp ##############
'******************************************
'***       Redirect if forum is closed   ****
'******************************************

'If the forums are closed redirect to the forums closed page
If blnForumClosed AND blnDisplayForumClosed = False AND blnAdmin = False Then
   
    'Reset server objects
    Call closeDatabase()
   
    'Redirect to the forum closed page
    Response.Redirect("forum_closed.asp" & strQsSID1)
End If
' ##################### Moved from common.asp ##############
%>


<!--#include file="functions/functions_date_time_format.asp" -->


and in includes/status_bar_header_inc.asp


'Don't display normal status bar if forum is locked as it will course a loop with the AJAX
If blnForumClosed Then
   
%>
<table cellspacing="1" cellpadding="3" align="center" class="tableBorder">
 <tr class="tableStatusBar">
  <td>
   <div style="float:left;"><% = strBreadCrumbTrail %></div>
   <div style="float:right;"><%
 
'If the user is admin display a link to the admin menu
If intGroupID = 1 Then Response.Write("&nbsp;&nbsp;<img src=""" & strImagePath & "error.png"" style=""vertical-align: text-bottom"" />### FORUM IS CLOSED TO INTERNET USERS ###<img src=""" & strImagePath & "error.png""</a>&nbsp;&nbsp;&nbsp;&nbsp;")
If intGroupID = 1 Then Response.Write("&nbsp;&nbsp;<img src=""" & strImagePath & "admin_control_panel.png"" title=""" & strTxtAdminControlPanel & """ alt=""" & strTxtAdminControlPanel & """ style=""vertical-align: text-bottom"" />&nbsp;<a href=""admin.asp" & strQsSID1 & """>" & strTxtAdmin & "</a>")
If intGroupID = 1 Then Response.Write ("&nbsp;&nbsp;<img src=""" & strImagePath & "logout.png"" alt=""" & strTxtLogOff & """ title=""" & strTxtLogOff & """ style=""vertical-align: text-bottom"" /> <a href=""log_off_user.asp" & strQsSID1 & """>" & strTxtLogOff & " [" & strLoggedInUsername & "]</a>")
If intGroupID <> 1 AND intGroupID <> 2 Then Response.Write ("&nbsp;&nbsp;<img src=""" & strImagePath & "logout.png"" alt=""" & strTxtLogOff & """ title=""" & strTxtLogOff & """ style=""vertical-align: text-bottom"" /> <a href=""log_off_user.asp" & strQsSID1 & """>" & strTxtLogOff & " [" & strLoggedInUsername & "]</a>")


%></div>
  </td>
 </tr>
</table><%

'Else display the normal status bar


So if the forum is closed typing http://www.whatever.com/forum/default.asp?adminmode=1 lets you in.

Normal users when they go to default.asp see the forum is closed message and don't get a chance to log on at all.

If someone could check that this is still secure please post feedback.

If you wish to use this then you do at your own risk.

EDIT 18/08/07: Removed a not required variable


Posted By: Scotty32
Date Posted: 17 August 2007 at 2:10pm
looks very insecure

wouldnt it be better to have

if blnClosed = True and blnAdmin <> true then
   send to closed page
end if

you can login by going to www.yoursite.com/forum/admin.asp

looking at your code it appears you give anyone admin rights who enters that code - making it very insecure

*edit* by the way, look at the existing "forum closed" section in the common.asp file


-------------
S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: jckruger
Date Posted: 17 August 2007 at 11:47pm
I think you are referring to the first post. I'll remove that. It doesn't give admin access to anything. You still need to log on as usual. It just changes the blnforumclosed variable and only allows admins to view posts. Even if a general member found out what the querystring was when they log in they still get the forum is closed message. Test it out if you like.

Sorry I put a variable in there that I didn't really need so I'll edit it also.

Obviously you could make the query what ever you wanted and also the value what ever you wanted and not tell anyone what it is



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net