<%
'#################################################################################
'## 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
'#################################################################################
%>
<!--#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 %>">
    <a href="default.asp"><img src="icon_folder_open.gif" alt="All Forums" height=15 width=15 border="0">&nbsp;All Forums</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" alt="Admin Login" height=15 width=15 border="0">&nbsp;Admin Login<br>
    </font></td>
  </tr>
</table>

<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><br>
<br>
<%
Name = Request.Form("Name")
Password = Request.Form("Password")

RequestMethod = Request.ServerVariables("Request_method")

IF RequestMethod = "POST" Then

	'## Forum_SQL
	strSql = "SELECT COUNT(*) AS ApprovalCode "
	strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
	strSql = strSql & " WHERE M_NAME = '" & Name & "' AND "
	strSql = strSql & "       M_PASSWORD = '" & Password & "' AND "
	strSql = strSql & "       M_LEVEL = 3"
	
	Set dbRs = my_Conn.Execute(strSql)

	If dbRS.Fields("ApprovalCode") = "1"  and ChkQuoteOk(Name) and ChkQuoteOk(Password) Then 
%>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">Login was successful!</font></p>

<% Session("Approval") = "15916941253" %>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="admin_home.asp" target="_top">Click here to Access.</a></font></p>
<meta http-equiv="Refresh" content="2; URL=admin_home.asp">
<!--#INCLUDE file="inc_footer.asp" -->
<% Response.End %>
<% Else %>
<center>

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">There has been a problem!</font></p>

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">You are not allowed access.</font></p>

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">If you think you have reached this message in error, please try again.</font></p>

</center>
<% End IF %>
<% Else %>
	&nbsp;
<% End IF %>
<form action="admin_login.asp" method="post" id=Form1 name=Form1>
<table border="0" cellspacing="2" cellpadding="0" align="center">
  <tr>
    <td align="center" colspan="2" bgcolor="<% =strHeadCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Admin Login</font></b></td>
  </tr>
  <tr>
	<td align="right" nowrap><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">UserName:</font></b></td>
	<td><input type="text" name="Name"></td>
  </tr>
  <tr>
	<td align="right" nowrap nowrap><b><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Password:</font></b></td>
	<td><input type="Password" name="Password"></td>
  </tr>
  <tr>
    <td colspan="2" align="right"><input type="submit" value="Login" id="Submit1" name="Submit1"></td>
  </tr>
</table>
</form>

</font>
<!--#INCLUDE file="inc_footer.asp" -->