Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 MOD: IPGate for v3.4
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 26

vasanthm
Starting Member

35 Posts

Posted - 30 August 2002 :  15:13:55  Show Profile
well mod works great for me after some modification

referer=Request.ServerVariables("HTTP_REFERER")

replaced with

referer=(Request.ServerVariables("Path_Info"))

to get the correct page info...in the IP log
Go to Top of Page

vasanthm
Starting Member

35 Posts

Posted - 31 August 2002 :  01:03:42  Show Profile
ok will put it here when i get back home... Well there was a porblem with the inc_mod_ipgate file also.. it has some DB entries which did not work properly.. i edited that to make the mod work.. it is just great....

Any way see u today evening.. i will be putting the files here..
Go to Top of Page

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 31 August 2002 :  03:43:16  Show Profile
I seem to have issues with getting this running. Has someone managed to work it out (I could but I thought it better if the mod maker did it).

I keep getting the DB still being open, and have fixed the open and close of the ASP code in it, but need to work out the rest, but if someone has done it, then can you put a link to a d/l file, please?

Cheers,

David Greening
Go to Top of Page

vasanthm
Starting Member

35 Posts

Posted - 31 August 2002 :  07:28:02  Show Profile
Ok i have posted both the asp files below .. And i dont use the new database.. i use the existing database...

This is the admin_mod_ipgate.asp

<%
'#################################################################################
'## NET IPGATE v0.52 BETA by alex042@aol.com (c)Aug 2002
'## 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 
'## must remain intact in the scripts.
'#################################################################################

'MODIPGATEBAN: 0=off, 1=on, 2=lockdown
'MODIPGATEEXP: log expiration days
'MODIPGATELOG: 0=off, 1=db only, 2=on (all)
'pagekey: page password
'status: 0=banned, 1=watched, 2=access

'----------- Uncomment below for Snitz 3.4 -----------
%><!--#INCLUDE FILE="config.asp"--><%
%><!--#INCLUDE FILE="inc_func_admin.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<%Response.Write	"      <table border=""0"" width=""100%"">" & vbNewLine & _
		"        <tr>" & vbNewLine & _
		"          <td width=""33%"" align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
		"          " & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
		"          " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""admin_home.asp"">Admin Section</a><br />" & vbNewLine & _
		"          " & getCurrentIcon(strIconBlank,"","") & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpenTopic,"","") & " IP Pannel<br /></font></td>" & vbNewLine & _
		"        </tr>" & vbNewLine & _
		"      </table>" & vbNewLine

%>
<%


'< % If Session(strCookieURL & "Approval") = "15916941253" Then % >

'add at bottom
'<!--#INCLUDE file="inc_footer.asp" -->

'---- Uncomment below for standalone application -----
'strTablePrefix="FORUM_"
'strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("ipdb.mdb") '## MS Access 2000 using virtual path
'strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("\izer\db\fdiugfgb4tytrg_ghdf4y.mdb") '## MS Access 97 using virtual path

'MODIPGATELOG=0
'MODIPGATEEXP=30
'MODIPGATEBAN=1
'MODIPGATEMSG="You are not allowed access to the page requested."
MODIPGATELCK="Website closed for maintenance. Try back later."

'StrHeadCellColor = "336699"
'strCategoryCellColor = "0099cc"
'strCategoryFontColor = "white"
'StrForumCellColor= "lightsteelblue"
'strDefaultFontFace = "verdana"
'strDefaultFontSize = "2"
'strDefaultFontColor = "336699"
'StrForumCellColor = "whitesmoke"
'StrAltForumCellColor = "gainsboro"


'------------ DO NOT EDIT BELOW THIS LINE ------------
'userq=request.form("userq")
userd=request.querystring("userd")
userip=request.servervariables("REMOTE_ADDR")
userhost=request.servervariables("REMOTE_HOST")
referer=Request.ServerVariables("HTTP_REFERER")
iptype=request.form("iptype")
startip=request.form("startip")
endip=request.form("endip")
startdate=request.form("startdate")
enddate=request.form("enddate")
usercomment=request.form("usercomment")
userstatus=request.form("userstatus")
dbpagekey=request.form("dbpagekey")
banmessage=request.form("banmessage")
ipban=request.form("ipban")
iplog=request.form("iplog")
logexpires=request.form("logexpires")
action=request.querystring("action")


if action="" then action="menu" end if

set my_Conn= Server.CreateObject("ADODB.Recordset")


Select Case action


Case "menu"
		'strSql = "SELECT C_VALUE FROM " & strTablePrefix & "CONFIG_NEW "
		'strSql = strSql & " WHERE C_VARIABLE like 'MODIPGATE'"

		'my_Conn.open strSql, strConnString 


