118 lines
5.7 KiB
PHP
118 lines
5.7 KiB
PHP
<?php
|
|
|
|
if (SessionActive() != 1 || ! UserLoggedIn()) {
|
|
header("Location: /");
|
|
exit();
|
|
}
|
|
|
|
$width = "150";
|
|
|
|
// Check for custom instruction document
|
|
include "parent-instructions.php";
|
|
|
|
|
|
$currentStatus = $_SESSION['UserInfo']['status'];
|
|
$unum = $_SESSION['UserInfo']['record_num'];
|
|
|
|
|
|
// Determine if there are any photo galleries defined
|
|
$numGalleries = db_getVal("SELECT count(*) FROM photo_galleries WHERE school_num = $school_num AND active = 'Y'");
|
|
|
|
// Number of documents
|
|
$numDocuments = db_getVal("select count(*) from documents where school_num = $school_num");
|
|
|
|
?>
|
|
<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="orders"><a href='/?action=order-list'><?php echo($spanOn) ?><?php echo(strtoupper(getLanguageText('MENUTAB-SHOP'))) ?><?php echo($spanOff) ?></a>
|
|
<ul>
|
|
<li><a href='/?action=order-list'><?php echo($GlobalText['StudentOrders']) ?></a></li>
|
|
<li><a href='/?action=user-account'><?php displayLanguageText('MENU-ACCOUNT-TRX') ?></a></li>
|
|
<?php
|
|
$balance = db_getVal("select sum(transaction_amount) as balance from user_account where school_num = $school_num and user_num = $unum AND (deleted != 'Y' OR deleted IS NULL)");
|
|
if ($balance > 0 && $school_record['display_remittance_button'] == 'Y') {
|
|
?>
|
|
<li><a href='/?action=print-remittance-form'><?php displayLanguageText('MENU-REMITTANCE-FORM') ?></a></li>
|
|
<?php
|
|
}
|
|
|
|
if ($school_record['enable_volunteer_signup'] == 'Y') {
|
|
?>
|
|
<li><a href='/?action=volunteer-signup'><?php displayLanguageText('MENU-VOLUNTEER-SIGNUP') ?></a></li>
|
|
<?php } ?>
|
|
</ul>
|
|
</li>
|
|
<?php
|
|
// Check if there are tabs defined
|
|
if (db_tableExists("content_tabs")) {
|
|
$numTabs = db_getVal("SELECT count(*) FROM content_tabs WHERE school_num = $school_num");
|
|
|
|
$pwhere = "";
|
|
if (in_array($_SESSION['UserInfo']['type'],array('Parent','Guest','Staff'))) $pwhere = "AND public_page = 'Y'";
|
|
|
|
if ($numTabs && $school_record['implement_page_tabs'] == 'Y') {
|
|
// Get tabs
|
|
$tabs = db_query("SELECT * FROM content_tabs WHERE school_num = $school_num ORDER BY sequence LIMIT 0,5");
|
|
while ($row = db_fetch_assoc($tabs)) {
|
|
$tab_title = $row['tab_title'];
|
|
$tab_num = $row['record_num'];
|
|
|
|
$pages = db_query("SELECT * FROM formatted_content WHERE school_num = $school_num AND content_type = 'A' AND tab_num = $tab_num $pwhere ORDER BY sequence");
|
|
if (db_num_rows($pages)) {
|
|
echo(" <li id='additional'><a href='#'>$spanOn$tab_title$spanOff</a>\n");
|
|
echo(" <ul>\n");
|
|
|
|
while ($row = db_fetch_assoc($pages)) {
|
|
$rnum = $row['record_num'];
|
|
$title = $row['content_id'];
|
|
$link = $row['page_link'];
|
|
|
|
if (strlen($link) > 0) {
|
|
echo(" <li><a href='?$link'>$title</a></li>\n");
|
|
}
|
|
else {
|
|
echo(" <li><a href='?action=view-page&rnum=$rnum'>$title</a></li>\n");
|
|
}
|
|
}
|
|
|
|
echo(" </ul>\n");
|
|
echo(" </li>\n");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
?>
|
|
<?php if ($school_record['status'] != 'Linked') { ?>
|
|
<li id="account"><a href='/?action=account'><?php echo($spanOn) ?><?php displayLanguageText('MENUTAB-PROFILE') ?><?php echo($spanOff) ?></a>
|
|
<ul>
|
|
<li><a href='/?action=account'><?php displayLanguageText('MENU-VIEW-PROFILE') ?></a></li>
|
|
<li><a href='/?action=account&naction=edit'><?php displayLanguageText('MENU-EDIT-PROFILE') ?></a></li>
|
|
<?php if ($school_record['display_class_lists'] == 'Y' || $school_record['display_class_lists'] == 'A') { ?>
|
|
<li><a href='/?action=contacts'><?php displayLanguageText('MENU-CONTACT-INFO') ?></a></li>
|
|
<?php } ?>
|
|
<li><a href='/?action=students'><?php echo($GlobalText['ManageStudents']) ?></a></li>
|
|
<?php if ($school_record['allow_parents_to_edit_students'] != 'N') { ?>
|
|
<li><a href='/?action=students&naction=add'><?php echo($GlobalText['AddStudents']) ?></a></li>
|
|
<?php } ?>
|
|
<?php if ($school_record['enable_customers'] == 'Y') { ?>
|
|
<li><a href='/?action=customers'><?php displayLanguageText('TEXT-CUSTOMERS'); ?></a></li>
|
|
<?php } ?>
|
|
<li><a href='/?action=change-password'><?php displayLanguageText('TEXT-CHANGE-PASSWORD') ?></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 id="help"><a href='/?action=view-faqs'><?php displayLanguageText('MENU-FAQS') ?></a></li>
|
|
<?php if ($school_record['display_parent_instructions'] != 'N') { ?>
|
|
<li id="help"><a href='view-doc.php?dn=<?php echo($parentInstructions) ?>'>Parent Instruction Guide</a></li>
|
|
<?php } ?>
|
|
<li><a href='/?action=support-request'><?php displayLanguageText('MENU-SUPPORT') ?></a></li>
|
|
<li><a href='/?action=privacy-policy'>Privacy Policy</a></li>
|
|
</ul>
|
|
</li>
|
|
<li id="logout"><a href='/?action=logout'><?php echo($spanOn) ?><?php displayLanguageText('MENUTAB-LOGOUT') ?><?php echo($spanOff) ?></a></li>
|
|
</ul>
|