First Commit
This commit is contained in:
1 parent
5eb9dd037d
commit
2e62c0e60b
11877 files changed
+2035312
No files matched your search
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
require_once("include/globals.php");
|
||||
|
||||
if (SessionActive() != 1 || ! UserLoggedIn()) {
|
||||
header("Location: /");
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Process all actions to list and edit records
|
||||
//
|
||||
$CurrentTable = "suppliers";
|
||||
$FormFile = "suppliers.dialog.php";
|
||||
$JQueryFile = "suppliers.js.php";
|
||||
$DialogWidth = 850;
|
||||
$DialogHeight = 450;
|
||||
$TitleText = getLanguageText('TEXT-SUPPLIERS');
|
||||
$SequenceFlag = 'N';
|
||||
$tableAction = "suppliers-list";
|
||||
$RequiredFields = array('supplier_name','contact_name');
|
||||
|
||||
$CustomDialogFields = array(
|
||||
array('field_name' => 'supplier_password', 'default' => '', 'ftype' => 'form-data'),
|
||||
);
|
||||
|
||||
|
||||
// Ensure that only valid user types have access to this module
|
||||
$AllowedUserTypes = array('SuperUser','System Administrator','Application Administrator');
|
||||
if (checkPermission($AllowedUserTypes) != 1) {
|
||||
$error_message = getLanguageText('ERRORMSG-ACCESS-DENIED');
|
||||
include "form.messages.php";
|
||||
endTemplate();
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
// Start the template and output buffering
|
||||
startTemplate();
|
||||
$templatePageTitle = getLanguageText('TEXT-SUPPLIERS');
|
||||
$headerArgs = "";
|
||||
|
||||
|
||||
include "form.js.php";
|
||||
|
||||
?>
|
||||
<table cellpadding='4' cellspacing='2' border='0' align='right'>
|
||||
<tr>
|
||||
<td align='center'><a href='?action=suppliers-report' class='btn btn--primary btn--xsmall'><span><?php displayLanguageText('TEXT-SUPPLIER-REPORT'); ?></span></a></td>
|
||||
<td align='center'><a href='?action=supplier-products-print' class='btn btn--primary btn--xsmall'><span><?php displayLanguageText('TEXT-SUPPLIER-PRODUCTS-REPORT') ?></span></a></td>
|
||||
<td align='center'><a href='#' id='list-active-suppliers' class='btn btn--primary btn--xsmall'><span><?php displayLanguageText('TEXT-LIST-ACTIVE') ?></span></a></td>
|
||||
<td align='center'><a href='#' id='list-all-suppliers' class='btn btn--primary btn--xsmall'><span><?php displayLanguageText('TEXT-LIST-ALL') ?></span></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(document).on('click touch', '.edit-record', function() {
|
||||
var school_num = '<?php echo($school_num) ?>';
|
||||
var asnum = $(this).attr('asnum');
|
||||
if (school_num != asnum) {
|
||||
alert("<?php displayLanguageText('TEXT-EDIT-NOT-PERMITTED'); ?>");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click touch', '.delete-record', function() {
|
||||
var school_num = '<?php echo($school_num) ?>';
|
||||
var dflag = $(this).attr('dflag');
|
||||
var asnum = $(this).attr('asnum');
|
||||
if (dflag == 'N') {
|
||||
alert("<?php displayLanguageText('TEXT-DELETE-NOT-PERMITTED'); ?>");
|
||||
return false;
|
||||
}
|
||||
if (school_num != asnum) {
|
||||
alert("<?php displayLanguageText('TEXT-DELETE-NOT-PERMITTED'); ?>");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
endTemplate();
|
||||
?>
|
||||
Reference in new issue
Block a user