\n");
$error_message = getLanguageText('ERRORMSG-ACCESS-DENIED');
include "form.messages.php";
return;
}
// Start the template and output buffering
startTemplate();
$templatePageTitle = getLanguageText('TEXT-GENERATE-MULTI-MENU-CSV');
$headerArgs = "";
//
// Process all actions to list and edit records
//
$naction = "";
if (array_key_exists('schedule_num',$_GET)) $schedule_num = intval($_GET['schedule_num']);
if (array_key_exists('schedule_num',$_POST)) $schedule_num = intval($_POST['schedule_num']);
if (!isset($schedule_num)) {
echo("
\n");
$error_message = getLanguageText('ERRORMSG-INVALID-SCHEDULE-NUM');
include "form.messages.php";
return;
}
// Check if this is a valid schedule
$query = "select * from hotlunch_schedules " .
"where school_num = $school_num " .
"and record_num = $schedule_num";
$results = db_query($query);
if (db_num_rows($results) == 0) {
echo("
\n");
$error_message = getLanguageText('ERRORMSG-INVALID-SCHEDULE');
include "form.messages.php";
return;
}
$hotlunch_schedule = db_fetch_array($results);
// If this is a ScheduleTeam user check if they have permission to access this schedule
if (in_array($_SESSION['UserInfo']['type'],array('Schedule Team','Schedule Volunteer'))) {
$userNum = $_SESSION['UserInfo']['record_num'];
$access = db_getVal("SELECT count(*) FROM hotlunch_schedules_people WHERE school_num = $school_num AND schedule_num = $schedule_num AND user_num = $userNum");
if (!$access || $access == 0) {
echo("
\n");
$error_message = getLanguageText('TEXT-NO-ACCESS-TO-SCHEDULE');
include "form.messages.php";
return;
}
}
include "hotlunch_reports.menu.php";
echo("
\n");
if (array_key_exists('naction',$_GET)) $naction = $_GET['naction'];
if (array_key_exists('naction',$_POST)) $naction = $_POST['naction'];
$school_num = $school_record['record_num'];
include "form.messages.php";
//
// Display the menu selection
//
?>