Файл: all/black.php
Строк: 20
<?
include_once '../system/sys.php';
include_once '../system/funcs.php';
if(!$cms->us['id']){
header('location: /');
exit;
}
verh('Чёрный список');
echo '<div class="menu">Чёрный список</div>';
$num = 10;
$posts = DB::$dbs->querySingle("SELECT count(`id`) from `us` where (`ked` = '1')");
$total = intval(($posts - 1) / $num) + 1;
$page = abs(intval($_GET['page']));
if(empty($page) or $page < 0) $page = 1;
if($page > $total) $page = $total;
$start = $page * $num - $num;
if($posts>0){
$keds = DB::$dbs->query("SELECT * FROM `us` where (`ked` = '1') order by `id` desc limit $start,$num");
while($ked = $keds->fetch()){
echo '<div class="lst">'.$func->uNick($ked['id']).'</div>';
}
echo '<div class="lst">';
$func->page('/all/black.php?');
echo '</div>';
}else{ echo '<div class="list1">Список пуст!</div>'; }
niz();
?>