102 lines
4.1 KiB
PHP
102 lines
4.1 KiB
PHP
<?php
|
|
require_once("include/globals.php");
|
|
|
|
if (SessionActive() != 1 || ! UserLoggedIn()) {
|
|
header("Location: /");
|
|
exit();
|
|
}
|
|
|
|
|
|
// Ensure that only valid user types have access to this module
|
|
$AllowedUserTypes = array('SuperUser','System Administrator','Application Administrator','Application Volunteer','Schedule Volunteer','Administration Team','Schedule Team','Supplier');
|
|
if (checkPermission($AllowedUserTypes) != 1) {
|
|
echo("<br>\n");
|
|
$error_message = getLanguageText('ERRORMSG-ACCESS-DENIED');
|
|
include "form.messages.php";
|
|
return;
|
|
}
|
|
|
|
|
|
// Get schedule record
|
|
$results = db_query("SELECT * FROM hotlunch_schedules WHERE school_num = $school_num AND record_num = $schedule_num");
|
|
$hotlunch_schedule = db_fetch_array($results);
|
|
|
|
$title_cols = 40;
|
|
|
|
?>
|
|
<br>
|
|
<form method='post' action='/'>
|
|
<?php
|
|
$message_width = $default_form_width;
|
|
include "form.messages.php";
|
|
?>
|
|
<table class='content-table'>
|
|
<tr>
|
|
<td align='center' class='heading'><?php displayLanguageText('MANAGE-MENU-TITLES'); ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td align='center'>
|
|
<table cellpadding='1' cellspacing='1' border='0'>
|
|
<tr>
|
|
<td class='success' align='left' valign='top'><?php displayLanguageText('TEXT-MENU-TITLE'); ?>: </td>
|
|
<?php if ($siteType == 'hotlunch' || $siteType == 'fundraising') { ?>
|
|
<td class='success' align='left' valign='top'><?php displayLanguageText('TEXT-MENU-DATE'); ?></td>
|
|
<?php if ($hotlunch_schedule['custom_menu_end_dates'] == 'Y') { ?>
|
|
<td class='success' align='left' valign='top'><?php displayLanguageText('TEXT-ORDERING-END-DATE'); ?></td>
|
|
<?php } ?>
|
|
<td class='success' align='center' valign='top'><?php displayLanguageText('TEXT-MENU-LINK'); ?></td>
|
|
<td class='success' align='center' valign='top'><?php displayLanguageText('TEXT-MAX-VOLUNTEERS'); ?></td>
|
|
<?php } ?>
|
|
</tr>
|
|
<?php
|
|
$results = db_query("SELECT * FROM hotlunch_menu_dates WHERE school_num = $school_num AND schedule_num = $schedule_num ORDER BY sequence,menu_date");
|
|
while ($row = db_fetch_array($results)) {
|
|
$menu_title = $row['menu_title'];
|
|
$menu_date = $row['menu_date'];
|
|
$menu_end_order_datetime = substr($row['menu_end_order_datetime'],0,16);
|
|
$menu_link = $row['menu_link'];
|
|
$max_volunteers = $row['max_volunteers'];
|
|
$record_num = $row['record_num'];
|
|
?>
|
|
<tr>
|
|
<td align='left' class='oitem'><input type='text' name='title_<?php echo($record_num) ?>' value="<?php echo($menu_title) ?>" size='<?php echo($title_cols) ?>'></td>
|
|
<?php if ($siteType == 'hotlunch' || $siteType == 'fundraising') { ?>
|
|
<td align='left' class='oitem'><input type='text' name='date_<?php echo($record_num) ?>' id='date_<?php echo($record_num) ?>' value="<?php echo($menu_date) ?>" size='12' class='date-field'></td>
|
|
<?php if ($hotlunch_schedule['custom_menu_end_dates'] == 'Y') { ?>
|
|
<td align='left' class='oitem'><input type='text' name='end_date_<?php echo($record_num) ?>' id='end_date_<?php echo($record_num) ?>' value="<?php echo($menu_end_order_datetime) ?>" size='20' class='datetime-field'></td>
|
|
<?php } ?>
|
|
<td align='center' class='oitem'>
|
|
<?php
|
|
if ($menu_link == 'No' || $menu_link == '') {
|
|
echo(getLanguageText('TEXT-NOT-LINKED')."</td>\n");
|
|
}
|
|
else {
|
|
?>
|
|
<select name='menu_link_<?php echo($record_num) ?>'>
|
|
<?php BuildFileList("menu_linking.txt",$menu_link) ?>
|
|
</select>
|
|
</td>
|
|
<?php } ?>
|
|
<td align='center' class='oitem'><input type='text' name='max_<?php echo($record_num) ?>' value='<?php echo($max_volunteers) ?>' size='3' style='text-align: right;'></td>
|
|
<?php } ?>
|
|
</tr>
|
|
<?php
|
|
}
|
|
?>
|
|
</table>
|
|
</td></tr></table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align='center'>
|
|
<input type='submit' class='btn btn--primary' value="<?php displayLanguageText('BUTTON-UPDATE-DATES'); ?>">
|
|
<input type='hidden' name='action' value='menu-dates'>
|
|
<input type='hidden' name='naction' value='manage-update'>
|
|
<input type='hidden' name='schedule_num' value='<?php echo($schedule_num) ?>'>
|
|
<br>
|
|
<br>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|