X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-list_bank_package.php;h=66b701da9a55a08a3889c026fc4b5c80454bf901;hp=144b4142fdebecd1e7a37b40cf188a7636749a60;hb=57227d33e870ec5cd271209c4a978a52b45c2dd6;hpb=5071030af40e69ca4284642f44758964e18f5be8 diff --git a/inc/modules/admin/what-list_bank_package.php b/inc/modules/admin/what-list_bank_package.php index 144b4142fd..66b701da9a 100644 --- a/inc/modules/admin/what-list_bank_package.php +++ b/inc/modules/admin/what-list_bank_package.php @@ -1,7 +1,7 @@ 0)) { +if ((isPostRequestParameterSet('id')) && (is_array(postRequestParameter('id'))) && (count(postRequestParameter('id')) > 0)) { // Okay, which button was pressed? - if (REQUEST_ISSET_POST('change')) { + if (isPostRequestParameterSet('change')) { // Change permissions - ADMIN_CHANGE_ACTIVATION_STATUS(REQUEST_POST('id'), 'bank_packages', 'package_active'); - } elseif (REQUEST_ISSET_POST('edit')) { + adminChangeActivationStatus(postRequestParameter('id'), 'bank_packages', 'package_active'); + } elseif (isPostRequestParameterSet('edit')) { // Delete entries (with confirmation) - ADMIN_EDIT_ENTRIES_CONFIRM( - REQUEST_POST('id'), + adminEditEntriesConfirm( + postRequestParameter('id'), 'bank_packages', - array('id', 'title', 'description', 'account_fee', 'free_transfers', 'transfer_fee', 'output_system_mode', 'package_active', 'free_months_no_fee', 'interest_plus', 'interest_minus', 'first_payment', 'free_account_income', 'free_account_stuff', 'tan_lock'), - array('bigintval', '', '', 'translateComma', 'bigintval', 'translateComma', '', '', 'bigintval', 'translateComma', 'translateComma', 'translateComma', 'translateComma', '', 'bigintval'), - array('', '', '', '', '', '', '', '', '', '', '', '', '', '', '') + array('id', 'title', 'description', 'account_fee', 'free_transfers', 'transfer_fee', 'output_system_mode', 'package_active', 'free_months_no_fee', 'interest_plus', 'interest_minus', 'first_payment', 'free_account_income', 'free_account_stuff', 'tan_lock'), + array('bigintval', '', '', 'translateComma', 'bigintval', 'translateComma', '', '', 'bigintval', 'translateComma', 'translateComma', 'translateComma', 'translateComma', '', 'bigintval'), + array('', '', '', '', '', '', '', '', '', '', '', '', '', '', '') ); $show = false; - } elseif (REQUEST_ISSET_POST(('do_edit'))) { + } elseif (isPostRequestParameterSet('do_edit')) { // Delete entries (with confirmation) - ADMIN_EDIT_ENTRIES_CONFIRM(REQUEST_POST('id'), 'bank_packages', array(), array(), array(), true); - } elseif (REQUEST_ISSET_POST('delete')) { + adminEditEntriesConfirm(postRequestParameter('id'), 'bank_packages', array(), array(), array(), true); + } elseif (isPostRequestParameterSet('delete')) { // Delete entries (with confirmation) - ADMIN_DELETE_ENTRIES_CONFIRM(REQUEST_POST('id'), 'bank_packages', array('id', 'title', 'description', 'account_fee'), array('bigintval', '', '', 'translateComma'), array('', '', '', '')); + adminDeleteEntriesConfirm(postRequestParameter('id'), 'bank_packages', array('id', 'title', 'description', 'account_fee'), array('bigintval', '', '', 'translateComma'), array('', '', '', '')); $show = false; - } elseif (REQUEST_ISSET_POST('remove')) { + } elseif (isPostRequestParameterSet('remove')) { // Delete entries (with confirmation) - ADMIN_DELETE_ENTRIES_CONFIRM(REQUEST_POST('id'), 'bank_packages', array(), array(), array(), true); + adminDeleteEntriesConfirm(postRequestParameter('id'), 'bank_packages', array(), array(), array(), true); } } // END - if // Skip showing old entries? -if (!$show) return; +if ($show === false) return; // Load all banking packages from DB $result = SQL_QUERY("SELECT id, title, description, account_fee AS 'fee', package_active AS 'active', interest_plus AS 'plus', interest_minus AS 'minus' -FROM `{!_MYSQL_PREFIX!}_bank_packages` +FROM `{?_MYSQL_PREFIX?}_bank_packages` ORDER BY `id`", __FILE__, __LINE__); // Is there at lease one package? @@ -96,18 +95,15 @@ if (SQL_NUMROWS($result) > 0) { $content['sw'] = $SW; // Load row template - $OUT .= LOAD_TEMPLATE('admin_list_bank_package_row', true, $content); + $OUT .= loadTemplate('admin_list_bank_package_row', true, $content); $SW = 3 - $SW; } // END - while - // Prepare row(s) for output to template - define('__BANK_PACKAGE_ROWS', $OUT); - // Load main template - LOAD_TEMPLATE('admin_list_bank_package'); + loadTemplate('admin_list_bank_package', false, $OUT); } else { // No packages found! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_BANK_NO_PACKAGES_FOUND')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_BANK_NO_PACKAGES_FOUND')); } // Free the result