%>
	<form action="admin_mod_ipgate.asp?action=config" method="post" name="configban">
	<input type="hidden" name="action" value="config">
	<table border="0" cellSpacing="1" cellPadding="4" width="100%">
	  <tr>
	  	<td bgcolor="<% =strCategoryCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>">
        <p align="left"><b>NET IPGate v0.52 BETA Admin Menu</b></td>
	  	<td bgcolor="<% =strCategoryCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>">
        <p align="right"><a href="readme.txt">Help</a></td>
	  </tr>
	  <tr>
	  	<td bgcolor="<% =StrForumCellColor%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><b>IP Ban Option:</b></td>
		<td bgcolor="<% =StrForumCellColor%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
		<select name="ipban" size="1">
		<OPTION VALUE="0" <% if ModIPGateBan = "0" then Response.Write(" selected") %>>Off (No IP Banning)
		<OPTION VALUE="1" <% if ModIPGateBan = "1" then Response.Write(" selected") %>>On  (Ban IPs)
		<OPTION VALUE="2" <% if ModIPGateBan = "2" then Response.Write(" selected") %>>On  (LOCKDOWN)
		</select></font></td>
	  </tr>
	  <tr>
	  	<td bgcolor="<% =StrForumCellColor%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><b>IP Logging Option:</b></td>
		<td bgcolor="<% =StrForumCellColor%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
		<select name="iplog" size="1">
		<OPTION VALUE="0" <% if ModIPGateLog = "0" then Response.Write(" selected") %>>Off (No IP Logging)
		<OPTION VALUE="1" <% if ModIPGateLog = "1" then Response.Write(" selected") %>>On  (Log DB IPs Only)
		<OPTION VALUE="2" <% if ModIPGateLog = "2" then Response.Write(" selected") %>>On  (Log All IPs)
		</select></font></td>
	  </tr>
	  <tr valign="top">
	  	<td bgcolor="<% =StrForumCellColor%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><b>Log Expiration (in Days):</b></font></td>
		<td bgcolor="<% =StrForumCellColor%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
		<input type="text" size="16" name="logexpires" value="<% if ModIPGateExp<>"" then Response.Write MODIPGateExp else response.write "30" end if %>"></font></td>
	  </tr>
	  <tr valign="top">
	  	<td bgcolor="<% =StrForumCellColor%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><b>Banned Message:</font></b></td>
		<td bgcolor="<% =StrForumCellColor%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
		<input type="text" size="40" name="banmessage" value="<% if ModIPGateMsg <>"" then Response.Write ModIPGateMsg else response.write "You are not allowed access to the page requested." end if %>">
		</font></td>
	  </tr>
	  <tr>
	  	<td bgcolor="<% =strCategoryCellColor %>" width="100%" colspan="2"> </td>
	    </tr>
      <tr>
	  	<td bgcolor="<% =StrForumCellColor%>" width="50%"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
        <a href="admin_mod_ipgate.asp?action=ipadmin">IP Administration</a></font></b></td>
	  	<td bgcolor="<% =StrForumCellColor%>" width="50%"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><b>
        <a href="admin_mod_ipgate.asp?action=logadmin">Log Administration</a></b></td>
	  </tr>
	  <tr>
	  	<td bgcolor="<% =strCategoryCellColor %>" width="100%" colspan="2"> </td>
	  </tr>
	  <tr>
 	   <td bgcolor="<% =strCategoryCellColor %>" colspan="2" align="right"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>">
       <input type="submit" value="Submit" style="float: right" > </td>
	  </tr></table>
	</form>
	

<%

Case "help"
'add help documentation


Case "config"

	strSql = "UPDATE " & strTablePrefix & "CONFIG_NEW "
	strSql = strSql & "SET C_VALUE = '" & ipban & "'"
	strSql = strSql & " WHERE C_VARIABLE = 'MODIPGATEBAN'"
	my_Conn.open strSql, strConnString 

	strSql = "UPDATE " & strTablePrefix & "CONFIG_NEW "
	strSql = strSql & "SET C_VALUE = '" & logexpires & "'"
	strSql = strSql & " WHERE C_VARIABLE = 'MODIPGATEEXP'"
	my_Conn.open strSql, strConnString 
	
	strSql = "UPDATE " & strTablePrefix & "CONFIG_NEW "
	strSql = strSql & "SET C_VALUE = '" & iplog & "'"
	strSql = strSql & " WHERE C_VARIABLE = 'MODIPGATELOG'"
	my_Conn.open strSql, strConnString 
	
	strSql = "UPDATE " & strTablePrefix & "CONFIG_NEW "
	strSql = strSql & "SET C_VALUE = '" & banmessage & "'"
	strSql = strSql & " WHERE C_VARIABLE = 'MODIPGATEMSG'"
	my_Conn.open strSql, strConnString 
	'my_Conn.close


	'inc_func_admin.asp
	'SetConfigValue(1, fVariable, fValue)
	'strDummy = SetConfigValue(1, MODIPGATEBAN, ipban)
	'strDummy = SetConfigValue(1, MODIPGATEEXP, logexpires)
	'strDummy = SetConfigValue(1, MODIPGATELOG, iplog)
	'strDummy = SetConfigValue(1, MODIPGATEMSG, banmessage)
	
	'for each key in Request.Form 
	'	if left(key,3) = "mod" then
	'		strDummy = SetConfigValue(1, key, ChkString(Request.Form(key),"SQLstring"))
	'	end if
	'next

	Application(strCookieURL & "ConfigLoaded") = ""
	response.write "Settings Updated."
	Response.Redirect ("admin_mod_ipgate.asp?action=menu")


