View file modules/news/views/index/article.php

File size: 1.27Kb
<?php foreach ($array as $news): ?>
<div class="title"><b><?=$news['name']; ?></b></div>
<div class="post">
<span style="color: grey;"><?=Filters::viewTime($news['time']); ?></span><br/>
<?php if($image != null): ?>
<a href="/cache/news/<?=$image; ?>"><img style="clear:both; float:left; width:150px; margin:10px 20px 20px 0; border:1px solid #e4e4e4;" src="/cache/news/<?=$image; ?>" alt="Image" /></a>
<?php endif; ?>

<?=Filters::output($news['text']); ?>

</div>
<div class="block">
<?=System::image('nav.png'); ?> <a href="/news/comments-<?=$news['id']?>"><?=Lang::get('news_comments', 'news'); ?></a> (<?=$comments?>)<br/>
<?php if (User::level() > 1): ?>
<?=System::image('nav.png'); ?> <a href="/news/edit-<?=$news['id']?>"><?=Lang::get('news_edit_article', 'news'); ?></a><br/>
<?php endif; ?>
<?php if ($news['category_id'] !=0): ?>
<?=System::image('back.png'); ?> <a href="/news/category-<?=$news['category_id']; ?>"><?=Lang::get('back'); ?></a><br/>
<?=System::image('back.png'); ?> <a href="/news/"><?=Lang::get('news_title', 'news'); ?></a><br/>
<?php else: ?>
<?=System::image('back.png'); ?> <a href="/news/"><?=Lang::get('back'); ?></a><br/>
<?php endif; ?>
<?=System::image('back.png'); ?> <a href="/"><?=Lang::get('mainpage'); ?></a>
</div>
<?php endforeach; ?>