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

<form method="post" action="<?php e($this->_vars['action']['url']); ?>"><?php HTML::requires(); ?>
<?php if ($this->_vars['action']['complete']): ?>
		<?php _e('Updated'); ?><br><br>
		<?php loadPlugin::callFunc('hitsuji_banner', POSITION_MOBILE); ?><br>
<?php elseif ($this->_vars['action']['confirm']): ?>
<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/group_edit.gif" width="16" height="16" alt="&gt;">&nbsp;<?php _e('Setting Community'); ?></td></tr>
	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Community Name'); ?>:<br></td></tr>
	<tr><td><?php e($this->_vars['com_community']['community']); ?><br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Category'); ?>:<br></td></tr>
	<tr><td><?php e($this->_vars['reference']['com_category'][$this->_vars['com_community']['ref_category']]); ?><br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Community Viewable'); ?>:<br></td></tr>
	<tr><td><?php e($this->_vars['visibility'][$this->_vars['com_community']['visibility']]); ?><br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Join Type'); ?>:<br></td></tr>
	<tr><td><?php e($this->_vars['involved'][$this->_vars['com_community']['involved']]); ?><br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Post a Topic'); ?>:<br></td></tr>
	<tr><td><?php e($this->_vars['permission'][$this->_vars['com_community']['topic_flag']]); ?><br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Post a Event'); ?>:<br></td></tr>
	<tr><td><?php e($this->_vars['permission'][$this->_vars['com_community']['event_flag']]); ?><br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Post a Article'); ?>:<br></td></tr>
	<tr><td><?php e($this->_vars['permission'][$this->_vars['com_community']['article_flag']]); ?><br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Region'); ?>:<br></td></tr>
	<tr><td><?php e($this->_vars['reference']['ara_region'][$this->_vars['com_community']['ref_region']]); ?><br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Comment'); ?>:<br></td></tr>
	<tr><td><?php HTML::htmlBody($this->_vars['com_community']['comment']); ?><br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColor(); ?>" align="center">
		<input type="submit" name="manip" value="<?php _e('Submit'); ?>">
		<input type="submit" name="<?php e($this->_vars['action']['goback']); ?>" value="<?php _e('Go back'); ?>">
	<br></td></tr>
</table>
<?php else: ?>
<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/group_edit.gif" width="16" height="16" alt="&gt;">&nbsp;<?php _e('Setting Community'); ?></td></tr>
	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Community Name'); ?>:<br></td></tr>
	<tr><td>
		<?php if (!empty($this->_vars['alert']['community'])): ?><font color="<?php Theme::exec()->alertColor(); ?>"><?php _e('Please enter.'); ?></font><br><?php endif; ?> 
		<input type="text" name="community" value="<?php e($this->_vars['com_community']['community']); ?>">
	<br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Category'); ?>:<br></td></tr>
	<tr><td>
		<?php if (!empty($this->_vars['alert']['ref_category'])): ?><font color="<?php Theme::exec()->alertColor(); ?>"><?php _e('Please select.'); ?></font><br><?php endif; ?>
		<select name="ref_category"><?php HTML::options($this->_vars['reference']['com_category'], $this->_vars['com_community']['ref_category']); ?></select>
	<br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Community Viewable'); ?>:<br></td></tr>
	<tr><td>
		<?php if (!empty($this->_vars['alert']['visibility'])): ?><font color="<?php Theme::exec()->alertColor(); ?>"><?php _e('Please select.'); ?></font><br><?php endif; ?>
		<?php HTML::radio('visibility', $this->_vars['visibility'], $this->_vars['com_community']['visibility']); ?>
	<br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Join Type'); ?>:<br></td></tr>
	<tr><td>
		<?php if (!empty($this->_vars['alert']['involved'])): ?><font color="<?php Theme::exec()->alertColor(); ?>"><?php _e('Please select.'); ?></font><br><?php endif; ?>
		<?php HTML::radio('involved', $this->_vars['involved'], $this->_vars['com_community']['involved']); ?>
	<br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Post a Topic'); ?>:<br></td></tr>
	<tr><td>
		<?php if (!empty($this->_vars['alert']['topic_flag'])): ?><font color="<?php Theme::exec()->alertColor(); ?>"><?php _e('Please select.'); ?></font><br><?php endif; ?>
		<?php HTML::radio('topic_flag', $this->_vars['permission'], $this->_vars['com_community']['topic_flag']); ?>
	<br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Post a Event'); ?>:<br></td></tr>
	<tr><td>
		<?php if (!empty($this->_vars['alert']['event_flag'])): ?><font color="<?php Theme::exec()->alertColor(); ?>"><?php _e('Please select.'); ?></font><br><?php endif; ?>
		<?php HTML::radio('event_flag', $this->_vars['permission'], $this->_vars['com_community']['event_flag']); ?>
	<br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Post a Article'); ?>:<br></td></tr>
	<tr><td>
		<?php if (!empty($this->_vars['alert']['article_flag'])): ?><font color="<?php Theme::exec()->alertColor(); ?>"><?php _e('Please select.'); ?></font><br><?php endif; ?>
		<?php HTML::radio('article_flag', $this->_vars['permission'], $this->_vars['com_community']['article_flag']); ?>
	<br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Region'); ?>:<br></td></tr>
	<tr><td>
		<?php if (!empty($this->_vars['alert']['ref_region'])): ?><font color="<?php Theme::exec()->alertColor(); ?>"><?php _e('Please select.'); ?></font><br><?php endif; ?>
		<select name="ref_region"><?php HTML::options($this->_vars['reference']['ara_region'], $this->_vars['com_community']['ref_region']); ?></select>
	<br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Comment'); ?>:<br></td></tr>
	<tr><td>
		<?php if (!empty($this->_vars['alert']['comment'])): ?><font color="<?php Theme::exec()->alertColor(); ?>"><?php _e('Please enter.'); ?></font><br><?php endif; ?>
		<?php HTML::mobileRichEditor('comment', $this->_vars['com_community']['comment'], _('Comment')); ?>
	<br></td></tr>
	<tr><td bgcolor="<?php Theme::exec()->bgColor(); ?>" align="center"><input type="submit" name="confirm" value="<?php _e('Confirm'); ?>"><br></td></tr>
</table>
<?php endif; ?>
</form>