Case "ipadmin"

	my_Conn.Open "SELECT  * from " & strTablePrefix & "IPLIST order by IPLIST_ID desc;", strConnString 
	%>
	<p>
	<table border="0" cellpadding="4" cellspacing="1" width="100%" style="border-collapse: collapse" bordercolor="#111111">
		<tr>
			<td bgcolor="<% =strCategoryCellColor %>" colspan="9"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>"><b>NET 
            IPGate v0.52 BETA IP Administration</b></td>
    		<td bgcolor="<% =strCategoryCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>">[<a href="admin_mod_ipgate.asp?action=add&userd=<%=("MODIPGATEEXP")%>">add</a>]</font></td>
    	</tr>
		<tr>
			<td bgcolor="<% =strCategoryCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>"><b>ID</b></font></td>
    		<td bgcolor="<% =strCategoryCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>"><b>Type</b></font></td>
    		<td bgcolor="<% =strCategoryCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>"><b>Start IP</b></font></td>
    		<td bgcolor="<% =strCategoryCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>"><b>End IP</b></font></td>
    		<td bgcolor="<% =strCategoryCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>"><b>Start Date</b></font></td>
    		<td bgcolor="<% =strCategoryCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>"><b>End Date</b></font></td>
    		<td bgcolor="<% =strCategoryCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>"><b>Comment</b></font></td>
    		<td bgcolor="<% =strCategoryCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>">Status</font></b></td>
    		<td bgcolor="<% =strCategoryCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>">DB Page Key</font></b></td>
    		<td bgcolor="<% =strCategoryCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>"><b>Action</b></font></td>
		</tr>
	<% counti = 0 %>
	<% do while not my_Conn.EOF 
	
	if counti mod 2 = 0 Then %>
		<tr>
			<td bgcolor="<% =StrForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><%=my_Conn("IPLIST_ID")%></font></td>
			<td bgcolor="<% =StrForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><b><%=my_Conn("IPLIST_TYPE")%></b></font></td>
			<td bgcolor="<% =StrForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><b><%=my_Conn("IPLIST_START_IP")%></b></font></td>
			<td bgcolor="<% =StrForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><b><%=my_Conn("IPLIST_END_IP")%></b></font></td>
			<td bgcolor="<% =StrForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><b><%=my_Conn("IPLIST_START_DATE")%></b></font></td>
			<td bgcolor="<% =StrForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><b><%=my_Conn("IPLIST_END_DATE")%></b></font></td>
			<td bgcolor="<% =StrForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><em><%=my_Conn("IPLIST_COMMENT")%></em></font></td>
			<td bgcolor="<% =StrForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><em>
			<% 	userstatus = my_Conn ("IPLIST_STATUS")
				Select Case userstatus
				Case 0 		Response.Write "Banned"
				Case 1		Response.Write "Watched"
				Case 2		Response.Write "Special Access"
				end select
			%>
			</em></font></td>
			<td bgcolor="<% =StrForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><%=my_Conn("IPLIST_DBPAGEKEY")%></font></td>
			<td bgcolor="<% =StrForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">[<a href="admin_mod_ipgate.asp?action=edit&userd=<%=my_Conn("IPLIST_ID")%>">edit</a>] [<a href="admin_mod_ipgate.asp?action=deleteip&userd=<%=my_Conn("IPLIST_ID")%>">del</a>]</font></td>
		</tr>
	<% else %>
		<tr>
			<td bgcolor="<% =StrAltForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><%=my_Conn("IPLIST_ID")%></font></td>
			<td bgcolor="<% =StrAltForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><b><%=my_Conn("IPLIST_TYPE")%></b></font></td>
			<td bgcolor="<% =StrAltForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><b><%=my_Conn("IPLIST_START_IP")%></b></font></td>
			<td bgcolor="<% =StrAltForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><b><%=my_Conn("IPLIST_END_IP")%></b></font></td>
			<td bgcolor="<% =StrAltForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><b><%=my_Conn("IPLIST_START_DATE")%></b></font></td>
			<td bgcolor="<% =StrAltForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><b><%=my_Conn("IPLIST_END_DATE")%></b></font></td>
			<td bgcolor="<% =StrAltForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><em><%=my_Conn("IPLIST_COMMENT")%></em></font></td>
			<td bgcolor="<% =StrAltForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><em>
			<% 	userstatus = my_Conn ("IPLIST_STATUS")
				Select Case userstatus
				Case 0		Response.Write "Banned"
				Case 1		Response.Write "Watched"
				Case 2		Response.Write "Special Access"
				end select
			%>
			</em></font></td>
			<td bgcolor="<% =StrAltForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><%=my_Conn("IPLIST_DBPAGEKEY")%></font></td>
			<td bgcolor="<% =StrAltForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">[<a href="admin_mod_ipgate.asp?action=edit&userd=<%=my_Conn("IPLIST_ID")%>">edit</a>] [<a href="admin_mod_ipgate.asp?action=deleteip&userd=<%=my_Conn("IPLIST_ID")%>">del</a>]</font></td>
		</tr>
	<% end if 
	
	counti = counti + 1 
	my_Conn.MoveNext
	loop
	'my_Conn.close
	%>
	<tr>
		<td bgcolor="<% =strCategoryCellColor %>" colspan="10" align="right"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>">.</td>
	</tr>
	</table>
	<%


