<%
'#################################################################################
'## Copyright (C) 2000  Michael Anderson
'## 
'## 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.
'## 
'## 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.
'## 
'## Correspondence and Questions can be sent to:
'## reinhold@bigfoot.com
'## 
'## or
'## 
'## Snitz Communications 
'## C/O: Michael Anderson
'## PO Box 200
'## Harpswell, ME 04079
'#################################################################################
%>
<% If Session("Approval") = "15916941253" Then %>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE file="inc_functions.asp" -->
<!--#INCLUDE file="inc_top.asp" -->
<table border="0" width="100%">
  <tr>
    <td width="33%" align="left" nowrap><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
    <img src="icon_folder_open.gif" height=15 width=15 border="0">&nbsp;<a href="default.asp">All Forums</a><br>
    <img src="icon_blank.gif" height=15 width=15 border="0"><img src="icon_folder_open.gif" height=15 width=15 border="0">&nbsp;<a href="admin_home.asp">Admin Section</a><br>
    <img src="icon_blank.gif" height=15 width=15 border="0"><img src="icon_blank.gif" height=15 width=15 border="0"><img src="icon_folder_open_topic.gif" height=15 width=15 border="0">&nbsp;Feature Configuration<br>
    </font></td>
  </tr>
</table>
<%
	if Request.Form("Method_Type") = "Write_Configuration" then 
		Err_Msg = ""
		if Request.Form("strIMGInPosts") = "1" and Request.Form("strAllowForumCode") = "0" then 
			Err_Msg = Err_Msg & "<li>Forum Code Must be Enabled in order to Enable Images</li>"
		end if
		if (Request.Form("strHotTopic") = "1" and strHotTopic = "1") or (Request.Form("strHotTopic") = "1" and strHotTopic = "0") then
			if Request.Form("intHotTopicNum") = "" then 
				Err_Msg = Err_Msg & "<li>You Must Enter a Hot Topic Number</li>"
			end if
			if left(Request.Form("intHotTopicNum"), 1) = "-" then 
				Err_Msg = Err_Msg & "<li>You Must Enter a positive Hot Topic Number</li>"
			end if
			if left(Request.Form("intHotTopicNum"), 1) = "+" then 
				Err_Msg = Err_Msg & "<li>You Must Enter a positive Hot Topic Number without the <b>+</b></li>"
			end if
		end if

		if Err_Msg = "" then

			my_Conn.BeginTrans

			'## Forum_SQL
			strSql = "UPDATE " & strTablePrefix & "CONFIG "
			strSql = strSql & " SET C_STRMOVETOPICMODE         = '" & Request.Form("strMoveTopicMode") & "'"
			strSql = strSql & ",    C_STRIPLOGGING             = '" & Request.Form("strIPLogging") & "'"
			strSql = strSql & ",    C_STRPRIVATEFORUMS         = '" & Request.Form("strPrivateForums") & "'"
			strSql = strSql & ",    C_STRSHOWMODERATORS        = '" & Request.Form("strShowModerators") & "'"
			strSql = strSql & ",    C_STRALLOWFORUMCODE        = '" & Request.Form("strAllowForumCode") & "'"
			strSql = strSql & ",    C_STRIMGINPOSTS            = '" & Request.Form("strIMGInPosts") & "'"
			strSql = strSql & ",    C_STRALLOWHTML             = '" & Request.Form("strAllowHTML") & "'"
			strSql = strSql & ",    C_STRHOTTOPIC              = '" & Request.Form("strHotTopic") & "'"
			if (Request.Form("strHotTopic") = "1" and strHotTopic = "1") or (Request.Form("strHotTopic") = "1" and strHotTopic = "0") then
				strSql = strSql & ",    C_INTHOTTOPICNUM           = " & Request.Form("intHotTopicNum") & ""
			end if
			strSql = strSql & ",    C_STRHOMEPAGE              = '" & Request.Form("strHomepage") & "'"
			strSql = strSql & ",    C_STRICQ                   = '" & Request.Form("strICQ") & "'"
			strSql = strSql & ",    C_STRYAHOO                 = '" & Request.Form("strYAHOO") & "'"
			strSql = strSql & ",    C_STRAIM                   = '" & Request.Form("strAIM") & "'"
			strSql = strSql & ",    C_STRICONS                 = '" & Request.Form("strIcons") & "'"
			strSql = strSql & ",    C_STRSECUREADMIN           = '" & Request.Form("strSecureAdmin") & "'"
			strSql = strSql & ",    C_STRNOCOOKIES             = '" & Request.Form("strNoCookies") & "'"
			strSql = strSql & ",    C_STREDITEDBYDATE          = '" & Request.Form("strEditedByDate") & "'"
			strSql = strSql & " WHERE CONFIG_ID = " & 1

			my_Conn.Execute (strSql)
			my_Conn.CommitTrans

