X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-list_bank_package.php;h=e388fc0ccc2dd01c594005194b5d3e7d3953984c;hb=98b92ea5ba992a63304091fa1b57f477befffc22;hp=66b701da9a55a08a3889c026fc4b5c80454bf901;hpb=57227d33e870ec5cd271209c4a978a52b45c2dd6;p=mailer.git diff --git a/inc/modules/admin/what-list_bank_package.php b/inc/modules/admin/what-list_bank_package.php index 66b701da9a..e388fc0ccc 100644 --- a/inc/modules/admin/what-list_bank_package.php +++ b/inc/modules/admin/what-list_bank_package.php @@ -18,6 +18,7 @@ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * + * Copyright (c) 2009, 2010 by Mailer Developer Team * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -48,10 +49,10 @@ addMenuDescription('admin', __FILE__); $show = true; if ((isPostRequestParameterSet('id')) && (is_array(postRequestParameter('id'))) && (count(postRequestParameter('id')) > 0)) { // Okay, which button was pressed? - if (isPostRequestParameterSet('change')) { + if (isFormSent('change')) { // Change permissions adminChangeActivationStatus(postRequestParameter('id'), 'bank_packages', 'package_active'); - } elseif (isPostRequestParameterSet('edit')) { + } elseif (isFormSent('edit')) { // Delete entries (with confirmation) adminEditEntriesConfirm( postRequestParameter('id'), @@ -68,7 +69,7 @@ if ((isPostRequestParameterSet('id')) && (is_array(postRequestParameter('id'))) // Delete entries (with confirmation) adminDeleteEntriesConfirm(postRequestParameter('id'), 'bank_packages', array('id', 'title', 'description', 'account_fee'), array('bigintval', '', '', 'translateComma'), array('', '', '', '')); $show = false; - } elseif (isPostRequestParameterSet('remove')) { + } elseif (isFormSent('remove')) { // Delete entries (with confirmation) adminDeleteEntriesConfirm(postRequestParameter('id'), 'bank_packages', array(), array(), array(), true); } @@ -78,36 +79,31 @@ if ((isPostRequestParameterSet('id')) && (is_array(postRequestParameter('id'))) 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` -ORDER BY `id`", __FILE__, __LINE__); +$result = SQL_QUERY("SELECT + `id`, `title`, `description`, `account_fee`, `package_active`, `interest_plus`, `interest_minus` +FROM + `{?_MYSQL_PREFIX?}_bank_packages` +ORDER BY + `id` ASC", __FILE__, __LINE__); // Is there at lease one package? -if (SQL_NUMROWS($result) > 0) { +if (!SQL_HASZERONUMS($result)) { // List all packages - $OUT = ''; $SW = 2; + $OUT = ''; while ($content = SQL_FETCHARRAY($result)) { - // "Translate" some data - $content['active'] = translateYesNo($content['active']); - $content['fee'] = translateComma($content['fee']); - $content['plus'] = translateComma($content['plus']); - $content['minus'] = translateComma($content['minus']); - $content['sw'] = $SW; - // Load row template $OUT .= loadTemplate('admin_list_bank_package_row', true, $content); - $SW = 3 - $SW; } // END - while // Load main template loadTemplate('admin_list_bank_package', false, $OUT); } else { // No packages found! - loadTemplate('admin_settings_saved', false, getMessage('ADMIN_BANK_NO_PACKAGES_FOUND')); + loadTemplate('admin_settings_saved', false, '{--ADMIN_BANK_NO_PACKAGES_FOUND--}'); } // Free the result SQL_FREERESULT($result); -// +// [EOF] ?>