Файл: vsime.com/comm/inc/act_comm_settings.php
Строк: 27
<?
if(mysqli_num_rows(mysqli_query($dbi, "SELECT * FROM `comm` WHERE `id` = '".intval($_GET['id'])."'"))!=0)
{
$comm=mysqli_query($dbi, "SELECT * FROM `comm` WHERE `id` = '".intval($_GET['id'])."'");
$comm=mysqli_fetch_array($comm);
$cat=mysqli_query($dbi, "SELECT * FROM `comm_cat` WHERE `id` = '$comm[id_cat]'");
$cat=mysqli_fetch_array($cat);
if (mysqli_num_rows(mysqli_query($dbi, "SELECT * FROM `comm_users` WHERE `id_comm` = '$comm[id]' AND `activate` = '1' AND `invite` = '0'"))==0)$comm['id_user']=0;
$ank=profile($comm['id_user']); // sozdak
if($ank['id']==$user['id'] && isset($user))
{
$title .= ' - '.hsc($comm['name']).' - Настройки'; // Заголовок страницы
ex_head();
echo "<div class='list'><img src='/i/site/avatar.png'/> <a href='?act=comm_avatar&id=$comm[id]'>Аватар</a></div>n";
echo "<div class='list'><img src='/i/site/users_invite.png'/> <a href='?act=comm_activlist&id=$comm[id]'>Желающие вступить (".mysqli_num_rows(mysqli_query($dbi, "SELECT * FROM `comm_users` WHERE `id_comm` = '$comm[id]' AND `activate` = '0'")).")</a></div>n";
echo "<div class='list'><img src='/i/site/settings.png'/> <a href='?act=comm_join&id=$comm[id]'>Доступность</a></div>n";
echo "<div class='list'><img src='/i/site/edit.png'/> <a href='?act=comm_object&id=$comm[id]'>Основное</a></div>n";
echo "<div class='list'><img src='/i/site/cat.png'/> <a href='?act=comm_cat&id=$comm[id]'>Изменить категорию</a></div>n";
echo "<div class='foot'>n";
echo image_back()." <a href='?act=comm&id=$comm[id]'>В сообщество</a>n";
echo "</div>";
}
else{header("Location:/comm");exit;}
}
else{header("Location:/comm");exit;}
?>