<?php
/*
* ConPortal - Pomona College ITS scheduling appplication
* Copyright (C) 2005-2007 Pomona College and Bucknell University
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of version 2 of the GNU General Public License
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
// GOBBLE GOBBLE
require_once('standard.php');
xhtml_header('Shifts... all week long!');
menu("shifts");
echo "<h1 class='center'>View All Shifts For A Week</h1><br><br>";
//start computing weeks. Start with 8 weeks back
$startDate = strtotime("-8 weeks", strtotime("00:00:00"));
$d_o_w = date("w", $startDate);
//decrement because our week starts on Monday, not Sunday
$d_o_w --;
$startDate = strtotime("-{$d_o_w} days", $startDate);
$endDate = strtotime("+6 days", $startDate);
//echo date("D, j M", $startDate);
?>
<form method='post' action='week_view.php'><div><center>
Week of <select name='start_day' style='width: 20em'>
<?
for($i=0; $i<20;$i++)
{
?>
<option value='<?
echo $startDate;
?>'>
<? echo date("D, M jS", $startDate) . " to " . date("D, M jS", $endDate);
?> </option>
<?
$startDate = strtotime("+7 days",$startDate);
$endDate = strtotime("+7 days",$endDate);
}
?>
</select><br><br><br>
<input type='submit' value='Show Meeee!' />
</div></form><br><br>
<?
if(isset($_POST["start_day"]))
{
showWholeWeek($_POST["start_day"]);
}
xhtml_footer();
?>