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

<table border="0" width="<?php Theme::exec()->mainWidth(); ?>">
	<tr><td bgcolor="<?php Theme::exec()->bgColor(); ?>" align="center">
		<img src="<?php e(BASE_URL); ?>resource/img/icons/picture.gif" width="16" height="16" alt="&gt;">&nbsp;<a href="<?php e(HTTP_ACTION);?>community/setting/photo/<?php e($this->_vars['base']['community']['id']); ?>/"><?php _e('Photo'); ?></a>
		<img src="<?php e(BASE_URL); ?>resource/img/icons/layout_content.gif" width="16" height="16" alt="&gt;">&nbsp;<a href="<?php e(HTTP_ACTION);?>community/setting/theme/<?php e($this->_vars['base']['community']['id']); ?>/"><?php _e('Theme Select'); ?></a>
	<br></td></tr>
</table>

<table border="0" width="<?php Theme::exec()->mainWidth(); ?>">
	<tr>
		<td style="text-align: center;"><font size="<?php Theme::exec()->fontSize(); ?>">
			<?php loadPlugin::callFunc('hitsuji_community', $this->_vars['base']['community']['id'], 'thumbnail'); ?>
<?php if (!empty($this->_vars['base']['community']['filename'])): ?>
			[&nbsp;<img src="<?php e(BASE_URL); ?>resource/img/icons/cross.gif" width="16" height="16" align="absmiddle" alt="X" />&nbsp;
			<a href="<?php e(HTTP_ACTION); ?>community/setting/photo/<?php e($this->_vars['base']['community']['id']); ?>/delete/<?php e(US); ?>_mpnnc=<?php e($this->_vars['base']['nonce']); ?>"><?php _e('Delete'); ?></a>&nbsp;]
<?php endif; ?></font>
		</td>
	</tr>
</table>



<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); ?>community/setting/photo/<?php e($this->_vars['base']['community']['id']); ?>/<?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); ?>community/setting/photo/<?php e($this->_vars['base']['community']['id']); ?>/<?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); ?>community/setting/photo/<?php e($this->_vars['base']['community']['id']); ?>/"><?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>
