View file sdark.mobi/clan_forum/index.php

File size: 1.28Kb
<?
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']."'");

$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'])."'");
$clan = mysql_fetch_array(mysql_query("SELECT * FROM `clan` WHERE `id`  = '".intval($_GET['id'])."'"));
if($k_post == 0)echo "<div class='foot grey'>Нет разделов</div>";
while($post = mysql_fetch_array($q)) {
echo "<div class='but-list'><a href='post/$post[id]/?clan=".intval($_GET['id'])."'><img src='/images/icon/section.png'> $post[name] </a></div>";
} 
if(($user['dolz']=='основатель' and $user['clan']==$clan['id']) or ($user['prava']==5)){
echo "<div class='line'></div><div class='but-list-light'>";
if($k_post == 0)echo "<a href='new_razdel?id=".intval($_GET['id'])."'><img src='/images/icon/r.png'> Создать Раздел</a>";
if($k_post > 0)echo "<a href='red_razdel?id=".intval($_GET['id'])."'><img src='/images/icon/r.png'> Управление разделами</a>";
echo "</div>";
}
include_once '../core/foot.php';
?>