<div class="title"><b><?=Lang::get('minichat_title', 'minichat'); ?></b></div>
<?php if (User::loged()): ?>
<div class="menu">
<form action="/minichat?add" method="post">
<?=System::textarea(6, 28); ?><br/>
<input type="submit" value="<?=Lang::get('add'); ?>" /> <a href="/minichat/index?rand=<?=rand(1234, 9876); ?>"><?=System::image('refresh.png'); ?></a>
</form>
</div>
<?php endif; ?>
<?php if($array->rowCount() == 0): ?>
<div class="menu"><?=Lang::get('minichat_no_posts', 'minichat'); ?></div>
<?php else: ?>
<?php foreach($array as $mchat): ?>
<div id="<?=$mchat['id']; ?>}}" class="post">
<?=User::nick($mchat['user_id'], '<small style="color: gray;">'.Filters::viewTime($mchat['time']).'</small>'); ?>
<span style="float:right;"><?php if(User::Id() != $mchat['user_id']): ?>[<a href="#area" onclick="return bbtags('[b]<?=User::tnick($mchat['user_id']);?>', '[/b], ', <?=$mchat['id']?>, 'area');">Re.</a>]<?php endif; ?>
<?php if(User::level() >= 1): ?>
[<a href="/minichat?delete_message&amp;this_id=<?=$mchat['id'];?>">x</a>]
<?php endif; ?>
</span>
<?=Filters::output($mchat['text']); ?>
</div>
<?php endforeach; ?>
<?php $pages->view(); ?>
<?php endif; ?>
<div class="block">
<?php if (User::level() > 1): ?>
<?=System::image('nav.png'); ?> <a href="/minichat?clear"><?=Lang::get('minichat_clear_post', 'minichat'); ?></a><br/>
<?php endif; ?>
<?=System::image('back.png'); ?> <a href="/"> <?=Lang::get('mainpage'); ?></a>
</div>