Файл: groups/users.php
Строк: 39
<?php
require_once '../incfiles/core.php';
require_once '../incfiles/func.php';
require_once '../incfiles/auth.php';
require_once '../incfiles/user.php';
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);
}
else go(URL);
                
$title = checkout($arr_group['name']).' :: Учасники';
require_once '../incfiles/head.php';
echo group_access($arr_group);
    if (in_array($user_id, explode("||", substr($arr_group['blacklist'], 1, -1)))) go(URL.'/groups/?id='.$id);
    echo '<div class="title">
    <a href="'.URL.'/groups/?id='.$id.'" onclick="Page.Go(this.href); return false">'.lang('Сообщество','Спільнота').'</a>
    <a class="title_a_hover" href="'.URL.'/groups/users.php?id='.$id.'" onclick="Page.Go(this.href); return false">'.lang('Участники','Учасники').' '.$arr_group['count_users'].'</a>
    <a href="'.URL.'/groups/users_adm.php?id='.$id.'" onclick="Page.Go(this.href); return false">'.lang('Администрация','Адміністрація').'</a>
    </div>';
if (!empty($arr_group['users']))
{
    $q = explode("||", substr($arr_group['users'], 1, -1));
    $count = count($q);
    $cp = ceil($count/10);
    $p = (isset($_GET['p']) and is_numeric($_GET['p']) and $_GET['p']>1 and $_GET['p']<=$cp) ? $_GET['p'] : 1;
    $start = $p*10-10;
    for ($i = $start; $i < ($p*10) && $i < $count; $i++)
    {
        echo '<div class="block">'.user_name($q[$i]).'<br/><br/></div>';
    }
    navi($p,$cp,''.URL.'/groups/users.php?id='.$id.'&');
}
require_once '../incfiles/foot.php';
?>