103 lines
6.3 KiB
PHP
103 lines
6.3 KiB
PHP
<?php
|
|
require_once("include/globals.php");
|
|
|
|
if (SessionActive() != 1 || ! UserLoggedIn()) {
|
|
header("Location: /");
|
|
exit();
|
|
}
|
|
|
|
|
|
$numStaff = db_getVal("SELECT count(*) FROM users WHERE school_num = $base_school_num AND type = 'Staff'");
|
|
$numParents = db_getVal("SELECT count(*) FROM users WHERE school_num = $base_school_num AND type = 'Parent'");
|
|
$numGuests = db_getVal("SELECT count(*) FROM users WHERE school_num = $base_school_num AND type = 'Guest'");
|
|
$numSuppliers = db_getVal("SELECT count(*) FROM users WHERE school_num = $base_school_num AND type = 'Supplier'");
|
|
|
|
?>
|
|
<table cellspacing='1' cellpadding='1' border='0'>
|
|
<?php if (strpos($action,'users') !== FALSE) { ?>
|
|
<tr>
|
|
<td align='center'>
|
|
<table cellspacing='1' cellpadding='1' border='0'>
|
|
<tr>
|
|
<?php if ($school_record['status'] != 'Linked') { ?>
|
|
<td align='center'><a href='#' id='add-user' class='btn btn--outline btn--xsmall'><?php displayLanguageText('TEXT-ADD-NEW'); ?></a></td>
|
|
<?php } ?>
|
|
<td align='center'><a href='#' id='view-all-users' class='btn btn--outline btn--xsmall'><?php displayLanguageText('TEXT-VIEW-ALL'); ?></a></td>
|
|
<td align='center'><a href='#' id='view-admin-users' class='btn btn--outline btn--xsmall'><?php displayLanguageText('TEXT-ADMIN-USERS'); ?></a></td>
|
|
<?php if ($numStaff > 0) { ?>
|
|
<td align='center'><a href='#' id='view-staff-users' class='btn btn--outline btn--xsmall'><?php echo($school_record['group_leaders']) ?></a></td>
|
|
<?php } ?>
|
|
<?php if ($numParents > 0) { ?>
|
|
<td align='center'><a href='#' id='view-parent-users' class='btn btn--outline btn--xsmall'><?php echo($school_record['registrants_are']) ?></a></td>
|
|
<?php } ?>
|
|
<?php if ($numGuests > 0) { ?>
|
|
<td align='center'><a href='#' id='view-guest-users' class='btn btn--outline btn--xsmall'><?php displayLanguageText('TEXT-GUESTS'); ?></a></td>
|
|
<?php } ?>
|
|
<?php if ($numSuppliers > 0) { ?>
|
|
<td align='center'><a href='#' id='view-supplier-users' class='btn btn--outline btn--xsmall'><?php displayLanguageText('TEXT-SUPPLIERS'); ?></a></td>
|
|
<?php } ?>
|
|
<td align='center'><a href='?action=users-csv' class='btn btn--outline btn--xsmall'><?php displayLanguageText('TEXT-USER-CSV'); ?></a></td>
|
|
<td align='center'><a href='#' id='clear-screen' class='btn btn--outline btn--xsmall'><?php displayLanguageText('TEXT-CLEAR-SCREEN'); ?></a></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align='center'>
|
|
<table cellspacing='1' cellpadding='1' border='0'>
|
|
<tr>
|
|
<td align='center'><a href='#' id='view-users-first-name-sort' class='btn btn--outline btn--xsmall'><?php displayLanguageText('TEXT-ORDER-BY-FIRST-NAME'); ?></a></td>
|
|
<td align='center'><a href='#' id='view-users-last-name-sort' class='btn btn--outline btn--xsmall'><?php displayLanguageText('TEXT-ORDER-BY-LAST-NAME'); ?></a></td>
|
|
<!-- <td align='center'><a href='#' id='view-users-email-sort' class='btn btn--outline btn--xsmall'><?php displayLanguageText('TEXT-ORDER-BY-EMAIL'); ?></a></td> -->
|
|
<td align='center'><a href='#' id='view-users-user-id-sort' class='btn btn--outline btn--xsmall'><?php displayLanguageText('TEXT-ORDER-BY-USER-ID'); ?></a></td>
|
|
<td align='center'><a href='#' id='view-users-no-email' class='btn btn--outline btn--xsmall'><?php displayLanguageText('TEXT-NO-EMAIL'); ?></a></td>
|
|
<?php if ($school_record['registration_volunteer_list'] == 'Y') { ?>
|
|
<td align='center'><a href='#' id='view-users-volunteers' class='btn btn--outline btn--xsmall'><?php displayLanguageText('TEXT-VOLUNTEERS'); ?></a></td>
|
|
<?php } ?>
|
|
<?php if ($siteType == 'hotlunch' || $siteType == 'fundraising' || $siteType == 'schoolfees') { ?>
|
|
<td align='center'><a href='#' id='view-users-no-students' class='btn btn--outline btn--xsmall'><?php displayLanguageText('TEXT-NO-STUDENTS'); ?></a></td>
|
|
<td align='center'><a href='#' id='users-merge-accounts' class='btn btn--outline btn--xsmall'><?php displayLanguageText('TEXT-MERGE-USER-ACCOUNTS'); ?></a></td>
|
|
<?php } ?>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<?php } ?>
|
|
<tr>
|
|
<td align='center'>
|
|
<table cellspacing='1' cellpadding='1' border='0'>
|
|
<tr>
|
|
<td align='center'><a href='#' id='view-users-balance-owing' class='btn btn--outline btn--xsmall'><?php displayLanguageText('TEXT-BALANCE-OWING'); ?></a></td>
|
|
<td align='center'><a href='#' id='view-users-balance-payable' class='btn btn--outline btn--xsmall'><?php displayLanguageText('TEXT-BALANCE-PAYABLE'); ?></a></td>
|
|
<td align='center'><a href='#' id='view-users-balance-print' class='btn btn--outline btn--xsmall'><?php displayLanguageText('TEXT-PRINT-BALANCES'); ?></a></td>
|
|
<td align='center'><a href='#' id='view-users-balance-details-print' class='btn btn--outline btn--xsmall'><?php displayLanguageText('TEXT-DETAILS-REPORT'); ?></a></td>
|
|
<td align='center'><a href='#' id='view-users-balance-csv' class='btn btn--outline btn--xsmall'><?php displayLanguageText('TEXT-BALANCES-CSV'); ?></a></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<?php if (strpos($action,'users') !== FALSE) { ?>
|
|
<tr>
|
|
<td align='center'>
|
|
<table cellspacing='1' cellpadding='1' border='0'>
|
|
<tr>
|
|
<td align='center'><a href='' id='block-from-ordering' class='btn btn--outline btn--xsmall'><?php displayLanguageText('TEXT-BLOCK-FROM-ORDERING'); ?></a></td>
|
|
<td align='center'><a href='' id='clear-for-ordering' class='btn btn--outline btn--xsmall'><?php displayLanguageText('TEXT-CLEAR-FOR-ORDERING'); ?></a></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<?php } ?>
|
|
</table>
|
|
<br>
|
|
<table cellpadding=5 style='background-color: #f8f8f8; border: 1px solid #404040;'>
|
|
<tr>
|
|
<td align='left'>
|
|
<b><label for='user-search-field'><?php displayLanguageText('TEXT-USER-SEARCH'); ?></label>:</b><br>
|
|
<input type='text' name='user-search-field' id='user-search-field' size='40' class="form-field form-search-field text ui-widget-content ui-corner-all">
|
|
<button id='view-matching-users' class='btn btn--outline btn--xsmall'><?php displayLanguageText('TEXT-VIEW-USERS'); ?></button>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|