<% @ Language=VBScript %> <% Option Explicit %> <% '**************************************************************************************** '** Copyright Notice '** '** Web Wiz Forums(TM) '** http://www.webwizforums.com '** '** Copyright (C)2001-2008 Web Wiz(TM). All Rights Reserved. '** '** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS UNDER LICENSE FROM 'WEB WIZ'. '** '** IF YOU DO NOT AGREE TO THE LICENSE AGREEMENT THEN 'WEB WIZ' IS UNWILLING TO LICENSE '** THE SOFTWARE TO YOU, AND YOU SHOULD DESTROY ALL COPIES YOU HOLD OF 'WEB WIZ' SOFTWARE '** AND DERIVATIVE WORKS IMMEDIATELY. '** '** If you have not received a copy of the license with this work then a copy of the latest '** license contract can be found at:- '** '** http://www.webwizguide.com/license '** '** For more information about this software and for licensing information please contact '** 'Web Wiz' at the address and website below:- '** '** Web Wiz, Unit 10E, Dawkins Road Industrial Estate, Poole, Dorset, BH15 4JD, England '** http://www.webwizguide.com '** '** Removal or modification of this copyright notice will violate the license contract. '** '**************************************************************************************** '*************************** SOFTWARE AND CODE MODIFICATIONS **************************** '** '** MODIFICATION OF THE FREE EDITIONS OF THIS SOFTWARE IS A VIOLATION OF THE LICENSE '** AGREEMENT AND IS STRICTLY PROHIBITED '** '** If you wish to modify any part of this software a license must be purchased '** '**************************************************************************************** 'Set the response buffer to true as we maybe redirecting Response.Buffer = True 'Dimension variables Dim rsSelectForum 'Holds the db recordset Dim lngTopicID 'Holds the topic ID number to return to Dim strBlockIP 'Holds the IP address to block Dim strBlockedIPList 'Holds the IP addresses in the blocked list Dim lngBlockedIPID 'Holds the ID number of the blcoked db record Dim laryCheckedIPAddrID 'Holds the array of IP addresses to be ditched 'Read in forum ID intForumID = CInt(getSessionItem("FID")) 'Call the moderator function and see if the user is a moderator (if not logged in as an admin) If blnAdmin = False Then blnModerator = isModerator(intForumID, intGroupID) 'If the person is not an admin or a moderator then send them away If blnAdmin = false AND blnModerator = false Then 'Clean up Call closeDatabase() 'Redirect Response.Redirect("insufficient_permission.asp" & strQsSID1) 'Only run the following lines if this is a moderator or an admin Else 'Run through till all checked IP addresses are deleted For each laryCheckedIPAddrID in Request.Form("chkDelete") 'Delete strSQL = "DELETE FROM " & strDbTable & "BanList " & strRowLock & " " & _ "WHERE " & strDbTable & "BanList.Ban_ID =" & CInt(laryCheckedIPAddrID) & ";" 'Delete the threads adoCon.Execute(strSQL) Next 'Read in all the blocked IP address from the database 'Initalise the strSQL variable with an SQL statement to query the database to count the number of topics in the forums strSQL = "SELECT " & strDbTable & "BanList.Ban_ID, " & strDbTable & "BanList.IP " & _ "FROM " & strDbTable & "BanList" & strRowLock & " " & _ "WHERE " & strDbTable & "BanList.IP Is Not Null;" 'Set the cursor type property of the record set to Dynamic so we can navigate through the record set rsCommon.CursorType = 2 'Set the Lock Type for the records so that the record set is only locked when it is updated rsCommon.LockType = 3 'Query the database rsCommon.Open strSQL, adoCon 'If this is a post back then update the database If Request.Form("IP") <> "" AND blnDemoMode = False Then 'Read in the IP address to block strBlockIP = Trim(Mid(Request.Form("IP"), 1, 30)) 'Update the recordset With rsCommon .AddNew 'Update the recorset .Fields("IP") = strBlockIP 'Update db .Update 'Re-run the query as access needs time to catch up .ReQuery End With End If End If %> IP Blocking <% '***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** Response.Write("") '***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** %>

<% = strTxtIPBlocking %>


<% 'Display the IP blcok list If rsCommon.EOF Then 'Disply no entires forun Response.Write(vbCrLf & " ") 'Else disply the IP block list Else 'Loop through the recordset Do While NOT rsCommon.EOF 'Read in the topic details lngBlockedIPID = CLng(rsCommon("Ban_ID")) strBlockedIPList = rsCommon("IP") %> <% 'Move to the next record in the recordset rsCommon.MoveNext Loop End If 'Reset Server Objects rsCommon.Close Call closeDatabase() %>
<% = strTxtBlockedIPList %>

" & strTxtYouHaveNoBlockedIpAddesses & "

<% = strBlockedIPList %>

<% = strTxtBlockIPAddressOrRange %>
<% = strTxtBlockIPRangeWhildcardDescription %>
<% = strTxtIpAddressRange %>: " />
/>