<div class="title"><b><?=Lang::get('news_title', 'news'); ?></b></div>
<div class="block">
<?=System::image('nav.png'); ?> <a href="/news/index/categories"><?=Lang::get('news_categories', 'news'); ?></a><br/>
</div>
<?php if($array->rowCount() == 0): ?>
<div class="menu"><?=Lang::get('news_no_articles', 'news'); ?></div>
<?php else: ?>
<?php foreach($array as $news): ?>
<div class="menu">
&raquo; <a href="/news/article-<?=$news['id']?>"><?=$news['name']; ?></a>
</div>
<?=$pages->view('?'); ?>
<?php endforeach; ?>
<?php endif; ?>

<div class="block">
<?php if (User::loged() and User::level() > 1): ?>
<?=System::image('nav.png'); ?> <a href="/news/index/add"><?=Lang::get('news_add_article', 'news'); ?></a><br/>
<?=System::image('nav.png'); ?> <a href="/news/index/add_category"><?=Lang::get('news_add_category', 'news'); ?></a><br/>
<?php endif; ?>
<?=System::image('back.png'); ?> <a href="/"><?=Lang::get('mainpage'); ?></a>
</div>