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

<?php if ($this->_vars['base']['member']['id'] == $this->_vars['base']['account']['id']): ?>
<table border="0" width="<?php Theme::exec()->mainWidth(); ?>">
	<tr><td bgcolor="<?php Theme::exec()->bgColor(); ?>">
		<img src="<?php e(BASE_URL); ?>resource/img/icons/user.gif" width="16" height="16" alt="&gt;">&nbsp;<a href="<?php e(HTTP_ACTION);?>member/personal/friends/<?php e($this->_vars['base']['account']['id']); ?>/<?php e(US); ?>status=<?php e(STATUS_FRIEND_CONNECT); ?>"><?php _e('My Friends'); ?></a><br>
		<img src="<?php e(BASE_URL); ?>resource/img/icons/user_add.gif" width="16" height="16" alt="&gt;">&nbsp;<a href="<?php e(HTTP_ACTION);?>member/personal/friends/<?php e($this->_vars['base']['account']['id']); ?>/<?php e(US); ?>status=<?php e(STATUS_FRIEND_CHATCH); ?>"><?php _e('Want to be a Friends'); ?></a>
	<br></td></tr>
</table>
<?php endif; ?>

<?php if (empty($this->_vars['v_fri_friends'])):?>
	<?php _e('Sorry, no results found.'); ?><br><br>
	<?php loadPlugin::callFunc('hitsuji_banner', POSITION_MOBILE); ?><br>
<?php else: ?>
	<?php HTML::mobilePager($this->_vars['p_fri_friends']); ?><br></td></tr>
<table border="0" width="<?php Theme::exec()->mainWidth(); ?>">
	<tr>
<?php foreach ($this->_vars['v_fri_friends'] as $num=>$_row): ?>
		<td bgcolor="<?php Theme::exec()->bgColor(); ?>" align="center">
			<?php loadPlugin::callFunc('hitsuji_profile', $_row['ref_friend'], 'nickname,vSmall'); ?>
			<?php loadPlugin::callFunc('hitsuji_lastLogin', $_row['ref_friend']); ?><br>
			<?php printf($this->_vars['command'], $_row['ref_friend'], $_row['id'], $_row['id']); ?><br>
		</td>
<?php if (($num % 3)==2): ?></tr><tr><?php endif; ?>
<?php endforeach; ?>
	</tr>
</table>
	<?php HTML::mobilePager($this->_vars['p_fri_friends']); ?>
<?php endif; ?>
