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

<table border="0" width="<?php Theme::exec()->mainWidth(); ?>">
<?php for ($_row=0; $_row<3; $_row++): ?>
<tr><td bgcolor="<?php Theme::exec()->bgColor(); ?>" align="center">
<?php if (empty($this->_vars['photos'][$_row])):?>
<img src="<?php e(BASE_URL.NOPHOTO_VSMALL); ?>" width="<?php e(PHOTO_VSMALL_SIZE); ?>" height="<?php e(PHOTO_VSMALL_SIZE); ?>" alt="no photo">
<?php else: ?>
<?php $_value = $this->_vars['photos'][$_row]; ?>
<img src="<?php e(BASE_URL.$_value['v_small']); ?>" width="<?php e($_value['v_width']); ?>" height="<?php e($_value['v_height']); ?>" alt="pict">

&nbsp;<img src="<?php e(BASE_URL); ?>resource/img/icons/cross.gif" width="16" height="16" alt="X">&nbsp;
<a href="<?php e(HTTP_ACTION); ?>private/personal/photo/<?php e($_value['id']); ?>/delete/<?php e(US); ?>_mpnnc=<?php e($this->_vars['base']['nonce']); ?>"><?php _e('Delete'); ?></a>&nbsp;
<?php if ($_value['status'] == 0): ?>
|&nbsp;<img src="<?php e(BASE_URL); ?>resource/img/icons/accept.gif" width="16" height="16" alt="O">&nbsp;
<a href="<?php e(HTTP_ACTION); ?>private/personal/photo/<?php e($_value['id']); ?>/main/<?php e(US); ?>_mpnnc=<?php e($this->_vars['base']['nonce']); ?>"><?php _e('Main'); ?></a>
<?php endif; ?>
</td></tr>
<?php endif; ?>
<?php endfor; ?>
</table>

<?php if ($this->_vars['maxrow'] < 3): ?>
<hr color="<?php Theme::exec()->borderColor(); ?>" noshade="noshade">
<font size="<?php Theme::exec()->fontSize(); ?>">
<?php foreach ($this->_vars['albums'] as $_row): ?>
	<a href="<?php e(HTTP_ACTION); ?>private/personal/photo/<?php e(US); ?>ref_album=<?php e($_row['id']); ?>"><img src="<?php e(BASE_URL); ?>resource/img/icons/images.gif" width="16" height="16" align="absmiddle" alt="&gt;" />&nbsp;<?php e($_row['album']); ?></a>&nbsp;(<?php e($_row['posts']); ?>)<br>
<?php endforeach; ?>
	<a href="<?php e(HTTP_ACTION); ?>private/personal/photo/<?php e(US); ?>ref_album=0"><img src="<?php e(BASE_URL); ?>resource/img/icons/exclamation.gif" width="16" height="16" align="absmiddle" alt="&gt;" />&nbsp;<?php _e('Unfiled'); ?></a><br>
	<a href="mailto:<?php e(ATTACH_MAIL); ?>"><img src="<?php e(BASE_URL); ?>resource/img/icons/attach.gif" width="16" height="16" align="absmiddle" alt="&gt;" />&nbsp;<?php _e('Upload'); ?></a><br>
</font>


<form method="post" action="<?php e(HTTP_ACTION); ?>private/personal/photo/"><?php HTML::requires(); ?>
<?php if (empty($this->_vars['v_act_attach'])):?>
	<?php _e('Sorry, no results found.'); ?><br><br>
	<?php loadPlugin::callFunc('hitsuji_banner', POSITION_MOBILE); ?><br>
<?php else: ?>
<?php HTML::mobilePager($this->_vars['p_act_attach']); ?>
<?php if (!empty($this->_vars['album'])):?>
<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/images.gif" width="16" height="16" align="absmiddle" alt="&gt;">&nbsp;<?php e($this->_vars['album']['album']); ?></td></tr>
</table>
<?php endif; ?>

<table border="0" width="<?php Theme::exec()->mainWidth(); ?>">
	<tr>
<?php foreach ($this->_vars['v_act_attach'] as $num=>$_row): ?>
		<td align="center" bgcolor="<?php Theme::exec()->bgTitleColor(); ?>">
			<a href="<?php e(BASE_URL.$_row['origin']); ?>"><img src="<?php e(BASE_URL.$_row['v_small']); ?>" width="<?php e($_row['v_width']); ?>" height="<?php e($_row['v_height']); ?>" alt="attach<?php e($_row['id']); ?>"></a><br>
			<input type="radio" name="selected" value="<?php e($_row['id']); ?>">
		</td>
<?php if (($num % 3) == 2): ?></tr><tr><?php endif; ?>
<?php endforeach; ?>
	</tr>
</table>

<table border="0" width="<?php Theme::exec()->mainWidth(); ?>">
	<tr><td bgcolor="<?php Theme::exec()->bgTitleColor(); ?>" align="center">
		<input type="submit" name="select" value="<?php _e('Select'); ?>">
	</td></tr>
</table>
<?php HTML::mobilePager($this->_vars['p_act_attach']); ?>
<?php endif; ?>
</form>
<?php endif; ?>
