43 lines
1.2 KiB
PHP
43 lines
1.2 KiB
PHP
<?php
|
|
require_once("include/globals.php");
|
|
|
|
if (SessionActive() != 1 || ! UserLoggedIn()) {
|
|
header("Location: /");
|
|
exit();
|
|
}
|
|
|
|
|
|
//
|
|
// Process all actions to list and edit records
|
|
//
|
|
$CurrentTable = "payment_discounts";
|
|
$FormFile = "payment_discounts.dialog.php";
|
|
$DialogWidth = 500;
|
|
$TitleText = getLanguageText('TEXT-PAYMENT-DISCOUNTS');
|
|
$SequenceFlag = 'N';
|
|
$tableAction = "payment-discounts";
|
|
$RequiredFields = array('discount','start_date','end_date','discount_message');
|
|
$MaxRecords = 1;
|
|
|
|
|
|
// Start the template and output buffering
|
|
startTemplate();
|
|
$templatePageTitle = "$TitleText " . getLanguageText('TEXT-ADMINISTRATION');
|
|
|
|
|
|
// 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');
|
|
$action = '';
|
|
$naction = '';
|
|
header("Location: /?action=$action&naction=$naction&form_message=" . urlencode($form_message) . "&error_message=" . urlencode($error_message));
|
|
exit();
|
|
}
|
|
|
|
include "form.js.php";
|
|
|
|
endTemplate();
|
|
|
|
?>
|