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

<table border="0" width="<?php Theme::exec()->mainWidth(); ?>">
	<tr><td bgcolor="<?php Theme::exec()->bgTitleColor(); ?>" align="center"><img src="<?php e(BASE_URL); ?>resource/img/icons/user_add.gif" width="16" height="16" alt="&gt;">&nbsp;<?php _e('Friend Add'); ?></td></tr>
</table>
<form method="post" action="<?php e($this->_vars['action']['url']); ?>"><?php HTML::requires(); ?>
<?php if (empty($this->_vars['fri_friends']['status'])): ?>
<?php if ($this->_vars['action']['complete']): ?>
	<?php _e('Updated'); ?><br><br>
	<?php loadPlugin::callFunc('hitsuji_banner', POSITION_MOBILE); ?><br>
<?php elseif ($this->_vars['action']['confirm']): ?>
<table border="0" width="<?php Theme::exec()->mainWidth(); ?>">
	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Comment'); ?>:<br></td></tr>
	<tr><td><?php HTML::htmlBody($this->_vars['fri_friends']['comment']); ?><br></td></tr>
	<tr><td bgcolor="<?php Theme::exec()->bgColor(); ?>" align="center">
		<input type="submit" name="manip" value="<?php _e('Submit'); ?>">
		<input type="submit" name="<?php e($this->_vars['action']['goback']); ?>" value="<?php _e('Go back'); ?>">
	<br></td></tr>
</table>
<?php else: ?>
<table border="0" width="<?php Theme::exec()->mainWidth(); ?>">
	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Comment'); ?>:<br></td></tr>
	<tr><td bgcolor="<?php Theme::exec()->bgColor(); ?>" align="center">
		<?php if (!empty($this->_vars['alert']['comment'])): ?><font color="<?php Theme::exec()->alertColor(); ?>"><?php _e('Please enter.'); ?></font><br><?php endif; ?>
		<?php HTML::mobileRichEditor('comment', $this->_vars['fri_friends']['comment'], _('Comment'), 'small'); ?>
	<br></td></tr>
	<tr><td bgcolor="<?php Theme::exec()->bgColor(); ?>" align="center"><input type="submit" name="confirm" value="<?php _e('Confirm'); ?>"><br></td></tr>
</table>
<?php endif; ?>
</form>
<?php else: ?>
<table border="0" width="<?php Theme::exec()->mainWidth(); ?>">
	<tr><td bgcolor="<?php Theme::exec()->bgColor(); ?>" align="center">
<?php if ($this->_vars['fri_friends']['status'] == STATUS_FRIEND_THROW): ?>
		<?php _e('You already have a pending friend request for this person.'); ?><br>
<?php elseif ($this->_vars['fri_friends']['status'] == STATUS_FRIEND_CHATCH): ?>
		<a href="<?php e(HTTP_ACTION); ?>private/personal/friends/<?php e($this->_vars['fri_friends']['id']); ?>/confirm/"><img src="<?php e(BASE_URL); ?>resource/img/icons/user_add.gif" width="16" height="16" alt="&gt;"><?php _e('Add to Friends'); ?></a>
		<a href="<?php e(HTTP_ACTION); ?>private/personal/friends/<?php e($this->_vars['fri_friends']['id']); ?>/delete/"><img src="<?php e(BASE_URL); ?>resource/img/icons/user_cancel.gif" width="16" height="16" alt="&gt;"><?php _e('Add to Friends'); ?></a>
		<br><br>
<?php elseif ($this->_vars['fri_friends']['status'] == STATUS_FRIEND_CONNECT): ?>
		<?php _e('This member is already one of your friends.'); ?><br>
<?php else: ?>
		<?php _e('I do not accept a friend request.'); ?><br>
<?php endif; ?>
		<br><?php loadPlugin::callFunc('hitsuji_banner', POSITION_MOBILE); ?><br>
	<br></td></tr>
</table>
<?php endif; ?>
