Files
HotLunches/hotlunch_menu_details.line.php
T
2026-10-19 15:22:52 -07:00

42 lines
1.4 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');
if (checkPermission($AllowedUserTypes) != 1) {
echo("<br>\n");
$error_message = getLanguageText('ERRORMSG-ACCESS-DENIED');
include "form.messages.php";
return;
}
?>
<tr>
<td align='left' class='<?php echo($bgclass) ?>'><?php echo($name) ?></td>
<?php
for ($i = 0; $i < count($menu_items); $i++) {
$num = $menu_items[$i]['num'];
$query = "select qty from hotlunch_order_items " .
"where school_num = $school_num " .
"and ordered_by_num = $teacher_num " .
"and ordered_by_type = 'Staff' " .
"and schedule_num = $schedule_num " .
"and menu_num = $menu_num " .
"and menu_item_num = $num " .
"and active != 'N'";
$qty = db_getVal($query);
$menu_items[$i]['total'] += $qty;
$menu_items[$i]['grandtotal'] += $qty;
echo(" <td width='$width' class='$bgclass' align='center' valign='top'>$qty</td>\n");
}
?>
</tr>
<?php