Case "logadmin"

	my_Conn.Open "SELECT  TOP 500 * from " & strTablePrefix & "IPLOG order by IPLOG_ID desc;", strConnString 
	%>
	<p>
	<table border="0" cellpadding="4" cellspacing="1" width="100%" style="border-collapse: collapse" bordercolor="#111111">
		<tr>
			<td bgcolor="<% =strCategoryCellColor %>" colspan="4"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>"><b>NET 
            IPGate v0.52 BETA Log Administration</b></td>
    		<td bgcolor="<% =strCategoryCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>">[<a href="admin_mod_ipgate.asp?action=deletelog&userd=<%=ModIpgateExp%>">clean</a>][<a href="admin_mod_ipgate.asp?action=deletelog">delete</a>]</font></td>
		</tr>
		<tr>
			<td bgcolor="<% =strCategoryCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>"><b>ID</b></font></td>
    		<td bgcolor="<% =strCategoryCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>"><b>IP/HOST</b></font></td>
    		<td bgcolor="<% =strCategoryCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>"><b>Page Refered By</b></font></td>
    		<td bgcolor="<% =strCategoryCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>">Date</font></b></td>
    		<td bgcolor="<% =strCategoryCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>"><b>Action</b></font></td>
		</tr>
	<% counti = 0 %>
	<% do while not my_Conn.EOF 
	
	if counti mod 2 = 0 Then %>
		<tr>
			<td bgcolor="<% =StrForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><%=my_Conn("IPLOG_ID")%></font></td>
			<td bgcolor="<% =StrForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><b><%=my_Conn("IPLOG_IP")%></b></font></td>
			<td bgcolor="<% =StrForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><em><%=my_Conn("IPLOG_REFERER")%></em></font></td>
			<td bgcolor="<% =StrForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><em><%=my_Conn("IPLOG_DATE")%></em></font></td>
			<td bgcolor="<% =StrForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">[<a href="admin_mod_ipgate.asp?action=add&userd=<%=my_Conn("IPLOG_ID")%>">add</a>]</font></td>
		</tr>
	<% else %>
		<tr>
			<td bgcolor="<% =StrAltForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><%=my_Conn("IPLOG_ID")%></font></td>
			<td bgcolor="<% =StrAltForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><b><%=my_Conn("IPLOG_IP")%></b></font></td>
			<td bgcolor="<% =StrAltForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><em><%=my_Conn("IPLOG_REFERER")%></em></font></td>
			<td bgcolor="<% =StrAltForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><%=my_Conn("IPLOG_DATE")%></font></td>
			<td bgcolor="<% =StrAltForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">[<a href="admin_mod_ipgate.asp?action=add&userd=<%=my_Conn("IPLOG_ID")%>">add</a>]</font></td>
		</tr>
	<% end if 
	
	counti = counti + 1 
	my_Conn.MoveNext
	loop
	'my_Conn.close 
	%>
	<tr>
		<td bgcolor="<% =strCategoryCellColor %>" colspan="5" align="right"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>">.</td>
	</tr>
	</table>
	<%


Case "viewstat"

'add view statistics here
	Response.Redirect ("admin_mod_ipgate.asp?action=menu")


Case "add" 
	%>
	<form action="admin_mod_ipgate.asp?action=add" method="post" name="addip">
	<table border="0" cellpadding="4" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%">
 	 <tr>
 	   <td bgcolor="<% =strCategoryCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>"><b>NET IPGate 
       v0.52 BETA Add IP</b></td>
 	   <td bgcolor="<% =strCategoryCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>">
       <i>Your IP is <%=userip%></i></p></font></td>
 	 </tr>
 	 <tr>
 	   <td bgcolor="<% =StrForumCellColor%>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
       Type:</font></b></td>
 	   <td bgcolor="<% =StrForumCellColor%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
       <input type="text" size="32" name="iptype" value="1"></td>
 	 </tr>
 	 <tr>
 	   <td bgcolor="<% =StrForumCellColor%>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
       Start IP Address:</font></b></td>
 	   <td bgcolor="<% =StrForumCellColor%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
       <input type="text" size="32" name="startip"></td>
 	 </tr>
 	 <tr>
 	   <td bgcolor="<% =StrForumCellColor%>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
       End IP Address:</font></b></td>
 	   <td bgcolor="<% =StrForumCellColor%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
       <input type="text" size="32" name="endip"></td>
 	 </tr>
 	 <tr>
 	   <td bgcolor="<% =StrForumCellColor%>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
       Start Date:</font></b></td>
 	   <td bgcolor="<% =StrForumCellColor%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
       <input type="text" size="32" name="startdate"></td>
 	 </tr>
 	 <tr>
 	   <td bgcolor="<% =StrForumCellColor%>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
       End Date:</font></b></td>
 	   <td bgcolor="<% =StrForumCellColor%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
       <input type="text" size="32" name="enddate"></td>
 	 </tr>
 	 <tr>
 	   <td bgcolor="<% =StrForumCellColor%>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">Comment:</font></b></td>
 	   <td bgcolor="<% =StrForumCellColor%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
       <input type="text" size="32" name="usercomment"></td>
	  </tr>
	  <tr>
	    <td bgcolor="<% =StrForumCellColor%>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">DB Page Key:</font></b></td>
	    <td bgcolor="<% =StrForumCellColor%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
        <input type="text" size="32" name="dbpagekey" value="NONE"></td>
	  </tr>
	  <tr>
 	   <td bgcolor="<% =StrForumCellColor%>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">Status:</font></b></td>
 	   <td bgcolor="<% =StrForumCellColor%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><select name="userstatus" size="1">
		<OPTION selected VALUE="0">Banned
		<OPTION VALUE="1">Watched
		<OPTION VALUE="2">Special Access
		</select> </td>
 	 </tr>
 	 <tr>
 	   <td bgcolor="<% =strCategoryCellColor %>" colspan="2" align="right"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>">
       <input type="submit" value="Submit" style="float: right" > </td>
	  </tr>
	</table>
	</form>
	<%
	if startip <> "" then 
		sql = "insert into " & strTablePrefix & "IPLIST (IPLIST_TYPE, IPLIST_START_IP, IPLIST_END_IP, IPLIST_START_DATE, IPLIST_END_DATE, IPLIST_COMMENT,IPLIST_STATUS) "
		sql = sql & "values ('" & iptype & "','" & startip & "','" & endip & "','" & startdate & "','" & enddate & "','" & usercomment & "','" & userstatus & "')"
		my_Conn.Open sql, strConnString 
		'my_Conn.close
		Response.Redirect ("admin_mod_ipgate.asp?action=menu")
	end if 


