Location: PHPKode > projects > DDL CMS > Upload these files to your webspace/admin/adminbannedips.inc
<?php
	if(isset($_GET) && is_array($_GET) && count($_GET) > 0 && array_key_exists('page', $_GET) && ctype_digit($_GET['page']))
	{
		$page = $_GET['page'];
	}
	else
	{
		$page = 1;
	}
	$e->page = $page;
	$e->page *= $pagelimit;
	$e->page -= $pagelimit;
	$g_total = dbcom('SELECT COUNT(*) AS TOTAL FROM admin_bannedips;');
	$e->total = mysql_result($g_total, 0);
?>
	<h2>Admin Panel Banned IPs</h2>
	<p>IP addresses blocked from accessing your Administration Panel (possible brute force or hack attempts):</p>
	<p>
<?php
	if($_POST['sub'] == 'Unban')
	{
		echo '<b>' . count($list) . '</b> ip address';
		if(count($list) <> 1)
		{
			echo 'es';
		}
		echo ' removed from Banned List.<br><br>';
		if(!$list == 0)
		{
			$IPlist = implode(',', $list);
			dbcom("UPDATE admin_logins SET viewed = 1 WHERE viewed = 0 AND loginType = 0 AND ip IN (SELECT ip FROM admin_bannedips WHERE id IN($IPlist));");
			dbcom("DELETE FROM admin_bannedips WHERE id IN ('$IPlist');");
		}
	}
	$adminBannedIPquery = dbcom("SELECT * FROM admin_bannedips ORDER BY ip LIMIT $e->page, $pagelimit;");
	if(mysql_num_rows($adminBannedIPquery) > 0)
	{
?>
				<form name="f1" action="ddl.php?go=adminbannedips" method="post">
					<table border="0" cellpadding="0" cellspacing="0" width="100%">
						<tr>
<?php
		while($adminBannedIParray = mysql_fetch_array($adminBannedIPquery))
		{
			if($adminBannedIParray['ip'] != '0')
			{
				$column++;
?>
							<td width="25%"><input type="checkbox" name="list[]" value="<?php echo $adminBannedIParray['id']; ?>" id="list"><?php echo $adminBannedIParray['ip']; ?></td>
<?php
				if(is_int($column / 4))
				{
?>
						</tr>
						<tr>
<?php
				}
			}
		}
		if(!is_int($column / 4))
		{
?>
						</tr>
<?php
		}
?>
					</table>
					<br>
<?php
		$e->paginate("ddl.php?go=adminbannedips&page=");
?>
					<br>
					<br>
					<input type="button" value="Check All" class="form" onClick="this.value=check(this.form.list)">
					<br>
					<br>
					<input type="submit" name="sub" value="Unban" class="formbutton">
				</form>
<?php
	}
	else
	{
		echo "No IP addresses are banned!";
	}
?>
	</p>
Return current item: DDL CMS