First Commit
This commit is contained in:
1 parent
5eb9dd037d
commit
2e62c0e60b
11877 files changed
+2035312
No files matched your search
@@ -0,0 +1,137 @@
|
||||
<?php
|
||||
require_once("include/globals.php");
|
||||
|
||||
if (SessionActive() != 1 || ! UserLoggedIn()) {
|
||||
// header("Location: /");
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
// Ensure that only valid user types have access to this module
|
||||
$AllowedUserTypes = array('SuperUser','System Administrator','Application Administrator','Application Volunteer','Schedule Volunteer','Administration Team','Schedule Team','Supplier','Financial Team','Schedule Reporting');
|
||||
if (checkPermission($AllowedUserTypes) != 1) {
|
||||
echo("<br>\n");
|
||||
$error_message = getLanguageText('ERRORMSG-ACCESS-DENIED');
|
||||
include "form.messages.php";
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$numSuppliers = db_getVal("SELECT count(*) FROM suppliers WHERE school_num = $supplier_school_num AND status = 'Active'");
|
||||
$supplierButtons = "";
|
||||
if ($numSuppliers == 0) $supplierButtons = " disabled";
|
||||
|
||||
?>
|
||||
<script language= "JavaScript">
|
||||
function setNextAction(next_action) {
|
||||
document.getElementById('next_form_action').value = next_action;
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
<table width='100%' cellpadding='0' cellspacing='1' class='summary-menu-buttons'>
|
||||
<tr>
|
||||
<?php if ($siteType == 'hotlunch' || $siteType == 'fundraising') { ?>
|
||||
<td align='center'><input type='submit' name='button' class='btn btn--primary btn--fixed' value="<?php displayLanguageText('TEXT-DELIVERY-REPORT'); ?>" onclick="setNextAction('delivery-report');"></td>
|
||||
<?php } else { ?>
|
||||
<td align='center'><input type='submit' name='button' class='btn btn--primary btn--fixed' value="<?php displayLanguageText('TEXT-ORDER-REPORT'); ?>" onclick="setNextAction('delivery-report');"></td>
|
||||
<?php } ?>
|
||||
<td align='center'><input type='submit' name='button' class='btn btn--primary btn--fixed' value="<?php echo($OrderDetailsText); ?>" onclick="setNextAction('order-details');"></td>
|
||||
<td align='center'><input type='submit' name='button' class='btn btn--primary btn--fixed' value="<?php displayLanguageText('TEXT-OPTION-DETAILS'); ?>" onclick="setNextAction('option-details');"></td>
|
||||
<td align='center'><input type='submit' name='button' class='btn btn--primary btn--fixed' value="<?php displayLanguageText('TEXT-ITEM-DETAILS-REPORT'); ?>" onclick="setNextAction('item-report');"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width='100%' cellpadding='0' cellspacing='1' class='summary-menu-buttons'>
|
||||
<tr>
|
||||
<td align='center'><input type='submit' name='button' class='btn btn--primary btn--fixed' value="<?php displayLanguageText('TEXT-SUPPLIER-ORDERS'); ?>" onclick="setNextAction('supplier-orders');"<?php echo($supplierButtons) ?>></td>
|
||||
<td align='center'><input type='submit' name='button' class='btn btn--primary btn--fixed' value="<?php displayLanguageText('TEXT-SUPPLIER-SUMMARY'); ?>" onclick="setNextAction('supplier-summary');"<?php echo($supplierButtons) ?>></td>
|
||||
<td align='center'><input type='submit' name='button' class='btn btn--primary btn--fixed' value="<?php displayLanguageText('TEXT-ITEM-LABELS'); ?>" onclick="setNextAction('item-labels');"></td>
|
||||
<td align='center'><input type='submit' name='button' class='btn btn--primary btn--fixed' value="<?php displayLanguageText('TEXT-ORDER-LABELS'); ?>" onclick="setNextAction('meal-labels');"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
$AllowedUserTypes = array('SuperUser','System Administrator','Application Administrator','Application Volunteer','Schedule Volunteer','Administration Team','Schedule Team','Supplier','Financial Team');
|
||||
if (checkPermission($AllowedUserTypes) == 1) {
|
||||
?>
|
||||
<table width='100%' cellpadding='0' cellspacing='1' class='summary-menu-buttons'>
|
||||
<tr>
|
||||
<td align='center'><input type='submit' name='button' class='btn btn--primary btn--fixed' value="<?php displayLanguageText('TEXT-PRICE-CATEGORY-REPORT'); ?>" onclick="setNextAction('price-category-report');"></td>
|
||||
<td align='center'><input type='submit' name='button' class='btn btn--primary btn--fixed' value="<?php displayLanguageText('TEXT-UPDATE-TOTALS'); ?>" onclick="setNextAction('update-totals');"></td>
|
||||
<td align='center'><input type='submit' name='button' class='btn btn--primary btn--fixed' value="<?php displayLanguageText('TEXT-PRINT-TOTALS'); ?>" onclick="setNextAction('print-totals');"></td>
|
||||
<td align='center'><input type='submit' name='button' class='btn btn--primary btn--fixed' value="<?php displayLanguageText('TEXT-MANAGE-VOLUNTEERS'); ?>" onclick="setNextAction('manage-volunteers');"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width='100%' cellpadding='0' cellspacing='1' class='summary-menu-buttons'>
|
||||
<tr>
|
||||
<td align='center'><input type='submit' name='button' class='btn btn--primary btn--fixed' value="<?php displayLanguageText('TEXT-SUPPLIER-ORDERS-SPREADSHEET'); ?>" onclick="setNextAction('supplier-orders-csv');"></td>
|
||||
<td align='center'><input type='submit' name='button' class='btn btn--primary btn--fixed' id='details-spreadsheet-btn' value="<?php displayLanguageText('TEXT-DETAILS-SPREADSHEET'); ?>" onclick="setNextAction('details-csv');"></td>
|
||||
<td align='center'><input type='submit' name='button' class='btn btn--primary btn--fixed' value="<?php displayLanguageText('TEXT-SUMMARY-SPREADSHEET'); ?>" onclick="setNextAction('summary-csv');"></td>
|
||||
<td align='center'><input type='submit' name='button' class='btn btn--primary btn--fixed' value="<?php displayLanguageText('TEXT-MENU-SUMMARY'); ?>" onclick="setNextAction('menu-summary-csv');"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width='100%' cellpadding='0' cellspacing='1' class='summary-menu-buttons'>
|
||||
<tr>
|
||||
<td align='center'><input type='submit' name='button' class='btn btn--primary btn--fixed' value="<?php displayLanguageText('TEXT-ORDER-DELETION'); ?>" onclick="setNextAction('order-deletion');"></td>
|
||||
<td align='center'><input type='submit' name='button' class='btn btn--primary btn--fixed' value="<?php displayLanguageText('TEXT-REVENUE-SPREADSHEET'); ?>" onclick="setNextAction('revenue-csv');"></td>
|
||||
<td align='center'><input type='submit' name='button' class='btn btn--primary btn--fixed' value="<?php displayLanguageText('TEXT-REVENUE-SUMMARY-SPREADSHEET'); ?>" onclick="setNextAction('revenue-summary-csv');"></td>
|
||||
<td align='center'><input type='submit' name='button' class='btn btn--primary btn--fixed' value="<?php displayLanguageText('TEXT-TOTALS-SPREADSHEET'); ?>" onclick="setNextAction('totals-csv');"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php } ?>
|
||||
<br>
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
<?php include "include/ajax.Setup.php"; ?>
|
||||
|
||||
$("#details-dialog").dialog({
|
||||
autoOpen: false,
|
||||
minWidth: 200,
|
||||
minHeight: 200,
|
||||
modal: true,
|
||||
position: { my: 'center', at: 'center' }
|
||||
});
|
||||
|
||||
$("#details-spreadsheet-btn").click(function() {
|
||||
$("#details-dialog").dialog('open');
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#details-by-student").click(function() {
|
||||
var schedule_num = <?php echo($schedule_num) ?>;
|
||||
var menu_num = $("#menu_num").val();
|
||||
|
||||
$("#details-dialog").dialog('close');
|
||||
location.href = '?action=menu-details&next_form_action=details-csv&schedule_num='+schedule_num+'&menu_num='+menu_num;
|
||||
});
|
||||
|
||||
$("#details-by-menu-item").click(function() {
|
||||
var schedule_num = <?php echo($schedule_num) ?>;
|
||||
var menu_num = $("#menu_num").val();
|
||||
|
||||
$("#details-dialog").dialog('close');
|
||||
location.href = '?action=menu-details&next_form_action=menu-items-details-csv&schedule_num='+schedule_num+'&menu_num='+menu_num;
|
||||
});
|
||||
|
||||
$("#price-variations").click(function() {
|
||||
var schedule_num = <?php echo($schedule_num) ?>;
|
||||
var menu_num = $("#menu_num").val();
|
||||
|
||||
$("#details-dialog").dialog('close');
|
||||
location.href = '?action=menu-details&next_form_action=menu-items-details-csv&mode=Variations&schedule_num='+schedule_num+'&menu_num='+menu_num;
|
||||
});
|
||||
|
||||
<?php include "hotlunch_schedules.js.php"; ?>
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<div id='details-dialog' title="<?php displayLanguageText('TEXT-DETAILS-SPREADSHEET'); ?>">
|
||||
<center>
|
||||
<p><button id='details-by-student' class='btn btn--outline btn--xsmall'><?php displayLanguageText('TEXT-ORDERS-BY-STUDENT'); ?></button></p>
|
||||
<p><button id='details-by-menu-item' class='btn btn--outline btn--xsmall'><?php displayLanguageText('TEXT-DETAILS-BY-MENU-ITEM-PRICE'); ?></button></p>
|
||||
<?php if ($school_record['implement_multiple_item_prices'] == 'Y' || $school_record['special_item_prices'] == 'Y') { ?>
|
||||
<p><button id='price-variations' class='btn btn--outline btn--xsmall'><?php displayLanguageText('TEXT-PRICE-VARIATION-CSV'); ?></button></p>
|
||||
<?php } ?>
|
||||
</center>
|
||||
</div>
|
||||
Reference in new issue
Block a user