119 lines
7.9 KiB
PHP
119 lines
7.9 KiB
PHP
<?php
|
|
$width = "150";
|
|
$currUserNum = $_SESSION['UserInfo']['record_num'];
|
|
$unum = $currUserNum;
|
|
|
|
if (!isset($school_num)) exit();
|
|
if (!isset($base_school_num) || intval($base_school_num) == 0) $base_school_num = $school_num;
|
|
|
|
|
|
// 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) && $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>
|
|
<?php if (in_array($_SESSION['UserInfo']['type'],array('SuperUser','System Administrator','Application Administrator','Administration Team','Financial','Financial Team'))) { ?>
|
|
<li id="reports"><a href='?action=login-log'><?php echo($spanOn) ?>REPORTS<?php echo($spanOff) ?></a>
|
|
<ul>
|
|
<?php if (in_array($_SESSION['UserInfo']['type'],array('SuperUser','System Administrator','Application Administrator','Administration Team'))) { ?>
|
|
<li><a href='/?action=login-log'><?php displayLanguageText('TEXT-VIEW-LOGIN-LOG'); ?></a></li>
|
|
<li><a href='/?action=activity-log'><?php displayLanguageText('TEXT-VIEW-ACTIVITY-LOG'); ?></a></li>
|
|
<?php } ?>
|
|
<li><a href='/?action=user-account-report'><?php displayLanguageText('TEXT-USER-ACCOUNT-TRANSACTIONS'); ?></a></li>
|
|
<li><a href='/?action=user-account-list&show_modifier=balance-owing'><?php displayLanguageText('TEXT-USER-ACCOUNT-BALANCES'); ?></a></li>
|
|
<?php if ($school_record['paypal_enabled'] == 'Y' || strlen($school_record['paypal_code']) > 0) { ?>
|
|
<li><a href='/?action=user-account-paypal'><?php displayLanguageText('TEXT-PAYPAL-TRANSACTION-REPORT'); ?></a></li>
|
|
<li><a href='/?action=paypal-log'><?php displayLanguageText('TEXT-PAYPAL-LOG'); ?></a></li>
|
|
<?php } ?>
|
|
<li><a href='/?action=user-account-report&type=deleted'><?php displayLanguageText('TEXT-VIEW-DELETED-TRANSACTIONS'); ?></a></li>
|
|
<li><a href='/?action=user-account-payment-summary'><?php displayLanguageText('TEXT-PAYMENT-SUMMARY-REPORT'); ?></a></li>
|
|
<li><a href='/?action=user-account-transaction-summary'><?php displayLanguageText('TEXT-TRX-SUMMARY-REPORT'); ?></a></li>
|
|
<li><a href='/?action=order-payment-summary'><?php displayLanguageText('TEXT-SCHEDULE-PAYMENT-SUMMARY'); ?></a></li>
|
|
<li><a href='/?action=summary-print-totals'><?php displayLanguageText('TEXT-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'><?php displayLanguageText('TEXT-ACCOUNT-ORDERS-REPORT'); ?></a></li>
|
|
<?php if ($numSuppliers > 0) { ?>
|
|
<li><a href='/?action=suppliers-report'><?php displayLanguageText('TEXT-SUPPLIER-REPORT'); ?></a></li>
|
|
<li><a href='/?action=supplier-products-print'><?php displayLanguageText('TEXT-SUPPLIER-PRODUCTS-REPORT'); ?></a></li>
|
|
<li><a href='/?action=supplier-product-sales-print'><?php displayLanguageText('TEXT-SUPPLIER-PRODUCT-SALES-REPORT'); ?></a></li>
|
|
<?php } ?>
|
|
</ul>
|
|
</li>
|
|
<?php } ?>
|
|
<?php if (in_array($_SESSION['UserInfo']['type'],array('Financial Team'))) { ?>
|
|
<?php
|
|
// Get set of active schedules defined
|
|
$today = date("Y-m-d",time());
|
|
$now = date("Y-m-d H:i:00",time());
|
|
$query = "select * from hotlunch_schedules " .
|
|
"where school_num = $school_num " .
|
|
"and status not in ('Disabled','Deleted') " .
|
|
"and (schedule_end_date >= '$today' OR end_order_datetime >= '$now') " .
|
|
"order by $scheduleSortOrder";
|
|
$schedules = db_query($query);
|
|
?>
|
|
<?php if ($siteType != 'registration') { ?>
|
|
<li id="lunches"><a href='/?action=schedules&naction=list'><?php echo($spanOn) ?><?php displayLanguageText('MENUTAB-ORDERS'); ?><?php echo($spanOff) ?></a>
|
|
<?php } else { ?>
|
|
<li id="lunches"><a href='/?action=schedules&naction=list'><?php echo($spanOn) ?><?php displayLanguageText('MENUTAB-SCHEDLES'); ?><?php echo($spanOff) ?></a>
|
|
<?php } ?>
|
|
<?php
|
|
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");
|
|
}
|
|
?>
|
|
<?php } ?>
|
|
<?php if ($school_record['email_system'] == 'Y') { ?>
|
|
<li id="email"><a href='/?action=emails'><?php echo($spanOn) ?><?php displayLanguageText('TEXT-EMAIL-SYSTEM'); ?><?php echo($spanOff) ?></a>
|
|
<ul>
|
|
<li><a href='/?action=email-messages'><?php displayLanguageText('TEXT-EDIT-EMAIL-MESSAGES'); ?></a></li>
|
|
<li><a href='/?action=email-flag-recipients'><?php displayLanguageText('TEXT-FLAG-EMAIL-RECIPIENTS'); ?></a></li>
|
|
<li><a href='/?action=email-parents'><?php displayLanguageText('TEXT-SEND-EMAILS-TO-USERS'); ?></a></li>
|
|
<li><a href='/?action=email-logs'><?php displayLanguageText('TEXT-VIEW-EMAIL-LOG'); ?></a></li>
|
|
</ul>
|
|
</li>
|
|
<?php } ?>
|
|
<li id="help"><a href='/?action=view-faqs'><?php echo($spanOn) ?><?php displayLanguageText('MENUTAB-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'><?php displayLanguageText('TEXT-SUPPORT-POLICY'); ?></a></li>
|
|
<li><a href='/?action=view-faqs'><?php displayLanguageText('MENU-FAQS'); ?></a></li>
|
|
<li><a href='/?action=view-support-log'><?php displayLanguageText('MENU-SUPPORT'); ?></a></li>
|
|
<li><a href='view-doc.php?dn=<?php echo($parentInstructions) ?>'><?php displayLanguageText('TEXT-SAMPLE-PARENT-INSTRUCTIONS'); ?></a></li>
|
|
<li><a href='/?action=help-definitions-view'><?php displayLanguageText('TEXT-TERMS-AND-DEFINITIONS'); ?></a></li>
|
|
<li><a href='/?action=privacy-policy'><?php displayLanguageText('TEXT-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>
|