Вход Регистрация
Файл: groups/adm/blacklist.php
Строк: 44
<?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['blacklist'], 1, -1)))) $err true;
    if (
$err == false && mysql_query("UPDATE `groups` SET `blacklist` = '".str_replace("|".$del."|"""$arr_group['blacklist'])."' WHERE `id` = '".$id."'") == true)
    {
        
$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['blacklist']))
{
    
$q explode("||"substr($arr_group['blacklist'], 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++) echo '<div class="block">'.user_name($q[$i]).'<ul><a'.$adm.' href="'.URL.'/groups/adm/blacklist.php?id='.$id.'&del='.$q[$i].'" onclick="Page.Go(this.href); return false">'.lang('Розблокировать','Розблокувати').'</a></ul></div>';
    
navi($p,$cp,''.URL.'/groups/adm/blacklist.php?id='.$id.'&');
}
require_once 
'../../incfiles/foot.php';

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