diff --git a/admin/schedule.php b/admin/schedule.php index f3936e1..2c34c8d 100644 --- a/admin/schedule.php +++ b/admin/schedule.php @@ -25,8 +25,24 @@ require("../common.inc.php"); require_once("../user.inc.php"); user_auth_required('committee', 'admin'); - if($_GET['date']) { - $date=$_GET['date']; + + $ROWHEIGHT=20; + $BORDERSIZE=2; + + if($_POST['date']) { + $date=$_POST['date']; + $starthour=$_POST['starthour']; + $endhour=$_POST['endhour']; + + //do some sanity checks + if($starthour<0 || $starthour>24) $starthour=7; + if($endhour<$starthour) + $endhour=$starthour+10; + if($endhour<0 || $endhour>24) $endhour=17; + + //minute increment + $increment=15; + if(!eregi("[0-9]{4}-[0-9]{2}-[0-9]{2}",$date)) { echo "Invalid date"; exit; @@ -48,9 +64,6 @@ foreach($locations AS $id=>$name) { echo "