<?

include '../../config.php';
include '../../func.php';
head();


echo main2 . '<a href="list.php">Список забаненных</a>' . div;

$all = mysql_result(mysql_query("SELECT count(*) FROM `ban`"), 0);

echo link1 . 'В бане: <b>'.$all.'</b> чел' . div;

if ( $all > 0 ) {
    
    
if($all){
$onpage = 5;
$allpage = ceil($all/$onpage);
$this_page = (isset($_GET['p'])) ? intval($_GET['p']) : 1 ;
if($this_page < 1 || $this_page > $allpage)$this_page = 1;
$start = $this_page*$onpage - $onpage;


$result = mysql_query("SELECT  * FROM `ban` limit ".$start.",".$onpage."");
while($ban = mysql_fetch_assoc($result)){
  
  
  echo link2 . "<b>ID: ".$ban['ban_id']."</b>, <b>".user($ban['ban_id'])."</b><br/ ><br/ > 

  Причина: ".$ban['ban_prich']."<br/ > 
  Забанил(а): ".user($ban['ban_mod'])."<br/ ><br/ > 
  
  Забанили: ".$ban['ban_date']."<br/ > 
  Осталось: ".$ban['ban_time']."<br/ ><br/ > 
  
  [<a href=\"delete.php?id=".$ban['ban_id']."\">Освоб</a>]" . div;  
}


echo link1 . '<b>Страницы:</b> ';
navigation($allpage,"list.php?p={p}",1,1);
echo div;
}

} else {
    echo link2 . 'Бан лист пуст' . div;
}

navig();
foot();

?>
