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

<form method="post" action="<?php e($this->_vars['action']['url']); ?>"><?php HTML::requires(); ?>
<?php if ($this->_vars['action']['complete'] || $this->_vars['action']['deleted']): ?>
	<?php e($this->_vars['action']['complete']? _('Updated'):_('Deleted')); ?><br><br>
	<?php loadPlugin::callFunc('hitsuji_banner', POSITION_MOBILE); ?><br>
<?php elseif ($this->_vars['action']['confirm'] || $this->_vars['action']['delete']): ?>
<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/cog.gif" width="16" height="16" alt="&gt;">&nbsp;<?php _e('Gadget'); ?></td></tr>
	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Title'); ?>:<br></td></tr>
	<tr><td><?php e($this->_vars['act_gadget']['title']); ?><br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Position'); ?>:<br></td></tr>
	<tr><td><?php e($this->_vars['positions'][$this->_vars['act_gadget']['position']]); ?><br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Source or RSS'); ?>:<br></td></tr>
	<tr><td><textarea readonly="readonly" wrap="hard"><?php e($this->_vars['act_gadget']['source']); ?></textarea><br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColor(); ?>" align="center">
		<input type="submit" name="manip" value="<?php e($this->_vars['action']['confirm']? _('Submit'):_('Delete')); ?>">
		<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/cog.gif" width="16" height="16" alt="&gt;">&nbsp;<?php _e('Gadget'); ?></td></tr>
	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Title'); ?>:<br></td></tr>
	<tr><td>
		<?php if (!empty($this->_vars['alert']['title'])): ?><font color="<?php Theme::exec()->alertColor(); ?>"><?php _e('Please type.'); ?></font><br><?php endif; ?> 
		<input type="text" name="title" value="<?php e($this->_vars['act_gadget']['title']); ?>">
	<br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Position'); ?>:<br></td></tr>
	<tr><td>
		<?php if (!empty($this->_vars['alert']['reminder'])): ?><font color="<?php Theme::exec()->alertColor(); ?>"><?php _e('Please enter.'); ?></font><br><?php endif; ?>
		<?php HTML::radio('position', $this->_vars['positions'], $this->_vars['act_gadget']['position']); ?>
	<br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Source or RSS'); ?>:<br></td></tr>
	<tr><td>
		<?php if (!empty($this->_vars['alert']['source'])): ?><font color="<?php Theme::exec()->alertColor(); ?>"><?php _e('Please type.'); ?></font><br><?php endif; ?>
		<input class="check" type="radio" name="source" value=""><img src="<?php e(BASE_URL); ?>resource/img/icons/edit.gif" width="16" height="16" alt="&gt;">&nbsp;<?php _e('Text Area'); ?><br>
		<textarea name="source"><?php e($this->_vars['act_gadget']['source']); ?></textarea><br>

		<input class="check" type="radio" name="source" value="<?php e(HTTP_ACTION); ?>private/recent/blog/json/"><img src="<?php e(BASE_URL); ?>resource/img/icons/book_open.gif" width="16" height="16" alt="&gt;">&nbsp;<?php _e('Blog'); ?><br>
		<input class="check" type="radio" name="source" value="<?php e(HTTP_ACTION); ?>private/recent/comment/json/"><img src="<?php e(BASE_URL); ?>resource/img/icons/comment.gif" width="16" height="16" alt="&gt;">&nbsp;<?php _e('Comment'); ?><br>
		<input class="check" type="radio" name="source" value="<?php e(HTTP_ACTION); ?>private/recent/topic/json/"><img src="<?php e(BASE_URL); ?>resource/img/icons/bulletin.gif" width="16" height="16" alt="&gt;">&nbsp;<?php _e('Topic'); ?><br>
		<input class="check" type="radio" name="source" value="<?php e(HTTP_ACTION); ?>private/recent/event/json/"><img src="<?php e(BASE_URL); ?>resource/img/icons/event.gif" width="16" height="16" alt="&gt;">&nbsp;<?php _e('Event'); ?><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>
