X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-list_bank_package.php;h=144b4142fdebecd1e7a37b40cf188a7636749a60;hb=6bcc8f1ebbd646d15c5905a5cec47d1c1e446238;hp=c4105ef928b3c8861053bb4dfeefde77a74bf21f;hpb=75ad748a68473ace540251427a74fb781b1145e9;p=mailer.git diff --git a/inc/modules/admin/what-list_bank_package.php b/inc/modules/admin/what-list_bank_package.php index c4105ef928..144b4142fd 100644 --- a/inc/modules/admin/what-list_bank_package.php +++ b/inc/modules/admin/what-list_bank_package.php @@ -10,7 +10,12 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Listet Angebotspakete auf * * -------------------------------------------------------------------- * - * * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2008 by Roland Haeder * * For more information visit: http://www.mxchange.org * @@ -32,64 +37,77 @@ ************************************************************************/ // Some security stuff... -if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!is_admin())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; +if ((!defined('__SECURITY')) || (!IS_ADMIN())) { + $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; require($INC); -} +} // END - if // Add description as navigation point -ADD_DESCR("admin", basename(__FILE__)); +ADD_DESCR('admin', __FILE__); // Check if there is enougth selected $show = true; -if ((isset($_POST['id'])) && (is_array($_POST['id'])) && (count($_POST['id']) > 0)) { +if ((REQUEST_ISSET_POST('id')) && (is_array(REQUEST_POST('id'))) && (count(REQUEST_POST('id')) > 0)) { // Okay, which button was pressed? - if (isset($_POST['change'])) { + if (REQUEST_ISSET_POST('change')) { // Change permissions - ADMIN_CHANGE_ACTIVATION_STATUS($_POST['id'], "bank_packages", "package_active"); - } elseif (isset($_POST['delete'])) { + ADMIN_CHANGE_ACTIVATION_STATUS(REQUEST_POST('id'), 'bank_packages', 'package_active'); + } elseif (REQUEST_ISSET_POST('edit')) { // Delete entries (with confirmation) - ADMIN_DELETE_ENTRIES_CONFIRM($_POST['id'], "bank_packages", "package_active", array("id", "title", "description", "account_fee"), array("bigintval", "", "", "TRANSLATE_COMMA")); + ADMIN_EDIT_ENTRIES_CONFIRM( + REQUEST_POST('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('', '', '', '', '', '', '', '', '', '', '', '', '', '', '') + ); $show = false; - } elseif (isset($_POST['remove'])) { + } elseif (REQUEST_ISSET_POST(('do_edit'))) { // Delete entries (with confirmation) - ADMIN_DELETE_ENTRIES_CONFIRM($_POST['id'], "bank_packages", "package_active", array(), array(), true); + ADMIN_EDIT_ENTRIES_CONFIRM(REQUEST_POST('id'), 'bank_packages', array(), array(), array(), true); + } elseif (REQUEST_ISSET_POST('delete')) { + // Delete entries (with confirmation) + ADMIN_DELETE_ENTRIES_CONFIRM(REQUEST_POST('id'), 'bank_packages', array('id', 'title', 'description', 'account_fee'), array('bigintval', '', '', 'translateComma'), array('', '', '', '')); + $show = false; + } elseif (REQUEST_ISSET_POST('remove')) { + // Delete entries (with confirmation) + ADMIN_DELETE_ENTRIES_CONFIRM(REQUEST_POST('id'), 'bank_packages', array(), array(), array(), true); } -} +} // END - if // Skip showing old entries? if (!$show) 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__); +FROM `{!_MYSQL_PREFIX!}_bank_packages` +ORDER BY `id`", __FILE__, __LINE__); // Is there at lease one package? if (SQL_NUMROWS($result) > 0) { // List all packages - $OUT = ""; $SW = 2; + $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result)) { // "Translate" some data - $content['active'] = TRANSLATE_YESNO($content['active']); - $content['fee'] = TRANSLATE_COMMA($content['fee']); - $content['plus'] = TRANSLATE_COMMA($content['plus']); - $content['minus'] = TRANSLATE_COMMA($content['minus']); + $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 .= LOAD_TEMPLATE("admin_list_bank_package_row", true, $content); + $OUT .= LOAD_TEMPLATE('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"); + LOAD_TEMPLATE('admin_list_bank_package'); } else { // No packages found! - LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_BANK_NO_PACKAGES_FOUND); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_BANK_NO_PACKAGES_FOUND')); } // Free the result