Case "edit"
	
	sql = "SELECT  * from " & strTablePrefix & "IPLIST WHERE IPLIST_ID =" & userd & ";"
	my_Conn.Open sql, strConnString 
	'response.write my_conn(IPLIST_START_IP)
	%>

	<form action="admin_mod_ipgate.asp?action=editupdate&userd=<%=my_Conn("IPLIST_ID")%>" method="post" name="editip">
	<table border="0" cellpadding="4" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%">
 	 <tr>
 	   <td bgcolor="<% =strCategoryCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>"><b>NET IPGate 
       v0.52 BETA Edit IP</b></td>
 	   <td bgcolor="<% =strCategoryCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>">
       <i>Your IP is <%=userip%></i></p></font></td>
 	 </tr>
  	 <tr>
 	   <td bgcolor="<% =StrForumCellColor%>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
       ID:</font></b></td>
 	   <td bgcolor="<% =StrForumCellColor%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
       <input type="text" name="userd" size="32" value="<%=my_conn("IPLIST_ID")%>"></td>
 	 </tr>
 	 <tr>
 	   <td bgcolor="<% =StrForumCellColor%>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
       Type:</font></b></td>
 	   <td bgcolor="<% =StrForumCellColor%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
       <input type="text" name="iptype" size="32" value="<% if my_conn("IPLIST_TYPE") <> "" then Response.Write (my_conn("IPLIST_TYPE")) end if %>"></td>
 	 </tr>
 	 <tr>
 	   <td bgcolor="<% =StrForumCellColor%>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
       Start IP Address:</font></b></td>
 	   <td bgcolor="<% =StrForumCellColor%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
       <input type="text" name="startip" size="32" value="<% if my_conn("IPLIST_START_IP") <> "" then Response.Write (my_conn("IPLIST_START_IP")) end if %>"></td>
 	 </tr>
 	 <tr>
 	   <td bgcolor="<% =StrForumCellColor%>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
       End IP Address:</font></b></td>
 	   <td bgcolor="<% =StrForumCellColor%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
       <input type="text" name="endip" size="32" value="<% if my_conn("IPLIST_END_IP") <> "" then Response.Write(my_conn("IPLIST_END_IP")) end if %>"></td>
 	 </tr>
 	 <tr>
 	   <td bgcolor="<% =StrForumCellColor%>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
       Start Date:</font></b></td>
 	   <td bgcolor="<% =StrForumCellColor%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
       <input type="text" name="startdate" size="32" value="<% if my_conn("IPLIST_START_DATE") <> "" then Response.Write(my_conn("IPLIST_START_DATE")) end if %>"></td>
 	 </tr>
 	 <tr>
 	   <td bgcolor="<% =StrForumCellColor%>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
       End Date:</font></b></td>
 	   <td bgcolor="<% =StrForumCellColor%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
       <input type="text" name="enddate" size="32" value="<% if my_conn("IPLIST_END_DATE") <> "" then Response.Write(my_conn("IPLIST_END_DATE")) end if %>"></td>
 	 </tr>
 	 <tr>
 	   <td bgcolor="<% =StrForumCellColor%>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">Comment:</font></b></td>
 	   <td bgcolor="<% =StrForumCellColor%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
       <input type="text" name="usercomment" size="32" value="<% if my_conn("IPLIST_COMMENT")<> "" then Response.Write (my_conn("IPLIST_COMMENT")) end if %>"></td>

	  </tr>
	  <tr>
	    <td bgcolor="<% =StrForumCellColor%>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">DB Page Key:</font></b></td>
	    <td bgcolor="<% =StrForumCellColor%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
        <input type="text" name="dbpagekey" size="32" value="<% if my_conn("IPLIST_DBPAGEKEY")<> "" then Response.Write my_conn("IPLIST_DBPAGEKEY") end if %>"></td>
	  </tr>
	  <tr>
 	   <td bgcolor="<% =StrForumCellColor%>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">Status:</font></b></td>
 	   <td bgcolor="<% =StrForumCellColor%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
		<select name="userstatus" size="1">
		<OPTION VALUE="0" <% if my_conn("IPLIST_STATUS")= "0" then Response.Write(" selected") %>>Banned
		<OPTION VALUE="1" <% if my_conn("IPLIST_STATUS")= "1" then Response.Write(" selected") %>>Watched
		<OPTION VALUE="2" <% if my_conn("IPLIST_STATUS")= "2" then Response.Write(" selected") %>>Special Access
		</select>
		 </td>
 	 </tr>
 	 <tr>
 	   <td bgcolor="<% =strCategoryCellColor %>" colspan="2" align="right"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>">
       <input type="submit" value="Submit" style="float: right" > </td>
	  </tr>
	</table>
	</form>
	<%
	'my_Conn.close
	

