First Commit
This commit is contained in:
1 parent
5eb9dd037d
commit
2e62c0e60b
11877 files changed
+2035312
No files matched your search
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
include "db.php";
|
||||
include "include/school-functions.php";
|
||||
|
||||
$school_num = readline("School Number: ");
|
||||
// $schedule_num = readline("Schedule Number: ");
|
||||
$menu_num = readline("Menu Number: ");
|
||||
// $menu_item_num = readline("Menu Item Number: ");
|
||||
|
||||
|
||||
$school_record = db_getVal("SELECT * FROM schools WHERE record_num = $school_num");
|
||||
|
||||
$query = "select ordered_by_type, ordered_by_num, menu_item_num, qty from hotlunch_order_items where school_num = $school_num and menu_num = $menu_num";
|
||||
$orders = db_query($query);
|
||||
|
||||
$Students = array();
|
||||
|
||||
while ($row = db_fetch_assoc($orders)) {
|
||||
extract($row);
|
||||
$student = db_getVal("SELECT * FROM people WHERE school_num = $base_school_num AND record_num = $ordered_by_num");
|
||||
if (!is_array($student)) {
|
||||
echo("$ordered_by_num: ERROR\n");
|
||||
}
|
||||
else {
|
||||
extract($student, EXTR_PREFIX_ALL, 's');
|
||||
$name = $s_first_name.' '.$s_last_name;
|
||||
$class_info = getClassInfo($s_class_num, 'internal');
|
||||
$Students["$s_last_name $s_first_name"] = "$ordered_by_num: $name - $class_info ($menu_item_num - $qty)";
|
||||
// echo("$ordered_by_num: $name\n");
|
||||
}
|
||||
}
|
||||
|
||||
ksort($Students);
|
||||
|
||||
$i = 1;
|
||||
foreach ($Students AS $idx => $name) {
|
||||
echo("$i - $name\n");
|
||||
$i++;
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user