<table border="0" width="<?php Theme::exec()->mainWidth(); ?>">
<tr><td width="46" bgcolor="<?php Theme::exec()->bgColor(); ?>" align="center"><a name="top"></a>
<?php loadPlugin::callFunc('hitsuji_profile', $this->_vars['base']['member']['id'], 'vSmall'); ?>
</td><td bgcolor="<?php Theme::exec()->bgColor(); ?>"><font size="<?php Theme::exec()->fontSize(); ?>">
<?php foreach ($this->_vars['albums'] as $_row): ?>
	<a href="<?php e(HTTP_ACTION); ?>private/attach/attach/module/<?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/attach/attach/module/<?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>
</td></tr></table>
<hr color="<?php Theme::exec()->borderColor(); ?>" noshade="noshade">

<form method="post" action="<?php e($this->_vars['goBack']); ?>"><?php HTML::requires(); ?>
<table border="0" width="<?php Theme::exec()->mainWidth(); ?>">
<?php if (!empty($this->_vars['appended'])):?>
	<tr><td bgcolor="<?php Theme::exec()->bgTitleColor(); ?>" align="center">
		<?php _e('Appended'); ?>
	</td></tr>
<?php endif; ?>
	<tr><td bgcolor="<?php Theme::exec()->bgTitleColor(); ?>" align="center">
		<input type="submit" name="again" value="<?php _e('Go back'); ?>">
	</td></tr>
</table>
</form>

<form method="post" action="<?php e(HTTP_ACTION); ?>private/attach/attach/module/"><?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="checkbox" 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="append" value="<?php _e('Attach'); ?>">
	</td></tr>
</table>
<?php HTML::mobilePager($this->_vars['p_act_attach']); ?>
<?php endif; ?>
</form>
