<div class="title"><?=$section_title; ?></div>
<?php if($topics->rowCount() == 0): ?>
<div class="error"><?=Lang::get('forum_no_topics', 'forum'); ?></div>
<?php else: ?>
<?php foreach($topics as $topic): ?>
<div class="post">
	<?php if($topic['closed'] == 1 and $topic['attach'] == 1): ?>
	<?=System::image('forum/pin-closed.png'); ?>
	<?php elseif($topic['closed'] == 1): ?>
	<?=System::image('forum/topic_closed.png'); ?>
	<?php elseif($topic['attach'] == 1): ?>
	<?=System::image('forum/pin.png'); ?>
	<?php else: ?>
	<?=System::image('forum/topic.png'); ?>
	<?php endif; ?>
	<a href="/forum/topic-<?=$topic['id']; ?>"><?=$topic['name']; ?></a> (<?=$this->countPosts($topic['id']); ?>) <a href="/forum/topic-<?=$topic['id']?>?page=end">&raquo;</a>

	<?php
	/*
	if User.level() > 1 or $topic['user_id == User.Id() ?>
	[<a href="/forum/edit_topic-<?$topic['id?>">+</a>|<a href="/forum/delete_topic-<?$topic['id?>">x</a>]
	<?php endif ?>
	*/
	?>
	<br/>
	<?=$this->lastActivity($topic['id']); ?>
</div>
<?php endforeach; ?>
<?php endif; ?>
<?=$pages->view(); ?>
<div class="block">
<?php if(User::loged()): ?>
	<?=System::image('nav.png'); ?> <a href="/forum/add_topic-<?=$id?>"><?=Lang::get('forum_add_topic', 'forum'); ?></a><br/>
<?php endif; ?>
<?=System::image('back.png'); ?> <a href="/forum/forum-<?=$fid?>"><?=Lang::get('back'); ?></a><br/>
<?=System::image('back.png'); ?> <a href="/forum/"><?=Lang::get('forum_title', 'forum'); ?></a><br/>
<?=System::image('back.png'); ?> <a href="/"><?=Lang::get('mainpage'); ?></a>
</div>