<?php
/*
* ConPortal - Pomona College ITS scheduling appplication
* Copyright (C) 2005-2006 Pomona College
*
* 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
*/
require_once('standard.php');
$error = false;
if (isset($_POST['startYear']) && is_numeric($_POST['startYear']) &&
isset($_POST['startMonth']) && is_numeric($_POST['startMonth']) &&
isset($_POST['startDay']) && is_numeric($_POST['startDay']) &&
isset($_POST['endYear']) && is_numeric($_POST['endYear']) &&
isset($_POST['endMonth']) && is_numeric($_POST['endMonth']) &&
isset($_POST['endDay']) && is_numeric($_POST['endDay']))
{
//Check to make sure the supplied dates are valid
$startDate = mktime(0,0,0,$_POST['startMonth'],$_POST['startDay'],$_POST['startYear']);
if ($startDate == -1)
{
error('The specified start date is invalid');
}
$endDate = mktime(0,0,0,$_POST['endMonth'],$_POST['endDay'],$_POST['endYear']);
if ($endDate == -1)
{
error('The specified end date is invalid');
}
redirect_if_error();
xhtml_header_privileged('Expired Announcments', 'manage_announcements');
print_expired_announcements($startDate,$endDate);
xhtml_footer();
}
else
{
error("Required parameter missing...");
redirect_if_error();
}
?>