<?php
session_start();
require_once 'inc/functions.php';
check404();
securityCheck();
if (!isLoggedIn()) {
    header('Location: index.php');
    exit;
}

$sections = getForumSections();

require_once 'inc/header.php';
?>

<span class="ttl"><b>Форум</b></span>
<div class="clb"></div>
<div class="hr"></div>

<div>
    <?php foreach ($sections as $sec): ?>
    <div>
        <img class="internalIcon" alt="" border="0" src="<?= htmlspecialchars($sec['icon']) ?>"/>
        <a href="subforum.php?id=<?= $sec['id'] ?>"><span><?= htmlspecialchars($sec['title']) ?></span></a>
       
    </div>
    <?php endforeach; ?>
</div>

<div class="hr"></div>
<img class="internalIcon" alt="" border="0" src="/images/icons/dot.png"/>
<a href="forum.php?mark_read=1">Отметить все как прочитанное</a><br/>
<?php if (isLoggedIn()): ?>
    <img class="internalIcon" alt="" border="0" src="/images/icons/dot.png"/>
    <a href="search.php?my_topics=1">Мои темы</a><br/>
<?php endif; ?>

<?php require_once 'inc/foot.php'; ?>