Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
Posted:
Sat Jun 26, 2004 8:33 am
Telli from
Only registered users can see links on this board! Get registered or login to the forums!
writes
I switched over to Sentinel(tm) - Protector was starting to bog me down. I made a script to transfer the db if anyone wants it to switch from Protector to Sentinel(tm)."
Code:
<?php
include("mainfile.php");
global $db, $prefix;
//Change to your name
$yourname = "Your_Name";
$sql = "SELECT * FROM $prefix"._blocked." ORDER BY id ASC limit 0,10000";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$ip = $row['ip_from'];
$date = $row['date'];
$info = $row['info'];
$banned = $row['banned'];
if ($banned =="") { $banned = "Anonymous"; }
$ip_add = long2ip(-(4294967296-$ip));
<?php
require_once("mainfile.php");
$index = 1;
//Change to your name
$yourname = "Your_Name";
switch($op) {
default:
include ("header.php");
Opentable();
echo "<table align='center' border='0' cellpadding='5' cellspacing='0'>\n";
echo "<form action='".$_SERVER['PHP_SELF']."' method='post'>\n";
echo "<tr><td>This script will not install the Sentinel™. You must install that prior to running this script.</td></tr>\n";
echo "<tr><td>This script will move your Banned IP's from the Protector to the Sentinel™. There is also an option to move the IP's and remove the Protector tables.</td></tr>\n";
echo "<tr><td><b>Please make a backup of your database before using this script. When your done DELETE it off of your server.</b></td></tr>\n";
echo "<tr><td><select name='op'>\n";
echo "<option value=''>Transfer Options</option>\n";
echo "<option value='transfer'>Transfer IP's</option>\n";
echo "<option value='transferdelete'>Transfer IP's and REMOVE Protector tables.</option>\n";
echo "</select><input type='submit' value='Transfer'></td></tr>\n";
echo "</form>";
echo "</table>\n";
CloseTable();
include("footer.php");
break;
case "transfer":
include("header.php");
global $db, $prefix, $user_prefix, $yourname;
OpenTable();
$sql = "SELECT * FROM $prefix"._blocked." ORDER BY id ASC limit 0,10000";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$ip = $row['ip_from'];
$date = $row['date'];
$info = $row['info'];
$banned = $row['banned'];
if ($banned =="") { $banned = "Anonymous"; }
$ip_add = long2ip(-(4294967296-$ip));
View next topic View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum