Файл: panel-control/apache-ban.php
Строк: 50
<?
include_once('../apahe/ini.php');
$inc['title'] = 'Управление забаненными пользователями';
include_once('../apahe/top.php');
if (!isset($apache)){
header ('location: /input.dll');
exit;
}
if ($apache['level']>=2){
switch ($_GET['selest']){
default:
echo '<div class="main-text">';
echo '<a href="index.dll" title="Панель">Панель</a>';
echo '</div>';
$total = mysql_result(mysql_query("SELECT COUNT(*) FROM `ban`"), 0);
nav_start($total, 10);
if ($total != 0){
$apach_ban_c = mysql_query("SELECT * FROM `ban` ORDER BY `date` LIMIT $start, 10");
while ($apach_ban = mysql_fetch_assoc($apach_ban_c)){
echo '<div class="main-href">';
echo ''.apache($apach_ban['id-apache']).'<name>'.name($apach_ban['id-apache']).'</name></br>';
echo '<a href="?selest=ban&id='.int($apach_ban['id']).'" title="Cнять бан">Cнять бан</a>';
echo '</div>';
}}else{
error('Забаненных пользователей нету.');
}
view_nav('/panel-control/apache-ban.dll');
break;
case 'ban':
$apach_ban = mysql_fetch_assoc(mysql_query("SELECT * FROM `ban` WHERE `id` = '".int($_GET['id'])."'"));
if (!$apach_ban){
header ('location: /panel-control/apache-ban.dll');
exit;
}
mysql_query("DELETE FROM `ban` WHERE `id` = '".int($apach_ban['id'])."'");
header('Location: /panel-control/apache-ban.dll');
break;
}
}else{
header('Location: /index.dll');
}
include_once('../apahe/bottom.php');
?>