Файл: vsime.com/comm/inc/act_user.php
Строк: 45
<?
if(mysqli_num_rows(mysqli_query($dbi, "SELECT * FROM `user` WHERE `id` = '".intval($_GET['id'])."'"))!=0)
{
$ank=profile(intval($_GET['id']));
ex_head();
$links_hist['name'] = "$ank[nick] / Сообщества";
$title .= ' '.$ank['nick']; // Заголовок страницы
$count_results=mysqli_num_rows(mysqli_query($dbi, "SELECT * FROM `comm_users` WHERE `id_user` = '$ank[id]' AND `activate` = '1' AND `invite` = '0'"));
$count_pages=count_pages($count_results);
$page=page();
$start=start_pages();
if ($count_results==0)
{
echo "<div class='list'>n";
echo "Нет сообществn";
echo "</div>n";
}
$query=mysqli_query($dbi, "SELECT * FROM `comm_users` WHERE `id_user` = '$ank[id]' AND `activate` = '1' AND `invite` = '0' ORDER BY `last_time` DESC LIMIT $start, $config[rop]");
while($post=mysqli_fetch_array($query))
{
$comm=mysqli_query($dbi, "SELECT * FROM `comm` WHERE `id` = '$post[id_comm]'");
$comm=mysqli_fetch_array($comm);
$aname=NULL;
if($post['access']=='creator')$aname='создатель';
elseif($post['access']=='adm')$aname='администратор';
elseif($post['access']=='mod')$aname='модератор';
echo "<div class='list'>n";
echo "<img src='/i/site/comm.png' /> <a href='?act=comm&id=$comm[id]'>".htmlspecialchars($comm['name'])."</a>n";
if($aname!=NULL)echo " ($aname)";
echo "<br/>Вступил".pol_word($ank['id'], array('', 'a'))." ".vremja($post['time']);
echo "</div>n";
}
pages_show("?act=user&id=$ank[id]&"); // Вывод страниц
echo "<div class='foot'>n";
echo image_back()." <a href='$config[profile_page]?id=$ank[id]'>$ank[nick]</a><br/>n";
echo "</div>";
}
else{header("Location:/comm");exit;}
?>