95 lines
4.9 KiB
PHP
95 lines
4.9 KiB
PHP
<?php
|
|
$width = "150";
|
|
$currUserNum = $_SESSION['UserInfo']['record_num'];
|
|
$unum = $currUserNum;
|
|
|
|
if (!isset($school_num)) exit();
|
|
if (!isset($base_school_num)) exit();
|
|
|
|
|
|
// Check for custom instruction document
|
|
include "parent-instructions.php";
|
|
|
|
|
|
$numPersonalStudents = db_getVal("SELECT count(*) FROM people WHERE school_num = $base_school_num AND people_type IN ('Student','Customer') AND user_num = $unum");
|
|
|
|
$numStudents = db_getVal("SELECT count(*) FROM people WHERE school_num = $base_school_num AND people_type IN ('Student','Customer')");
|
|
$numStaff = db_getVal("SELECT count(*) FROM people WHERE school_num = $base_school_num AND people_type IN ('Staff')");
|
|
$numSuppliers = db_getVal("SELECT count(*) FROM suppliers WHERE school_num = $school_num AND status = 'Active'");
|
|
$numAllergens = db_getVal("SELECT count(*) FROM allergens WHERE school_num = $base_school_num");
|
|
|
|
if (!isset($supplier_school_num)) $supplier_school_num = $school_num;
|
|
if ($school_num != $supplier_school_num) $numSuppliers = 0;
|
|
|
|
?>
|
|
<ul>
|
|
<li id="home"><a href='/?action=home'><?php echo($spanOn) ?><?php displayLanguageText('MENUTAB-HOME'); ?><?php echo($spanOff) ?></a>
|
|
<?php include "menu.submenus.php"; ?>
|
|
</li>
|
|
<li id="reports"><a href=''><?php echo($spanOn) ?>REPORTS<?php echo($spanOff) ?></a>
|
|
<ul>
|
|
<li><a href='/?action=login-log'>View Login Log</a></li>
|
|
<li><a href='/?action=summary-print-totals'>Annual Summary</a></li>
|
|
<li><a href='/?action=order-details-summary'><?php displayLanguageText('TEXT-ORDER-DETAILS-SUMMARY'); ?></a></li>
|
|
<li><a href='/student-list.print.php'>Account Orders Report</a></li>
|
|
</ul>
|
|
</li>
|
|
<?php if ($siteType != 'registration') { ?>
|
|
<li id="lunches"><a href='/?action=schedules&naction=list'><?php echo($spanOn) ?>ORDERS<?php echo($spanOff) ?></a>
|
|
<?php } else { ?>
|
|
<li id="lunches"><a href='/?action=schedules&naction=list'><?php echo($spanOn) ?>SCHEDULES<?php echo($spanOff) ?></a>
|
|
<?php } ?>
|
|
<ul>
|
|
<li><a href='/?action=schedules&naction=list'>Current Schedules</a>
|
|
<?php
|
|
// Get set of active schedules defined
|
|
$today = date("Y-m-d",time() - 60 * 60 * 24 * 2);
|
|
$now = date("Y-m-d H:i:00",time() - 60 * 60 * 24 * 2);
|
|
$query = "select * from hotlunch_schedules " .
|
|
"where school_num = $school_num " .
|
|
"and status in ('Pending','Active') " .
|
|
"and (schedule_end_date >= '$today' OR end_order_datetime >= '$today') " .
|
|
"order by $scheduleSortOrder";
|
|
$schedules = db_query($query);
|
|
if (db_num_rows($schedules)) {
|
|
echo(" <ul>\n");
|
|
$maxLength = 30;
|
|
while ($row = db_fetch_array($schedules)) {
|
|
$name = $row['schedule_name'];
|
|
if (strlen($name) > $maxLength) {
|
|
$words = explode(' ',$name);
|
|
$name = $words[0];
|
|
for ($i = 1; $i < count($words); $i++) {
|
|
if (strlen($name) + strlen($words[$i]) + 1 > $maxLength) break;
|
|
$name .= ' ' . $words[$i];
|
|
}
|
|
$name .= "...";
|
|
}
|
|
|
|
$snum = $row['record_num'];
|
|
echo(" <li><a href='/?action=schedule-reports&schedule_num=$snum'>$name</a></li>\n");
|
|
}
|
|
echo(" </ul>\n");
|
|
}
|
|
?>
|
|
</li>
|
|
<li><a href='/?action=manage-volunteers'>Manage Volunteers</a></li>
|
|
<li><a href='/?action=multi-menu-supplier-orders'>Multi-Menu Supplier Order</a></li>
|
|
<li><a href='/?action=multi-menu-supplier-csv'>Multi-Menu Supplier CSV</a></li>
|
|
</ul>
|
|
</li>
|
|
<li id="help"><a href='/?action=view-faqs'><?php echo($spanOn) ?>HELP<?php echo($spanOff) ?></a>
|
|
<ul>
|
|
<li><a href='/?action=view-how-to-guides'><?php displayLanguageText('TEXT-HOW-TO-GUIDES'); ?></a></li>
|
|
<li><a href='/?action=support-policy'>Support Policy</a></li>
|
|
<li><a href='/?action=view-faqs'>FAQ's</a></li>
|
|
<li><a href='/?action=view-support-log'>Support Requests</a></li>
|
|
<li><a href='view-doc.php?dn=<?php echo($parentInstructions) ?>'>Sample Parent Instructions</a></li>
|
|
<li><a href='/?action=help-definitions-view'>Terms and Definitions</a></li>
|
|
<li><a href='/?action=privacy-policy'>Privacy Policy</a></li>
|
|
</ul>
|
|
</li>
|
|
<li id="password"><a href='/?action=change-password'><?php echo($spanOn) ?><?php displayLanguageText('MENUTAB-PASSWORD'); ?><?php echo($spanOff) ?></a></li>
|
|
<li id="logout"><a href='/?action=logout'><?php echo($spanOn) ?><?php displayLanguageText('MENUTAB-LOGOUT'); ?><?php echo($spanOff) ?></a></li>
|
|
</ul>
|