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..