View file modules/forum/views/default/viewforum.tpl

File size: 2.48Kb
<?php $this->display('header', array('title' => ($_GET['type'] == 'new' ? 'Новые темы' : $forum['name']))) ?>

<div class="title"><img src="<?php echo URL ?>views/<?php echo THEME ?>/img/titl.gif" class="ico" alt="" /><?php if($_GET['type'] != 'new'): ?><a href="<?php echo a_url('forum', 'section_id='. $section['section_id']) ?>"><?php echo $section['name'] ?></a> | <?php echo $forum['name'] ?><?php else: ?>Новые темы<?php endif; ?></div>

<?php if($topics): ?>
    <?php foreach($topics as $topic): ?>
	<div class="menu">
		<?php if($topic['is_top_topic']) echo '!'; if($topic['is_close_topic']) echo '#'; ?><a href="<?php echo a_url('forum/viewtopic', 'topic_id='. $topic['topic_id']) ?>"><?php echo $topic['name'] ?></a> [<?php echo $topic['messages'] ?>] <?php echo $topic['last_username'] ?> <a href="<?php echo a_url('forum/viewtopic', 'topic_id='. $topic['topic_id'] .'&amp;start='. (floor($topic['messages'] / $messages_per_page) * $messages_per_page)) ?>">»</a>
	    <?php if(ACCESS_LEVEL >= 8 && $_GET['type'] != 'new'): ?><br />
	    [<?php echo ($topic['is_top_topic'] ? '<a href="'. a_url('forum/topic_top', 'a=untop&amp;topic_id='. $topic['topic_id'] .'&amp;start='. @$_GET['start']) .'">открепить</a>' : '<a href="'. a_url('forum/topic_top', 'a=top&amp;topic_id='. $topic['topic_id'] .'&amp;start='. @$_GET['start']) .'">закрепить</a>') ?>]
	    [<?php echo ($topic['is_close_topic'] ? '<a href="'. a_url('forum/topic_close', 'a=open&amp;topic_id='. $topic['topic_id'] .'&amp;start='. @$_GET['start']) .'">открыть</a>' : '<a href="'. a_url('forum/topic_close', 'a=close&amp;topic_id='. $topic['topic_id'] .'&amp;start='. @$_GET['start']) .'">закрыть</a>') ?>]
	    [<a href="<?php echo a_url('forum/topic_delete', 'topic_id='. $topic['topic_id'] .'&amp;start='. $_GET['start']) ?>">удалить</a>]
	    <?php endif; ?>
	</div>
	<?php endforeach; ?>
<?php else: ?>
	<div class="block">
	<p>В данном форуме нет тем</p>
	</div>
<?php endif; ?>

<?php if($pagination)
	echo '<div class="block">'. $pagination .'</div>';
?>

<?php if($_GET['type'] != 'new'): ?>
<div class="block">
<a href="<?php echo a_url('forum/posting', 'new_topic=true&amp;forum_id='. $forum['forum_id']) ?>">Новая тема</a><br />
</div>
<?php endif; ?>

<div class="block">
<a href="<?php echo a_url('forum') ?>">Форум</a><br />
<a href="<?php echo URL ?>">На главную</a><br />
</div>

<?php $this->display('footer') ?>