Case "editupdate"

	if userd <> "" then 
		sql = "UPDATE " & strTablePrefix & "IPLIST "
		sql = sql & " SET IPLIST_TYPE = '" & iptype & "', IPLIST_START_IP = '" & startip & "', IPLIST_END_IP = '" & endip & "', IPLIST_START_DATE = '" & startdate & "', IPLIST_END_DATE = '" & enddate & "', IPLIST_COMMENT = '" & usercomment & "', IPLIST_STATUS = '" & userstatus & "', IPLIST_DBPAGEKEY = '" & dbpagekey & "' "
		sql = sql & " WHERE IPLIST_ID = " & userd & ";"
		my_Conn.Open sql, strConnString 
		'my_Conn.close
		response.write "Record Updated."
		Response.Redirect ("admin_mod_ipgate.asp?action=menu")
	end if


Case "deleteip"

	sql = "DELETE * from " & strTablePrefix & "IPLIST WHERE IPLIST_ID=" & userd & ";"
	my_Conn.Open sql, strConnString
	'my_Conn.close
	response.write "Record Deleted."
	Response.Redirect ("admin_mod_ipgate.asp?action=menu")


Case "deletelog"

	If userd = "" then
		sql = "DELETE * from " & strTablePrefix & "IPLOG;"
		my_Conn.Open sql, strConnString
		'my_Conn.close
		response.write "Log Deleted."
	else
		sql = "DELETE * from " & strTablePrefix & "IPLOG WHERE IPLOG_DATE < " & (now()) & ";"
		response.write sql
		my_Conn.Open sql, strConnString
		'my_Conn.close
		response.write "Expired Log Entries Deleted."
		Response.Redirect ("admin_mod_ipgate.asp?action=menu")
	end if

end select 

'my_Conn.close
set my_Conn=nothing


function isIPAddress(IP) 
	IP = String(IP)

	//IP address is a 32 bit number.
	//must be 15 characters max,
	//following this format: xxx.xxx.xxx.xxx
	//WHERE each x is a digit 0-9
	'var re = /^((\d{1,3})(\.)){3}(\d{1,3})$/

	//attempt to test the entered IP
	'if (re.test(IP)) {

		//if it matches, get each number
		//between decimals
		'var arr = IP.split(/\./g, 4);
		'for (var i=0;i<arr.length;i++) {

			//each number must be in the range of
			//0 and 255 to be considered an IP address
			'if (Number(arr[i]) < 0 || Number(arr[i]) > 255) {

				//anything higher than 255
				//or lower zero is not an IP
				'return false;
			}
		}

		//if they match, return true
		'return true;
	}

	//if the so called IP doesn't match
	//the regexp, it's definitely bad.
	'return false;
end function



%>




------------------------------------------------------------------------

Below is the inc_mod_ipgate.asp


<% 
'#################################################################################
'## NET IPGATE v0.52 BETA by alex042@aol.com (c)Aug 2002
'## 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 
'## must remain intact in the scripts.
'#################################################################################

'MODIPGATEBAN: 0=off, 1=on, 2=lockdown
'MODIPGATEEXP: log expiration days
'MODIPGATELOG: 0=off, 1=db only, 2=on (all)
'pagekey: page password
'status: 0=banned, 1=watched, 2=access

'----------- Uncomment below for Snitz 3.4 -----------
%>
<!--INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_func_secure.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<!--#INCLUDE FILE="inc_moderation.asp" -->
<!--#INCLUDE FILE="inc_subscription.asp" -->
<%


'---- Uncomment below for standalone application -----
'strTablePrefix="FORUM_"
'strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("ipdb.mdb") '## MS Access 2000 using virtual path
'strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("\izer\db\fdiugfgb4tytrg_ghdf4y.mdb") '## MS Access 97 using virtual path
'MODIPGATEBAN=1
'MODIPGATEEXP=30
'MODIPGATELOG=0
'MODIPGATEMSG="You are not allowed access to the page requested."
MODIPGATELCK="Website closed for maintenance. Try back later."


'------------ DO NOT EDIT BELOW THIS LINE ------------

'response.write ModIPGateBan
'response.write ModIPGateExp
'response.write ModIPGateLog
'response.write ModIPGateMsg

