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

<form method="post" action="<?php e(HTTP_ACTION); ?>private/attach/list/"><?php HTML::requires(); ?>
<?php if (empty($this->_vars['v_act_attach'])):?>
<?php if (!empty($this->_vars['album'])): ?>
	<div align="right"><font size="<?php Theme::exec()->fontSize(); ?>">
		<img src="<?php e(BASE_URL); ?>resource/img/icons/images_edit.gif" width="16" height="16" align="absmiddle" alt="&gt;">&nbsp;<a href="<?php e(HTTP_ACTION); ?>private/attach/album/<?php e($this->_vars['request']['ref_album']); ?>/"><?php _e('Edit'); ?></a><br>
		<img src="<?php e(BASE_URL); ?>resource/img/icons/trash.gif" width="16" height="16" align="absmiddle" alt="&gt;">&nbsp;<a href="<?php e(HTTP_ACTION); ?>private/attach/album/<?php e($this->_vars['request']['ref_album']); ?>/delete/"><?php _e('Delete'); ?></a><br>
		<img src="<?php e(BASE_URL); ?>resource/img/icons/eye.gif" width="16" height="16" align="absmiddle" alt="&gt;">&nbsp;<?php e($this->_vars['visibility'][$this->_vars['album']['visibility']]); ?></font><br>
	</div>
<?php endif; ?>
	<?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>
	<tr><td align="right" bgcolor="<?php Theme::exec()->bgTitleColor(); ?>"><font size="<?php Theme::exec()->fontSize(); ?>">
		<img src="<?php e(BASE_URL); ?>resource/img/icons/images_edit.gif" width="16" height="16" align="absmiddle" alt="&gt;">&nbsp;<a href="<?php e(HTTP_ACTION); ?>private/attach/album/<?php e($this->_vars['request']['ref_album']); ?>/"><?php _e('Edit'); ?></a>
		<img src="<?php e(BASE_URL); ?>resource/img/icons/trash.gif" width="16" height="16" align="absmiddle" alt="&gt;">&nbsp;<a href="<?php e(HTTP_ACTION); ?>private/attach/album/<?php e($this->_vars['request']['ref_album']); ?>/delete/"><?php _e('Delete'); ?></a>
		<img src="<?php e(BASE_URL); ?>resource/img/icons/eye.gif" width="16" height="16" align="absmiddle" alt="&gt;">&nbsp;<?php e($this->_vars['visibility'][$this->_vars['album']['visibility']]); ?></font>
	</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(); ?>">
		<select name="ref_album"><option value=""><?php _e('- Select One -'); ?></option><?php HTML::options($this->_vars['act_album']); ?></select>
		<input type="submit" name="manips" value="<?php _e('Move'); ?>">
	</td></tr><tr><td bgcolor="<?php Theme::exec()->bgTitleColor(); ?>">
		<input type="submit" name="delete" value="<?php _e('Delete'); ?>">
	</td></tr>
</table>
<?php HTML::mobilePager($this->_vars['p_act_attach']); ?>
<?php endif; ?>
</table>
</form>
