<?php include VIEW_DIR.'mobile/common/menu/schedule.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 bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Visibility'); ?>:<br></td></tr>
	<tr><td><?php e($this->_vars['visibility'][$this->_vars['cal_schedule']['visibility']]); ?><br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Title'); ?>:<br></td></tr>
	<tr><td><?php e($this->_vars['cal_schedule']['schedule']); ?><br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Start Date'); ?>:<br></td></tr>
	<tr><td>
	    <?php eDate($this->_vars['cal_schedule']['start_date']); ?>&nbsp;
	    <?php e($this->_vars['cal_schedule']['start_hour']); ?>:
	    <?php e($this->_vars['cal_schedule']['start_minute']); ?>
	<br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('End Date'); ?>:<br></td></tr>
	<tr><td>
		<?php eDate($this->_vars['cal_schedule']['end_date']); ?>
		<?php e($this->_vars['cal_schedule']['start_hour']); ?>:
		<?php e($this->_vars['cal_schedule']['start_minute']); ?>
	<br></td></tr>

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

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Reminder'); ?>:<br></td></tr>
	<tr><td><?php e($this->_vars['reminders'][$this->_vars['cal_schedule']['reminder']]); ?><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 bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Visibility'); ?>:<br></td></tr>
	<tr><td>
		<select name="visibility"><?php HTML::options($this->_vars['visibility'], $this->_vars['cal_schedule']['visibility']); ?></select>
	<br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Title'); ?>:<br></td></tr>
	<tr><td>
		<?php if (!empty($this->_vars['alert']['schedule'])): ?><font color="<?php Theme::exec()->alertColor(); ?>"><?php _e('Please enter.'); ?></font><br><?php endif; ?>

		<input type="text" name="schedule" value="<?php e($this->_vars['cal_schedule']['schedule']); ?>">
	<br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Start Date'); ?>:<br></td></tr>
	<tr><td>
		<?php if (!empty($this->_vars['alert']['start_date'])): ?><font color="<?php Theme::exec()->alertColor(); ?>"><?php _e('Please select date.'); ?></font><br><?php endif; ?>
		<?php HTML::dateSelect('start_date', $this->_vars['cal_schedule']['start_date']); ?>&nbsp;
		<select name="start_hour"><option value="">--</option><?php HTML::options($this->_vars['hours'], $this->_vars['cal_schedule']['start_hour']); ?></select>:
		<select name="start_minute"><option value="">--</option><?php HTML::options($this->_vars['sixty'], $this->_vars['cal_schedule']['start_minute']); ?></select>
	<br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('End Date'); ?>:<br></td></tr>
	<tr><td>
		<?php if (!empty($this->_vars['alert']['end_date'])): ?><font color="<?php Theme::exec()->alertColor(); ?>"><?php _e('Please select date.'); ?></font><br><?php endif; ?>
		<?php HTML::dateSelect('end_date', $this->_vars['cal_schedule']['end_date']); ?>&nbsp;
		<select name="start_hour"><option value="">--</option><?php HTML::options($this->_vars['hours'], $this->_vars['cal_schedule']['start_hour']); ?></select>:
		<select name="start_minute"><option value="">--</option><?php HTML::options($this->_vars['sixty'], $this->_vars['cal_schedule']['start_minute']); ?></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; ?>
		<textarea name="comment"><?php e($this->_vars['cal_schedule']['comment']); ?></textarea>
	<br></td></tr>

	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Reminder'); ?>:<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('reminder', $this->_vars['reminders'], $this->_vars['cal_schedule']['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>
