<%
'#################################################################################
'## Copyright (C) 2000-01 Michael Anderson and Pierre Gorissen
'## 
'## 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 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 support forums at:
'## http://forum.snitz.com 
'##
'## Correspondence and Marketing Questions can be sent to:
'## reinhold@bigfoot.com
'## 
'## or
'## 
'## Snitz Communications 
'## C/O: Michael Anderson
'## PO Box 200
'## Harpswell, ME 04079
'#################################################################################
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE file="inc_functions.asp" -->
<%
	Dim status, info1, info2, fStatus
	mlev = request("mlev")
	status = Application("down")
	fStatus = request.form("status")
	DMessage = request.Form("DownMessage")
	
	if DMessage = "" then
		DMessage = Application("DownMessage")
	end if

	if status = "" then
		status = false
	end if

	if (not isEmpty(fStatus)) and (Session(strCookieURL & "Approval") = "15916941253") then 
		if status then
			Application.lock
			Application("down") = false
			Application("DownMessage") = DMessage
			Application.unlock
			status = false
		else
			Application.lock
			Application("down") = true
			Application("DownMessage") = DMessage
			Application.unlock
			status = true
		end if
	end if

	if status then
		info1 = "down"
		info2 = "Start"
	else
		info1 = "running"
		info2 = "Stop"
	end if
	if request.form("location") <> "" then response.redirect(request.form("location"))
	If Session(strCookieURL & "Approval") = "15916941253" Then

%>
<table border="0" width="100%">
  <tr>
    <td width="33%" align="left" nowrap><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
    <img src="<%=strImageURL %>icon_folder_open.gif" height=15 width=15 border="0">&nbsp;<a href="default.asp">All Forums</a><br>
    <img src="<%=strImageURL %>icon_bar.gif" height=15 width=15 border="0"><img src="<%=strImageURL %>icon_folder_open.gif" height=15 width=15 border="0">&nbsp;<a href="admin_home.asp">Admin Section</a><br>
    <img src="<%=strImageURL %>icon_blank.gif" height=15 width=15 border="0"><img src="<%=strImageURL %>icon_bar.gif" height=15 width=15 border="0"><img src="<%=strImageURL %>icon_folder_open_topic.gif" height=15 width=15 border="0">&nbsp;Forum Maintenance<br>
    </font></td>
  </tr>
</table>
<br>
<form action="down.asp" method="post">
  <table width="600" border="0" cellspacing="0" cellpadding="10" align="center">
    <tr align="center"> 
      <td> 
        <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Welcome 
          Administrator. The current status of the boards is <font color="#FF0000"><%= info1 %></font>.</b></font></p>
        <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">would you 
          like to : </font></p>
 
          <input type="submit" value="<%= info2 %> the board" name="Submit">
          <input type="hidden" value="<%= request("target") %>" name="location">

		  <input type="hidden" name="status" value="<%= status %>">

    </td>
  </tr>
  <tr><td align="center">
  <p><font color="Blue" face="Verdana, Arial, Helvetica, sans-serif" size="2">The message below will appear when the board is closed..</font></p>

  <textarea cols="80" rows="12" name="DownMessage" wrap="soft">
<%= Application("DownMessage") %>
</textarea>
</table>
</form><br>

<% Else  
	if mlev = 4 then 
		Response.Redirect "admin_login.asp?target=down.asp?mlev=" & mLev
	elseif not Application("down") then 
	response.redirect("default.asp")
	end if%>

<p>&nbsp;</p>
<p>&nbsp;</p>
<%
Response.Redirect "http://dssworldwide.ca/downpage.asp"	
end if %>
