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

<?php if (empty($this->_vars['entry'])):?>
	<?php _e('Sorry, no results found.'); ?><br><br>
	<?php loadPlugin::callFunc('hitsuji_banner', POSITION_MOBILE); ?><br>
<?php else: ?>
<table border="0" width="<?php Theme::exec()->mainWidth(); ?>">
	<tr><td align="center" bgcolor="<?php Theme::exec()->bgTitleColor(); ?>"><img src="<?php e(BASE_URL); ?>resource/img/icons/script.gif" width="16" height="16" alt="&gt;">&nbsp;<?php e($this->_vars['entry']['subject']); ?></td></tr>
	<tr><td bgcolor="<?php Theme::exec()->bgColor(); ?>"><font size="<?php Theme::exec()->fontSize(); ?>">
		<?php eDate($this->_vars['entry']['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); ?>member/blog/comments/<?php e($this->_vars['base']['member']['id']); ?>/<?php e($this->_vars['entry']['id']); ?>/"><?php _e('Comments'); ?>&nbsp;(<?php e($this->_vars['entry']['posts']); ?>)</a><br>
		<img src="<?php e(BASE_URL); ?>resource/img/icons/book_olink.gif" width="16" height="16" alt="&gt;">&nbsp;<a href="<?php e(HTTP_ACTION); ?>member/blog/trackbacks/<?php e($this->_vars['base']['member']['id']); ?>/<?php e($this->_vars['entry']['id']); ?>/"><?php _e('Trackbacks'); ?></a><br></font>
<?php if ($this->_vars['base']['account']['id'] == $this->_vars['entry']['ref_account']): ?>
		<div align="right"><font size="<?php Theme::exec()->fontSize(); ?>"><img src="<?php e(BASE_URL); ?>resource/img/icons/book_edit.gif" width="16" height="16" alt="&gt;">&nbsp;<a href="<?php e(HTTP_ACTION); ?>private/post/blog/<?php e($this->_vars['entry']['id']); ?>/"><?php _e('Edit'); ?></a>/
		<img src="<?php e(BASE_URL); ?>resource/img/icons/trash.gif" width="16" height="16" alt="&gt;">&nbsp;<a href="<?php e(HTTP_ACTION); ?>member/blog/list/<?php e($this->_vars['entry']['id']); ?>/delete/"><?php _e('Delete'); ?></a><br></font></div>
<?php endif; ?>
	</td></tr>
</table>
<hr color="<?php Theme::exec()->borderColor(); ?>" noshade="noshade">
<font size="<?php Theme::exec()->fontSize(); ?>"><?php HTML::htmlBody($this->_vars['entry']['body']); ?></font>
<hr color="<?php Theme::exec()->borderColor(); ?>" noshade="noshade">

<table border="0" width="<?php Theme::exec()->mainWidth(); ?>">
<?php if (!empty($this->_vars['tags'])): ?>
	<tr><td bgcolor="<?php Theme::exec()->bgColor(); ?>">
<?php foreach ($this->_vars['tags'] as $_row): ?>
		<img src="<?php e(BASE_URL); ?>resource/img/icons/tag.gif" width="16" height="16" alt="&gt;">&nbsp;<a href="<?php e(HTTP_ACTION); ?>member/blog/list/<?php e($this->_vars['base']['member']['id']); ?>/tag/<?php print(urlencode($_row)); ?>/"><?php e($_row); ?></a>
<?php endforeach; ?>
	</td></tr>
<?php endif; ?>
	<tr><td bgcolor="<?php Theme::exec()->bgColor(); ?>" align="center"><font size="<?php Theme::exec()->fontSize(); ?>">
		<?php if (!empty($this->_vars['prev'])): ?><a href="<?php e(HTTP_ACTION); ?>member/blog/view/<?php e($this->_vars['prev']['id']); ?>/">&lt;&lt;&nbsp;<?php _e('Preview'); ?></a><?php endif; ?>
		<?php if (!empty($this->_vars['next'])): ?><a href="<?php e(HTTP_ACTION); ?>member/blog/view/<?php e($this->_vars['next']['id']); ?>/"><?php _e('Next'); ?>&nbsp;&gt;&gt;</a><?php endif; ?><br></font>
	</td></tr>
	<tr><td bgcolor="<?php Theme::exec()->bgColor(); ?>"><font size="<?php Theme::exec()->fontSize(); ?>"><img src="<?php e(BASE_URL); ?>resource/img/icons/comment_edit.gif" width="16" height="16" alt="&gt;"><a href="<?php e(HTTP_ACTION); ?>member/blog/comment/<?php e($this->_vars['entry']['id']); ?>/0/"><?php _e('Write a Comment'); ?></a></font></td></tr>
	<tr><td bgcolor="<?php Theme::exec()->bgColor(); ?>"><font size="<?php Theme::exec()->fontSize(); ?>"><img src="<?php e(BASE_URL); ?>resource/img/icons/book_edit.gif" width="16" height="16" alt="&gt;"><a href="<?php e(HTTP_ACTION);?>private/post/blog/0/<?php e($this->_vars['entry']['id']); ?>/"><?php _e('Write an article related'); ?></a></font></td></tr>
</table>
<?php endif; ?>
