<?php
// Разделы клана. Доступ только у членов клана.
if ($user['clan_id'] != $parent['clan_id']) {
header('Location: /');
exit();
}
$k_sub = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_razdel` WHERE `attached_to` = '$parent[id]'"),0);
$k_page = k_page($k_sub,$set['p_str']);
$page = page($k_page);
$start = $set['p_str']*$page-$set['p_str'];
$forum_sub_2 = mysql_query("SELECT * FROM `forum_razdel` WHERE `sub_forum` = '1' and `attached_to` = '$parent[id]' and `clan_forum` = '1' ");
if($k_sub == 0)echo "";
echo '<div class="player menuList">';
while($forum_clan_sub = mysql_fetch_assoc($forum_sub_2)) {
if($forum_clan_sub['type'] == 'guest' || $forum_clan_sub['type'] == 'clan' && $user['clan_id'] == $forum_clan_sub['clan_id'] || $forum_clan_sub['type'] == 'clan_lead' && $user['clan_id'] == $forum_clan_sub['clan_id'] && $user['clan_prava'] >= '3')echo "<li><a href='/forum?id=$forum_clan_sub[id]'><img src='/images/icon/section.png'>$forum_clan_sub[name]</a></li><div class='dot-line'></div>";
}
echo '</div>';
if ($k_page>1){
str('?',$k_page,$page); // Вывод страниц
echo '<div class="mini-line"></div>';
}
echo '<div class="player menuList">';
echo '<li><a href="/moderators?forum='.$parent['id'].'"><img src="/images/icon/user.png">Список Модераторов</a></li>';
Include 'forum_e_d_panel.php';
echo '<li><a href="/clan/clan?id='.$parent['clan_id'].'"><img src="/images/icon/section.png">Назад в клан</a></li>';
echo '</div>';
?>