File size: 1.22Kb
<?php
require 'incs/header.php';
require 'incs/ini.php';
if(!isset($_SESSION['sgb_admp'])){ header('Location: index.php'.psid()); exit; }
$bf=file('incs/ban.dat');
if(isset($_GET['n'])){
$n=intval($_GET['n']);
unset($bf[$n]);
$f=fopen('incs/ban.dat','w');
$d=implode('',$bf);
fputs($f,$d);
fclose($f);
Header('Location: banlist.php'.psid());
exit;
}
include 'fig/head.php';
echo '<div class="hu2">';
if(empty($bf[0])) die('<br />Лист пуст.<hr />← <a href="index.php'.psid().'">B гocтeвую</a><br /></div></div></body></html>');
echo '<br />(Метод бана :: его IP)<hr />';
$cnt=count($bf);
for($i=0;$i<$cnt;$i++){
$a=explode('|:|',$bf[$i]);
echo '[<a href="banlist.php?n='.$i.'&'.SID.'"><span style="color: red">Удл</span></a>] ';
switch($a[0]){
case 0:
echo 'IP+Br';
break;
case 1:
echo 'Br';
break;
case 2:
echo 'IP';
break;
case 3:
echo 'C. ip+br';
break;
case 4:
echo 'C. br';
break;
case 5:
echo 'C. ip';
break;
case 6:
echo 'Total Ban';
break;
}
echo ' :: '.$a[1].'<hr />';
}
echo '<div class="w"></div>← <a href="index.php?'.psid().'">B гocтeвую</a><br />';
include 'fig/nizz.php';
?>