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

<?php if (!empty($this->_vars['fri_message'])): ?>
<table border="0" width="<?php Theme::exec()->mainWidth(); ?>">
<tr><td width="46" bgcolor="<?php Theme::exec()->bgColor(); ?>" align="center"><font size="<?php Theme::exec()->fontSize(); ?>">
<?php loadPlugin::callFunc('hitsuji_profile', $this->_vars['fri_message'][$this->_vars['target']], 'vSmall'); ?>
<?php loadPlugin::callFunc('hitsuji_lastLogin', $this->_vars['fri_message'][$this->_vars['target']]); ?></font>
</td><td bgcolor="<?php Theme::exec()->bgColor(); ?>"><font size="<?php Theme::exec()->fontSize(); ?>">
[<?php e($this->_vars['fri_message']['subject']); ?>]<br>
<?php loadPlugin::callFunc('hitsuji_profile', $this->_vars['fri_message'][$this->_vars['target']], 'nickname'); ?>
<?php eDate($this->_vars['fri_message']['regist_date'], _('Y-m-d H:i')); ?><br></font>
</td></tr></table>
<hr color="<?php Theme::exec()->borderColor(); ?>" noshade="noshade">
<font size="<?php Theme::exec()->fontSize(); ?>"><?php HTML::htmlBody($this->_vars['fri_message']['body']); ?></font>
<hr color="<?php Theme::exec()->borderColor(); ?>" noshade="noshade">


<?php if ($this->_vars['status'] == MESSAGE_INBOX): ?>
<form method="post" action="<?php e(HTTP_ACTION); ?>private/message/send/0/"><?php HTML::requires(); ?><?php HTML::requires(); ?>
<input type="submit" name="return" value="<?php _e('Reply'); ?>">
<input type="hidden" name="ref_to" value="<?php e($this->_vars['fri_message']['ref_from']); ?>">
<input type="hidden" name="ref_message" value="<?php e($this->_vars['id']); ?>">
</form>

<form method="post" action="<?php e(HTTP_ACTION); ?>private/message/list/<?php e($this->_vars['status']); ?>/"><?php HTML::requires(); ?>
<input type="submit" name="manip" value="<?php _e('Delete'); ?>">
</form>
<?php elseif ($this->_vars['status'] == MESSAGE_TRASH): ?>
<form method="post" action="<?php e(HTTP_ACTION); ?>private/message/list/<?php e($this->_vars['status']); ?>/"><?php HTML::requires(); ?>
<input type="submit" name="delete" value="<?php _e('Delete'); ?>">
</form>

<form method="post" action="<?php e(HTTP_ACTION); ?>private/message/list/<?php e($this->_vars['status']); ?>/"><?php HTML::requires(); ?>
<select name="taste"><option value=""><?php _e('- Select One -'); ?></option><?php HTML::options($this->_vars['statuses']); ?></select>
<input type="submit" name="manip" value="<?php _e('Move'); ?>">
</form>
<?php else: ?>
<form method="post" action="<?php e(HTTP_ACTION); ?>private/message/list/<?php e($this->_vars['status']); ?>/"><?php HTML::requires(); ?>
<input type="submit" name="manip" value="<?php _e('Delete'); ?>">
</form>
<?php endif; ?>
<?php else: ?>
<?php e(sprintf('There are no messages in your %s folder.', $this->_vars['statuses'][$this->_vars['status']])); ?><br><br>
<?php loadPlugin::callFunc('hitsuji_banner', POSITION_MOBILE); ?><br>
<?php endif; ?>
