<?php include VIEW_DIR.'mobile/common/menu/forum.tpl'; ?>

<?php if (empty($this->_vars['v_com_topic'])):?>
	<?php _e('Sorry, no results found.'); ?><br><br>
	<?php loadPlugin::callFunc('hitsuji_banner', POSITION_MOBILE); ?><br>
<?php else: ?>
<?php HTML::mobilePager($this->_vars['p_com_topic']); ?>

<table border="0" width="<?php Theme::exec()->mainWidth(); ?>">
<?php foreach ($this->_vars['v_com_topic'] as $_row): ?>
	<tr><td bgcolor="<?php Theme::exec()->bgColor(); ?>"><font size="<?php Theme::exec()->fontSize(); ?>">
	<img src="<?php e(BASE_URL); ?>resource/img/icons/bulletin.gif" width="16" height="16" alt="&gt;">&nbsp;<a href="<?php e(HTTP_ACTION); ?>community/forum/view/<?php e($_row['id']); ?>/"><?php e($_row['topic']); ?></a><br>
	<?php eDate($_row['regist_date'], _('Y-m-d H:i')); ?><br>
	<img src="<?php e(BASE_URL); ?>resource/img/icons/comment.gif" width="16" height="16" alt="&gt;">&nbsp;<a href="<?php e(HTTP_ACTION); ?>community/forum/comments/<?php e($this->_vars['base']['community']['id']); ?>/<?php e($_row['id']); ?>/"><?php _e('Comments');?>&nbsp;(<?php e($_row['posts']); ?>)</a><br></font>
<?php if ($this->_vars['base']['account']['id'] == $_row['ref_author'] || $this->_vars['base']['permission'] & PERMISSION_LEADER): ?>
	<div align="right"><font size="<?php Theme::exec()->fontSize(); ?>"><img src="<?php e(BASE_URL); ?>resource/img/icons/edit.gif" width="16" height="16" alt="&gt;">&nbsp;<a href="<?php e(HTTP_ACTION); ?>community/forum/post/<?php e($this->_vars['base']['community']['id']); ?>/<?php e($_row['id']); ?>/"><?php _e('Edit'); ?></a>&nbsp;/
	<img src="<?php e(BASE_URL); ?>resource/img/icons/trash.gif" width="16" height="16" alt="&gt;">&nbsp;<a href="<?php e(HTTP_ACTION); ?>community/forum/post/<?php e($this->_vars['base']['community']['id']); ?>/<?php e($_row['id']); ?>/delete/"><?php _e('Delete'); ?></a><br></font></div>
<?php endif; ?>
	<hr color="<?php Theme::exec()->borderColor(); ?>" noshade="noshade"></td></tr>
<?php endforeach; ?>
</table>

<?php HTML::mobilePager($this->_vars['p_com_topic']); ?>
<?php endif; ?>

<?php include VIEW_DIR.'mobile/common/menu/forumSearch.tpl'; ?>