Файл: clan_forum/red_razdel.php
Строк: 55
<?
include_once '../core/system.php';
echo only_reg();
echo ban();
$header = 'Форум клана';
include_once '../core/head.php';
mysql_query("UPDATE `user` set `mesto` = 'Форум клана' where `id` = '".$user['id']."'");
$clan = mysql_fetch_array(mysql_query("SELECT * FROM `clan` WHERE `id` = '".intval($_GET['id'])."'"));
if(($user['dolz']=='основатель' and $user['clan']==$clan['id']) or ($user['prava']==5)){echo"";}else{$_SESSION['err'] = "Ошибка"; header("Location: /clan_forum?id=".intval($_GET['id']).""); exit();}
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_razdel_clan` WHERE `clan`='".intval($_GET['id'])."'"),0);
$q = mysql_query("SELECT * FROM `forum_razdel_clan` WHERE `clan`='".intval($_GET['id'])."'");
if($k_post == 0)echo "<div class='foot grey'>Нет разделов</div><div class='line'></div>";
$clan = mysql_fetch_array(mysql_query("SELECT * FROM `clan` WHERE `id` = '".intval($_GET['id'])."'"));
while($post = mysql_fetch_array($q)) {
echo "<div class='foot'><a href='post/$post[id]/?clan=".intval($_GET['id'])."'><img src='/images/icon/section.png'> $post[name]</a> <span class='float-right'>
<a href='rename_razdel?id=".intval($_GET['id'])."&razdel=$post[id]'><img src='/images/icon/st.png'></a>
<a href='del_razdel?id=".intval($_GET['id'])."&razdel=$post[id]'><img src='/images/icon/error.png'></a></span></div><div class='line'></div>";
}
echo "</div>";
if(($user['dolz']=='основатель' and $user['clan']==$clan['id']) or ($user['prava']==5)){
echo "<div class='foot menuList'>";
echo "<li><a href='new_razdel?id=".intval($_GET['id'])."'><img src='/images/icon/r.png'>Создать Раздел</a></li>";
echo "</div>";
}else{$_SESSION['err'] = "Ошибка"; header("Location: /clan_forum?id=".intval($_GET['id']).""); exit();}
include_once '../core/foot.php';
?>