|
|
@@ -13,7 +13,11 @@ require_once 'db.php';
|
|
|
require_once 'token.php';
|
|
|
require_once 'stats.php';
|
|
|
|
|
|
-$ip = ip2long(substr(trim($_GET['ip']),0,15));
|
|
|
+if(isset($_POST['ip'])) {
|
|
|
+ $ip = ip2long(substr(trim($_POST['ip']),0,15));
|
|
|
+} else {
|
|
|
+ $ip = ip2long(substr(trim($_GET['ip']),0,15));
|
|
|
+}
|
|
|
$token = substr(trim($_GET['token']),0,25);
|
|
|
$action = substr(trim($_GET['action']),0,9);
|
|
|
$stats = true;
|
|
|
@@ -79,6 +83,14 @@ foreach($blacklist as $blip) {
|
|
|
echo "<tr><td>" . long2ip($blip) . "</td><td><a href=admin.php?token=" . $token . "&action=deblacklist&ip=" . long2ip($blip) . ">remove from blacklist</a></td></tr>";
|
|
|
}
|
|
|
?>
|
|
|
+<tr>
|
|
|
+ <form action=admin.php?token=<?php $token ?>&action=blacklist>
|
|
|
+ <td>
|
|
|
+ <input type='text' id='ip' name='ip'>
|
|
|
+ </td><td>
|
|
|
+ <input type='submit' value='add to blacklist'>
|
|
|
+ </form>
|
|
|
+ </td></tr>"
|
|
|
</table>
|
|
|
<h3>Whitelist</h3>
|
|
|
<table border="0">
|