%>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">Configuration Posted!</font></p>
<meta http-equiv="Refresh" content="2; URL=admin_home.asp">

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">Congratulations!</font></p>

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="admin_home.asp">Back To Admin Home</font></a></p>
<%		else %>
	<p align=center><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">There Was A Problem With Your Details</font></p>

	<table align=center border=0>
	  <tr>
	    <td><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
		<ul>
		<% =Err_Msg %>
		</ul>
	    </font></td>
	  </tr>
	</table>

	<p align=center><font face="<% =strDefaultFontFace %>" size=<% =strDefaultFontSize %>><a href="JavaScript:history.go(-1)">Go Back To Enter Data</a></font></p>
<%		end if %>
<%	else %>
<form action="admin_config_features.asp" method="post" id="Form1" name="Form1">
<input type="hidden" name="Method_Type" value="Write_Configuration">
<table border="0" cellspacing="0" cellpadding="0" align=center>
  <tr>
    <td bgcolor="<% =strPopUpBorderColor %>">
<table border="0" cellspacing="1" cellpadding="1">
  <tr valign="top">
    <td bgcolor="<% =strHeadCellColor %>" colspan="2"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>"><b>Feature Configuration</b></font></td>
  </tr>
  <tr valign="top">
    <td bgColor="<% =strPopUpTableColor %>" align="right"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Restrict Moderators to&nbsp;&nbsp;<br> moving their own topics:</b>&nbsp;</font></td>
    <td bgColor="<% =strPopUpTableColor %>">
    On: <input type="radio" name="strMoveTopicMode" value="1"<% if strMoveTopicMode <> "0" then Response.Write(" checked") %>> 
    Off: <input type="radio" name="strMoveTopicMode" value="0"<% if strMoveTopicMode = "0" then Response.Write(" checked") %>>
    <a href="JavaScript:openWindow3('pop_config_help.asp#MoveTopicMode')"><img src="icon_smile_question.gif" border="0"></a>
    </td>
  </tr>
  <tr valign="top">
    <td bgColor="<% =strPopUpTableColor %>" align="right"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>IP Logging:</b>&nbsp;</font></td>
    <td bgColor="<% =strPopUpTableColor %>">
    On: <input type="radio" name="strIPLogging" value="1"<% if strIPLogging <> "0" then Response.Write(" checked") %>> 
    Off: <input type="radio" name="strIPLogging" value="0"<% if strIPLogging = "0" then Response.Write(" checked") %>>
    <a href="JavaScript:openWindow3('pop_config_help.asp#IPLogging')"><img src="icon_smile_question.gif" border="0"></a>
    </td>
  </tr>
  <tr valign="top">
    <td bgColor="<% =strPopUpTableColor %>" align="right"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Private Forums:</b>&nbsp;</font></td>
    <td bgColor="<% =strPopUpTableColor %>">
    On: <input type="radio" name="strPrivateForums" value="1"<% if strPrivateForums <> "0" then Response.Write(" checked") %>> 
    Off: <input type="radio" name="strPrivateForums" value="0"<% if strPrivateForums = "0" then Response.Write(" checked") %>>
    <a href="JavaScript:openWindow3('pop_config_help.asp#privateforums')"><img src="icon_smile_question.gif" border="0"></a>
    </td>
  </tr>
  <tr valign="top">
    <td bgColor="<% =strPopUpTableColor %>" align="right"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Show Moderators:</b>&nbsp;</font></td>
    <td bgColor="<% =strPopUpTableColor %>">
    On: <input type="radio" name="strShowModerators" value="1"<% if strShowModerators <> "0" then Response.Write(" checked") %>> 
    Off: <input type="radio" name="strShowModerators" value="0"<% if strShowModerators = "0" then Response.Write(" checked") %>>
    <a href="JavaScript:openWindow3('pop_config_help.asp#ShowModerator')"><img src="icon_smile_question.gif" border="0"></a>
    </td>
  </tr>
  <tr valign="top">
    <td bgColor="<% =strPopUpTableColor %>" align="right"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Allow Forum Code:</b>&nbsp;</font></td>
    <td bgColor="<% =strPopUpTableColor %>">
    On: <input type="radio" name="strAllowForumCode" value="1"<% if strAllowForumCode <> "0" then Response.Write(" checked") %>> 
    Off: <input type="radio" name="strAllowForumCode" value="0"<% if strAllowForumCode = "0" then Response.Write(" checked") %>>
    <a href="JavaScript:openWindow3('pop_config_help.asp#AllowForumCode')"><img src="icon_smile_question.gif" border="0"></a>
    </td>
  </tr>
  <tr valign="top">
    <td bgColor="<% =strPopUpTableColor %>" align="right"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Images in Posts:</b>&nbsp;</font></td>
    <td bgColor="<% =strPopUpTableColor %>">
    On: <input type="radio" name="strIMGInPosts" value="1" <% if (lcase(strIMGInPosts) <> "0") then Response.Write("checked")%>> 
    Off: <input type="radio" name="strIMGInPosts" value="0" <% if (lcase(strIMGInPosts) = "0") then Response.Write("checked")%>>
    <a href="JavaScript:openWindow3('pop_config_help.asp#imginposts')"><img src="icon_smile_question.gif" border="0"></a>
   </td>
  </tr>
  <tr valign="top">
    <td bgColor="<% =strPopUpTableColor %>" align="right"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Allow HTML:</b>&nbsp;</font></td>
    <td bgColor="<% =strPopUpTableColor %>">
    On: <input type="radio" name="strAllowHTML" value="1"<% if strAllowHTML <> "0" then Response.Write(" checked") %>> 
    Off: <input type="radio" name="strAllowHTML" value="0"<% if strAllowHTML = "0" then Response.Write(" checked") %>>
    <a href="JavaScript:openWindow3('pop_config_help.asp#AllowHTML')"><img src="icon_smile_question.gif" border="0"></a>
    </td>
  </tr>
  <tr valign="top">
    <td bgColor="<% =strPopUpTableColor %>" align="right"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Secure Admin Mode:</b>&nbsp;</font></td>
    <td bgColor="<% =strPopUpTableColor %>">
    On: <input type="radio" name="strSecureAdmin" value="1" <% if lcase(strSecureAdmin) <> "0" then Response.Write("checked") %>> 
    Off: <input type="radio" name="strSecureAdmin" value="0" <% if lcase(strSecureAdmin) = "0" then Response.Write("checked") %>>
    <a href="JavaScript:openWindow3('pop_config_help.asp#secureadminmode')"><img src="icon_smile_question.gif" border="0"></a>
    </td>
  </tr>
  <tr valign="top">
    <td bgColor="<% =strPopUpTableColor %>" align="right"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Non-Cookie Mode:</b>&nbsp;</font></td>
    <td bgColor="<% =strPopUpTableColor %>">
    On: <input type="radio" name="strNoCookies" value="1" <% if lcase(strNoCookies) <> "0" then Response.Write("checked") %>> 
    Off: <input type="radio" name="strNoCookies" value="0" <% if lcase(strNoCookies) = "0" then Response.Write("checked") %>>
    <a href="JavaScript:openWindow3('pop_config_help.asp#allownoncookies')"><img src="icon_smile_question.gif" border="0"></a>
    </td>
  </tr>
  <tr valign="top">
    <td bgColor="<% =strPopUpTableColor %>" align="right"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Edited By on Date:</b>&nbsp;</font></td>
    <td bgColor="<% =strPopUpTableColor %>">
    On: <input type="radio" name="strEditedByDate" value="1" <% if lcase(strEditedByDate) <> "0" then Response.Write("checked") %>> 
    Off: <input type="radio" name="strEditedByDate" value="0" <% if lcase(strEditedByDate) = "0" then Response.Write("checked") %>>
    <a href="JavaScript:openWindow3('pop_config_help.asp#editedbydate')"><img src="icon_smile_question.gif" border="0"></a>
    </td>
  </tr>
  <tr valign="top">
    <td bgColor="<% =strPopUpTableColor %>" align="right"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Hot Topics:</b>&nbsp;</font></td>
    <td bgColor="<% =strPopUpTableColor %>">
    On: <input type="radio" name="strHotTopic" value="1" <% if (strHotTopic <> "0" or lcase(HotTopic) <> "0") then Response.Write("checked") %>> 
    Off: <input type="radio" name="strHotTopic" value="0" <% if (strHotTopic = "0" or lcase(HotTopic) = "0") then Response.Write("checked") %>>
    <input type="text" name="intHotTopicNum" size="5" value="<% if intHotTopicNum <> "" then Response.Write(intHotTopicNum) else Response.Write("20") %>">
    <a href="JavaScript:openWindow3('pop_config_help.asp#hottopics')"><img src="icon_smile_question.gif" border="0"></a>
    </td>
  </tr>
  <tr valign="top">
    <td bgColor="<% =strPopUpTableColor %>" align="right"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Homepages:</b>&nbsp;</font></td>
    <td bgColor="<% =strPopUpTableColor %>">
    On: <input type="radio" name="strHomepage" value="1" <% if strHomepage <> "0" then Response.Write("checked") %>> 
    Off: <input type="radio" name="strHomepage" value="0" <% if strHomepage = "0" then Response.Write("checked") %>>
    <a href="JavaScript:openWindow3('pop_config_help.asp#homepages')"><img src="icon_smile_question.gif" border="0"></a>
    </td>
  </tr>
  <tr valign="top">
    <td bgColor="<% =strPopUpTableColor %>" align="right"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>ICQ:</b>&nbsp;</font></td>
    <td bgColor="<% =strPopUpTableColor %>">
    On: <input type="radio" name="strICQ" value="1" <% if strICQ <> "0" then Response.Write("checked") %>> 
    Off: <input type="radio" name="strICQ" value="0" <% if strICQ = "0" then Response.Write("checked") %>>
    <a href="JavaScript:openWindow3('pop_config_help.asp#icq')"><img src="icon_smile_question.gif" border="0"></a>
    </td>
  </tr>
  <tr valign="top">
    <td bgColor="<% =strPopUpTableColor %>" align="right"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>YAHOO:</b>&nbsp;</font></td>
    <td bgColor="<% =strPopUpTableColor %>">
    On: <input type="radio" name="strYAHOO" value="1" <% if strYAHOO <> "0" then Response.Write("checked") %>> 
    Off: <input type="radio" name="strYAHOO" value="0" <% if strYAHOO = "0" then Response.Write("checked") %>>
    <a href="JavaScript:openWindow3('pop_config_help.asp#yahoo')"><img src="icon_smile_question.gif" border="0"></a>
    </td>
  </tr>
  <tr valign="top">
    <td bgColor="<% =strPopUpTableColor %>" align="right"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>AIM:</b>&nbsp;</font></td>
    <td bgColor="<% =strPopUpTableColor %>">
    On: <input type="radio" name="strAIM" value="1" <% if strAIM <> "0" then Response.Write("checked") %>> 
    Off: <input type="radio" name="strAIM" value="0" <% if strAIM = "0" then Response.Write("checked") %>>
    <a href="JavaScript:openWindow3('pop_config_help.asp#aim')"><img src="icon_smile_question.gif" border="0"></a>
    </td>
  </tr>
  <tr valign="top">
    <td bgColor="<% =strPopUpTableColor %>" align="right"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Icons:</b>&nbsp;</font></td>
    <td bgColor="<% =strPopUpTableColor %>">
    On: <input type="radio" name="strIcons" value="1" <% if (lcase(strIcons) <> "0" or lcase(Smiles) <> "0") then Response.Write("checked") %>> 
    Off: <input type="radio" name="strIcons" value="0" <% if (lcase(strIcons) = "0" or lcase(Smiles) = "0") then Response.Write("checked") %>>
    <a href="JavaScript:openWindow3('pop_config_help.asp#icons')"><img src="icon_smile_question.gif" border="0"></a>
    </td>
  </tr>
  <tr valign="top">
    <td bgColor="<% =strPopUpTableColor %>" colspan="2" align="center"><input type="submit" value="Submit New Config" id="submit1" name="submit1"> <input type="reset" value="Reset Old Values" id="reset1" name="reset1"></td>
  </tr>
</table>
    </td>
  </tr>
</table>
</form>
</font>
<%	end if %>
<!--#INCLUDE file="inc_footer.asp" -->
<% Else %>
<% Response.Redirect "admin_login.asp" %>
<% End IF %>