'do script if ip logging or banning is on, otherwise ignore script
if ModIPGateBan > 0 or ModIPGateLog > 0 then

	userip=request.servervariables("REMOTE_ADDR")
	userhost=request.servervariables("REMOTE_HOST")
	referer=(Request.ServerVariables("Path_Info"))
	userdate=now()
              

              

	set my_Conn2= Server.CreateObject("ADODB.Recordset")

	'inc_func_secure.asp
	'getMemberID(fUser_Name)

	Select Case ModIPGateBan
	Case 0 'no ban
	
		Select Case ModIPGateLog
		
		Case 0 'do nothing
		
		Case 1 'log db ip's only but don't ban

			sql = "SELECT IPLIST_START_IP from " & strTablePrefix & "IPLIST WHERE IPLIST_START_IP ='" & userip & "'"
			my_Conn2.Open sql, strConnString 
			if my_Conn2.eof or my_Conn2.bof then 'no ip found in db 
				my_Conn2.close
			else
				call logip()
			end if
				
		Case 2 'log all ip's but don't ban

			call logip()

		end select
		
	Case 1 'ban db ip's	
		
		Select Case ModIPGateLog
		
		Case 0 'no logging but ban
		
			call banip()
		
		Case 1 'log db ip's and ban

			sql = "SELECT IPLIST_START_IP from " & strTablePrefix & "IPLIST WHERE IPLIST_START_IP ='" & userip & "'"
			my_Conn2.Open sql, strConnString 
			if my_Conn2.eof or my_Conn2.bof then 'no ip found in db skip logging
				my_Conn2.close
			else
				call logip()
			end if
			call banip()
		
		Case 2 'log all ip's and ban

			call logip()
			call banip()

		end select
		
	Case 2 'LOCKDOWN
		
		Select Case ModIPGateLog
		
		Case 0 'no logging but ban
		
			call banip()
		
		Case 1 'log db ip's and ban

			sql = "SELECT IPLIST_START_IP from " & strTablePrefix & "IPLIST WHERE IPLIST_START_IP ='" & userip & "'"
			my_Conn2.Open sql, strConnString 
			if my_Conn2.eof or my_Conn2.bof then 'no ip found in db skip logging
				my_Conn2.close
			else
				call logip()
			end if
			call banip()
		
		Case 2 'log all ip's and ban

			call logip()
			call banip()

		end select
		
	end select		
	set my_Conn2 = nothing
end if



function logip()
	sql = "INSERT into " & strTablePrefix & "IPLOG (IPLOG_IP, IPLOG_REFERER, IPLOG_DATE) "
	sql = sql & "values ('" & userip & "','" & referer & "','" & userdate & "')"
	my_Conn2.Open sql, strConnString 
	

end function

function banip()

	sql = "SELECT * from " & strTablePrefix & "IPLIST WHERE IPLIST_START_IP = '" & userip & "'"
	my_Conn2.Open sql, strConnString 

	if my_Conn2.eof or my_Conn2.bof then 'no ip found in db 
		if ModIPGateBan = 2 then 
			response.write "<p align=center><b>" & ModIPGateLck & "</b></p>"
			response.end
		end if		
		if pagekey <>"" then 
			response.write "<p align=center><b>" & ModIPGateMsg & "</b></p>"
			response.end
		end if
	else
		Select Case my_Conn2("IPLIST_STATUS")
		Case 0 'banned ip 
			response.write "<p align=center><b>" & ModIPGateMsg & "</b></p>"
			response.end
			
		Case 1 'watched ip no ban unless special access ip required
			if ModIPGateBan = 2 then 
				response.write "<p align=center><b>" & ModIPGateLck & "</b></p>"
				response.end
			end if		
			if pagekey <> "" and pagekey <> my_Conn2("IPLIST_DBPAGEKEY") then 
				response.write "<p align=center><b>" & ModIPGateMsg & "</b></p>"
				response.end
			end if
		
		Case 2 'special access ip 
			if pagekey <> "" and pagekey <> my_Conn2("IPLIST_DBPAGEKEY") then 
				if ModIPGateBan = 2 then 
					response.write "<p align=center><b>" & ModIPGateLck & "</b></p>"
					response.end
				else		
					response.write "<p align=center><b>" & ModIPGateMsg & "</b></p>"
					response.end
				end if
			end if
		end select
	end if 
	my_Conn2.close

end function

%><head><title>Net IPGate Include</title></head>






Thats it..
Go to Top of Page

alex042
Average Member

USA
631 Posts

Posted - 31 August 2002 :  15:00:23  Show Profile  Send alex042 an AOL message  Send alex042 a Yahoo! Message
quote:
Is there a problem with this line?
< % If Session(strCookieURL & "Approval") = "15916941253" Then % >
Shouldn't the "< %" be without a space?
<% If Session(strCookieURL & "Approval") = "15916941253" Then %>
I tried that, but it still doesn't work...
But interestingly, when I remove that IF line and drop in a "<%"

I did get it to run, but I had to delete a line of your code and add in a "<%"... this can't be right.


Yes, your basic idea CAN be right. That particular line of code is used by Snitz to verify that an admin is logged in before showing the page. I had been testing the application as a standalone application and wasn't using that line so I didn't notice the space, but the correct code should be :

