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

<?php if (empty($this->_vars['event'])): ?>
	<?php _e('Sorry, no results found.'); ?><br><br>
	<?php loadPlugin::callFunc('hitsuji_banner', POSITION_MOBILE); ?><br>
<?php else : ?>
<table border="0" width="<?php Theme::exec()->mainWidth(); ?>">
	<tr><td align="center" bgcolor="<?php Theme::exec()->bgTitleColor(); ?>"><a href="<?php e(HTTP_ACTION); ?>community/event/view/<?php e($this->_vars['event']['id']); ?>/"><img src="<?php e(BASE_URL); ?>resource/img/icons/event.gif" width="16" height="16" alt="&gt;">&nbsp;<?php e($this->_vars['event']['event']); ?></a></td></tr>
	<tr><td bgcolor="<?php Theme::exec()->bgColor(); ?>">
		<font color="<?php Theme::exec()->columnColor(); ?>" size="<?php Theme::exec()->fontSize(); ?>"><?php _e('When'); ?>:</font>
		<font size="<?php Theme::exec()->fontSize(); ?>"><?php eDate($this->_vars['event']['start_date'], _('Y-m-d')); ?>
		<?php e($this->_vars['event']['start_hour']); ?>:
		<?php e($this->_vars['event']['start_minute']); ?><br></font>
		<font color="<?php Theme::exec()->columnColor(); ?>" size="<?php Theme::exec()->fontSize(); ?>"><?php _e('Where'); ?>:</font>
		<font size="<?php Theme::exec()->fontSize(); ?>"><?php HTML::reference('ara_region', $this->_vars['event']['ref_region']); ?><?php HTML::reference('ara_city', $this->_vars['event']['ref_city']); ?>
		<?php if (!empty($this->_vars['event']['locale'])): ?>(<?php e($this->_vars['event']['locale']); ?>)<?php endif; ?><br>
		<img src="<?php e(BASE_URL); ?>resource/img/icons/report.gif" width="16" height="16" alt="&gt;">&nbsp;<a href="<?php e(HTTP_ACTION); ?>community/event/reports/<?php e($this->_vars['base']['community']['id']); ?>/<?php e($this->_vars['event']['id']); ?>/"><?php _e('View Reports'); ?>&nbsp;(<?php e($this->_vars['event']['posts']); ?>)</a><br></font>
<?php if ($this->_vars['base']['account']['id'] == $this->_vars['event']['ref_author']): ?>
		<div align=""><font size="<?php Theme::exec()->fontSize(); ?>"><img src="<?php e(BASE_URL); ?>resource/img/icons/edit.gif" width="16" height="16" alt="&gt;">&nbsp;<a href="<?php e(HTTP_ACTION); ?>community/event/post/<?php e($this->_vars['base']['community']['id']); ?>/<?php e($this->_vars['event']['id']); ?>/"><?php _e('Edit'); ?></a>/
		<img src="<?php e(BASE_URL); ?>resource/img/icons/trash.gif" width="16" height="16" alt="&gt;">&nbsp;<a href="<?php e(HTTP_ACTION); ?>community/event/post/<?php e($this->_vars['base']['community']['id']); ?>/<?php e($this->_vars['event']['id']); ?>/delete/"><?php _e('Delete'); ?></a><br></font></div>
<?php endif; ?>
	</td></tr>
</table>
<hr color="<?php Theme::exec()->borderColor(); ?>" noshade="noshade">
<?php endif; ?>


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