Вход Регистрация
Файл: ignor.php
Строк: 33
<?
include_once 'system/sys.php';
include_once 
'system/funcs.php';
if(!
$cms->us['id']){
header('location: /');
exit;
}
$posts = DB::$dbs->querySingle("SELECT count(id) from `ignor` where `us` = ?",array($cms->us['id']));
verh('Игнор-лист','Ваш игнор-лист ('.$posts.' чел.)');
$num = 10;
if(
$posts==0){
echo
'<div class="list1">Игнор-лист пуст!</div>';
}else{
$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(isSet($_GET['del'])){
$del = $func->num($_GET['del']);
if(!empty(
$del)){
$ignor = DB::$dbs->queryFetch("SELECT * from `ignor` where `us` = ? and `id` = ?",array($cms->us['id'],$del));
if(
$ignor['id']){
DB::$dbs->query("DELETE from `ignor` where `id` = ?",array($del));
}
}
header('location: ?');
}

$list = DB::$dbs->query("SELECT * from `ignor` where `us` = ? limit $start,$num",array($cms->us['id']));
while(
$ignor = $list->fetch()){
echo
'<div class="lst">'.$func->uNick($ignor['kem']).' [<a href="/ignor.php?del='.$ignor['id'].'">x</a>]</div>';
}
echo 
'<div class="list1"><a href="/kab">Личный кабинет</a></div><div class="lst">';
$func->page('?');
echo 
'</div>';

}
niz();
?>
Онлайн: 1
Реклама