?>

<?php 
if ($this->_vars['act'] == 'inbox') {
    ?>
<h1 class="h">Viewing Inbox</h1>
<?php 
    if ($this->_vars['this_week'] == true) {
        ?>
	<div class="pm pm_header">Last Week</div>
	<?php 
        if (count((array) $this->_vars['this_week_arr'])) {
            foreach ((array) $this->_vars['this_week_arr'] as $this->_vars['pm']) {
                ?>
	<div class="<?php 
                echo tpl_function_cycle(array('values' => "pm,pm pm_alt"), $this);
                ?>
">
		sender: <?php 
                echo $this->_run_modifier($this->_vars['pm']['id'], 'getUserFromId', 'plugin', 1);
                ?>

	</div>
	<?php 
            }
        }
    }
    ?>
<!--<div class="pm pm_header">Last Week</div>
<div class="pm">Something something time control</div>
<div class="pm pm_alt">Something something time control</div>
        $this->_iCMS['Gba0d']['show'] = false;
    }
} else {
    $this->_iCMS['Gba0d']['total'] = 0;
}
if ($this->_iCMS['Gba0d']['show']) {
    for ($this->_iCMS['Gba0d']['index'] = $this->_iCMS['Gba0d']['start'], $this->_iCMS['Gba0d']['iteration'] = 1; $this->_iCMS['Gba0d']['iteration'] <= $this->_iCMS['Gba0d']['total']; $this->_iCMS['Gba0d']['index'] += $this->_iCMS['Gba0d']['step'], $this->_iCMS['Gba0d']['iteration']++) {
        $this->_iCMS['Gba0d']['rownum'] = $this->_iCMS['Gba0d']['iteration'];
        $this->_iCMS['Gba0d']['index_prev'] = $this->_iCMS['Gba0d']['index'] - $this->_iCMS['Gba0d']['step'];
        $this->_iCMS['Gba0d']['index_next'] = $this->_iCMS['Gba0d']['index'] + $this->_iCMS['Gba0d']['step'];
        $this->_iCMS['Gba0d']['first'] = $this->_iCMS['Gba0d']['iteration'] == 1;
        $this->_iCMS['Gba0d']['last'] = $this->_iCMS['Gba0d']['iteration'] == $this->_iCMS['Gba0d']['total'];
        $this->_vars['catalog'] = array_merge($this->_iCMS['_Gba0d'][$this->_iCMS['Gba0d']['index']], $this->_iCMS['Gba0d']);
        ?>
    <div class="<?php 
        echo tpl_function_cycle(array('values' => "col1,col2"), $this);
        ?>
">
      <div class="title">
        <h3><span><?php 
        echo $this->_vars['catalog']['name'];
        ?>
</span></h3>
      </div>
      <div class="newsA"> <?php 
        $this->_run_iCMS(array('loop' => 'true', 'sub' => "all", 'row' => "13", 'sortid' => $this->_vars['catalog']['id'], 'module' => "list"));
        if (isset($this->_iCMS['Gbf22'])) {
            unset($this->_iCMS['Gbf22']);
        }
        $this->_iCMS['Gbf22']['loop'] = is_array($this->_vars['list']) ? count($this->_vars['list']) : max(0, (int) $this->_vars['list']);
        $this->_iCMS['_Gbf22'] = $this->_vars['list'];
<h2 class="h">Slot listing for <?php 
echo $this->_vars['day'];
?>
</h2>
<hr />
<table>
	<tr class="header">
		<td>Time</td>
		<td>Slot</td>
	</tr>
	<?php 
if (count((array) $this->_vars['slotArr'])) {
    foreach ((array) $this->_vars['slotArr'] as $this->_vars['slot']) {
        ?>
	<tr class="<?php 
        echo tpl_function_cycle(array('values' => "timetable,timetable alt"), $this);
        ?>
">	
		<td><?php 
        echo $this->_vars['slot']['time'];
        ?>
</td>
		<?php 
        if ($this->_vars['slot']['isbooked'] == true) {
            ?>
			<!-- add permissions in here -->
			<td><a href="index.php?page=slotbook&amp;act=unbook&amp;slot=<?php 
            echo $this->_vars['slot']['timeslot'];
            ?>
&amp;day=<?php 
            echo $this->_vars['daynum'];