Вход Регистрация
Файл: groups/adm/banlist.php
Строк: 63
<?php

require_once '../../incfiles/core.php';
require_once 
'../../incfiles/func.php';
require_once 
'../../incfiles/auth.php';
require_once 
'../../incfiles/user.php';

if (empty(
$user_id)) go(URL);

if (!empty(
$_GET['id']) && is_numeric($_GET['id']))
{
    
$id abs(intval($_GET['id']));
    
$result mysql_query("SELECT * FROM `groups` WHERE `id` = '".$id."' LIMIT 1");
    if (
mysql_num_rows($result) == true$arr_group mysql_fetch_array($result);
    else 
go(URL);
    if (!
in_array($user_idexplode("||"substr($arr_group['admins'], 1, -1)))) go(URL);
}
else 
go(URL);
        
$title lang('Список заблокированых','Список заблокованих');
require_once 
'../../incfiles/head.php';

echo 
'<div class="title">
    <a href="'
.URL.'/groups/?id='.$id.'" onclick="Page.Go(this.href); return false">'.lang('Сообщество','Спільнота').'</a>
    <a href="'
.URL.'/groups/adm/?id='.$id.'" onclick="Page.Go(this.href); return false">'.lang('Управление сообществом','Керування спільнотою').'</a>
    </div><div class="title">'
.$title.'</div>';

if (!empty(
$_GET['del']) && is_numeric($_GET['del']))
{
    
$del abs(intval($_GET['del']));
    if (!
in_array($delexplode("||"substr($arr_group['banlist'], 1, -1)))) $err true;
    if (
$err == false && mysql_query("UPDATE `groups` SET `banlist` = '".str_replace("|".$del."|"""$arr_group['banlist'])."' WHERE `id` = '".$id."'") == true)
    {
        
mysql_query("DELETE FROM `groups_ban` WHERE `group_id` = '".$id."' AND `ban_id` = '".$del."' LIMIT 1");
        
$arr_group mysql_fetch_array(mysql_query("SELECT * FROM `groups` WHERE `id` = '".$id."' LIMIT 1"));
        echo 
ok(user_name3($del).Lang(' удален из списка заблокированых',' видалений зі списку заблокованих'));
    }
}
    
if (!empty(
$arr_group['banlist']))
{
    
$q explode("||"substr($arr_group['banlist'], 1, -1));
    
$count count($q);
    
$cp ceil($count/10);
    
$p = (isset($_GET['p']) and is_numeric($_GET['p']) and $_GET['p']>and $_GET['p']<=$cp) ? $_GET['p'] : 1;
    
$start $p*10-10;

    for (
$i 0$i $count$i++)
    {
        
$arr_group_ban mysql_fetch_array(mysql_query("SELECT * FROM `groups_ban` WHERE `group_id` = '".$id."' AND `ban_id` = '".$q[$i]."' LIMIT 1"));
        echo 
'<div class="block">'.user_name($q[$i]).'<ul>
        '
.lang('Заблокований','Заблокований').': '.vtime($arr_group_ban['time']).'<br/>
        До: <b>'
.date('d'$arr_group_ban['do']).' '.hb(date('m'$arr_group_ban['do'])).' '.date('H:i'$arr_group_ban['do']).'</b><br/>'.(!empty($arr_group_ban['text'])?'Причина: <b>'.$arr_group_ban['text'].'</b><br/>':'').'
        <a href="'
.URL.'/groups/adm/banlist.php?id='.$id.'&del='.$q[$i].'" onclick="Page.Go(this.href); return false">'.lang('Розблокировать','Розблокувати').'</a>
        </ul></div>'
;
    }
    
navi($p,$cp,''.URL.'/groups/adm/banlist.php?id='.$id.'&');
}
require_once 
'../../incfiles/foot.php';

?>
Онлайн: 1
Реклама