Файл: comm/list_user.php
Строк: 63
<?php
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/user.php';
if(isset($_GET['id'])){
$soo = intval($_GET['id']);
}else{
header("Location: /index.php");
}
$admin = mysql_fetch_array(mysql_query("SELECT * FROM `community_user_incomm` WHERE `cid` = '$soo' AND `uid` = '".$user['id']."'"));
$set['title'] = 'Список участников';
include_once '../sys/inc/thead.php';
title();
aut();
echo '<div class="menu">';
$comm = mysql_fetch_array(mysql_query('SELECT * FROM `community_comm` WHERE `id` = '.$soo.' LIMIT 1'));
if($soo==0 || $soo<0){
echo '<div class="err">Иди нахуй! Хакер недоношеный!</div>';
}else if($soo!=$comm['id']){
echo '<div class="err">Сообщество не найдено.</div>';
}else if(mysql_result(mysql_query("SELECT COUNT(*) FROM `comm_ban` WHERE `id_user` = '$user[id]' AND `id_comm` = '$soo' AND `time` > '$time'"), 0)!=0){
header('Location: ban.php?id='.$soo);
}else{
$k_page=mysql_result(mysql_query("SELECT COUNT(id) FROM `community_user_incomm` WHERE `cid` = '$soo'"),0);
$k_page=k_page($k_page,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
echo '<table class="post">';
if($k_page==0){
echo '<tr><td class="p_t">Нет пользователей.</td></tr>';
}
$priv = '`uid`';
$por = 'DESC';
if(isset($_GET['sort']) && $_GET['sort']=='admin'){
$priv = '`priv`';
}else if(isset($_GET['sort']) && $_GET['sort']=='id'){
$priv = '`uid`';
}
else if(isset($_GET['sort']) && $_GET['sort']=='uid'){
$priv = '`id`';
$por='ASC';
}
$q=mysql_query("SELECT * FROM `community_user_incomm` WHERE `cid` = '$soo' ORDER BY ".$priv." $por LIMIT $start, $set[p_str]");
while($user_comm = mysql_fetch_array($q)){
$users = mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = '$user_comm[uid]' LIMIT 1"));
echo '<tr><td class="icon14">';
echo avatar2($users['id']);
echo '</td><td class="p_m">';
echo ''.online($users['id']).' <a href="/info.php?id='.$users['id'].'"><span style="color:'.$users['ncolor'].'">'.$users['nick'].'</span></a> ';
}
echo '</td></tr>';
}
echo '</table>';
if($k_page>1){
str('list_user.php?id='.$soo.'&sort='.$priv.'&',$k_page,$page);
}
echo '» <a href="comm.php?id='.$soo.'">В сообщество</a><br/>';
echo '</div>';
include_once '../sys/inc/tfoot.php';
?>