<% If Session(strCookieURL & "Approval") = "15916941253" Then %>
<%


You'll also probably need to add an 'end if' after: set my_Conn=nothing and before your footer.

quote:
This actually seems to work. I can IPs to the table. However, when I tried log administration, I get this error:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name or ordinal.
/forum/admin_mod_ipgate.asp, line 294
What do you think?


Sounds like a previous reply. Try changing iplog_page to iplog_referer in the code. There should be a couple of places to change. This should be fixed in the upcoming version.



Go to Top of Page

alex042
Average Member

USA
631 Posts

Posted - 31 August 2002 :  15:11:09  Show Profile  Send alex042 an AOL message  Send alex042 a Yahoo! Message
quote:
well mod works great for me after some modification
referer=Request.ServerVariables("HTTP_REFERER")
replaced with
referer=(Request.ServerVariables("Path_Info"))
to get the correct page info...in the IP log


Did the referer give you anything? Seems like it should give you the location where the person came from. Maybe I should go ahead and have referer AND page fields to determine where the person was and the page they called.
Go to Top of Page

alex042
Average Member

USA
631 Posts

Posted - 31 August 2002 :  18:58:48  Show Profile  Send alex042 an AOL message  Send alex042 a Yahoo! Message
quote:
%>
<!--INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_func_secure.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<!--#INCLUDE FILE="inc_moderation.asp" -->
<!--#INCLUDE FILE="inc_subscription.asp" -->
<%


inc_mod_ipgate.asp shouldn't need these in the include file itself. These should be in the page that ipgate include is included in if you need them. See test.asp for example. An include shouldn't include another include.


Go to Top of Page

cyclingdude
New Member

68 Posts

Posted - 01 September 2002 :  02:57:03  Show Profile
Works great now!

Alex, check your AOL mail..

Thanks,

Cyclingdude
Go to Top of Page

hkch1
Starting Member

10 Posts

Posted - 19 September 2002 :  15:49:04  Show Profile
Hi everybody!
I've just downloaded last version of IPGate.
I run into couple of problems.
1. After I tried to "Submit New Config" from admin-ipgate.asp I did get the message:

Microsoft VBScript runtime error '800a01a8' 

Object required: 'rs' 

/forum_eng/admin_ipgate.asp, line 565 

2. When I try to access IP Administration, I get the error as follows:

Microsoft OLE DB Provider for ODBC Drivers error '80040e37' 

[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot find the input table or query 'FORUM_IPLIST'. Make sure it exists and that its name is spelled correctly. 

/forum_eng/admin_ipgate.asp, line 111 


I also noticed that in admin_ipgate.asp at the very end this

'if my_Conn.State = 1 then my_Conn.Close
'set my_Conn=nothing

is commented out. Should I uncomment it?

Anyway, any help will be appreciated.

Go to Top of Page

alex042
Average Member

USA
631 Posts

Posted - 19 September 2002 :  17:07:39  Show Profile  Send alex042 an AOL message  Send alex042 a Yahoo! Message
quote:
/forum_eng/admin_ipgate.asp, line 565


It should work if you comment that line out to:
'if rs.State = 1 then rs.Close

quote:
Microsoft OLE DB Provider for ODBC Drivers error '80040e37'
[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot find the input table or query 'FORUM_IPLIST'.


It looks like the table's not in your database. Try rerunning the mod setup from your forum admin page to generate the database tables.
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 19 September 2002 :  19:45:53  Show Profile
Had exactly the same results as HKCH1; however, I got mine working by closing a couple rs variables higher up that were left open.

At approximately line 420, find the following:
Case "Write_Configuration"

Err_Msg = ""

if Request.Form("strIPGateBan") <> "0" then



Immediately above those lines, add the following:

rs.close
set rs = nothing


So it looks like this:

rs.close
set rs = nothing
Case "Write_Configuration"

Err_Msg = ""

if Request.Form("strIPGateBan") <> "0" then


After that, mine worked.
Go to Top of Page

alex042
Average Member

USA
631 Posts

Posted - 19 September 2002 :  20:05:44  Show Profile  Send alex042 an AOL message  Send alex042 a Yahoo! Message
quote:
Had exactly the same results as HKCH1; however, I got mine working by closing a couple rs variables higher up that were left open.


Was that on v0.7.0? I moved the recordset check/close line to check for open recordsets and close them right after they're opened and the records are pulled instead of doing the check once at the end. This is included in v0.7.1.

Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 19 September 2002 :  21:05:09  Show Profile
Yes, it was on 0.7.0 - guess I got in the door early.
Go to Top of Page

hkch1
Starting Member

10 Posts

Posted - 20 September 2002 :  07:06:16  Show Profile
I looked at the database. You are right-there is no table. I did run setup MOD twice before I posted my question here and it did tell me that those table are successfully created. And they are not there.
Go to Top of Page

hkch1
Starting Member

10 Posts

Posted - 20 September 2002 :  07:19:02  Show Profile
No, the new tables are not there. I looked after I posted my question here. I tried to copy the script from the dbs_ipgate file and go through "alternative" setup MOD, but it didn't work either.
Need help-why is this going on?
Go to Top of Page
Page: of 26 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.31 seconds. Powered By: Snitz Forums 2000 Version 3.4.07