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

<?php if (empty($this->_vars['v_cal_schedule'])):?>
	<?php _e('Sorry, no results found.'); ?><br><br>
	<?php loadPlugin::callFunc('hitsuji_banner', POSITION_MOBILE); ?><br>
<?php else: ?>
	<?php HTML::mobilePager($this->_vars['p_cal_schedule']); ?>

<table border="0" width="<?php Theme::exec()->mainWidth(); ?>">
<?php foreach ($this->_vars['v_cal_schedule'] as $_row): ?>
	<tr><td bgcolor="<?php Theme::exec()->bgColor(); ?>"><font size="<?php Theme::exec()->fontSize(); ?>">
	<img src="<?php e(BASE_URL); ?>resource/img/icons/information.gif" width="16" height="16" alt="&gt;">&nbsp;<a href="<?php e(HTTP_ACTION); ?>member/schedule/view/<?php e($_row['id']); ?>/"><?php e($_row['schedule']); ?></a><br>
	<?php eDate($_row['start_date']); ?>&nbsp;
	<?php e(ifNull($_row['start_hour'], '--')); ?>:
	<?php e(ifNull($_row['start_minute'], '--')); ?>
	&nbsp;<?php _e(' to '); ?>&nbsp;<br>
	<?php eDate($_row['end_date']); ?>
	<?php e(ifNull($_row['start_hour'], '--')); ?>:
	<?php e(ifNull($_row['start_minute'], '--')); ?><br>
	<img src="<?php e(BASE_URL); ?>resource/img/icons/comment.gif" width="16" height="16" alt="&gt;">&nbsp;<a href="<?php e(HTTP_ACTION); ?>member/schedule/comments/<?php e($this->_vars['base']['member']['id']); ?>/<?php e($_row['id']); ?>/"><?php _e('Comments');?>&nbsp;(<?php e($_row['posts']); ?>)</a></font>
<?php if ($this->_vars['base']['account']['id'] == $_row['ref_account']): ?>
	<div align="right"><font size="<?php Theme::exec()->fontSize(); ?>"><img src="<?php e(BASE_URL); ?>resource/img/icons/date_edit.gif" width="16" height="16" alt="&gt;">&nbsp;<a href="<?php e(HTTP_ACTION); ?>private/post/schedule/<?php e($_row['id']); ?>/"><?php _e('Edit'); ?></a>&nbsp;/
	<img src="<?php e(BASE_URL); ?>resource/img/icons/trash.gif" width="16" height="16" alt="&gt;">&nbsp;<a href="<?php e(HTTP_ACTION); ?>private/post/schedule/<?php e($_row['id']); ?>/delete/"><?php _e('Delete'); ?></a></font></div>
<?php endif; ?>
	<hr color="<?php Theme::exec()->borderColor(); ?>" noshade="noshade"></td></tr>
<?php endforeach; ?>
</table>

<?php HTML::mobilePager($this->_vars['p_cal_schedule']); ?>
<?php endif; ?>
