2 /************************************************************************
3 * Mailer v0.2.1-FINAL Start: 02/12/2004 *
4 * =================== Last change: 02/12/2004 *
6 * -------------------------------------------------------------------- *
7 * File : what-list_bank_package.php *
8 * -------------------------------------------------------------------- *
9 * Short description : List packages *
10 * -------------------------------------------------------------------- *
11 * Kurzbeschreibung : Listet Angebotspakete auf *
12 * -------------------------------------------------------------------- *
15 * $Tag:: 0.2.1-FINAL $ *
17 * Needs to be in all Files and every File needs "svn propset *
18 * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
19 * -------------------------------------------------------------------- *
20 * Copyright (c) 2003 - 2009 by Roland Haeder *
21 * Copyright (c) 2009, 2010 by Mailer Developer Team *
22 * For more information visit: http://www.mxchange.org *
24 * This program is free software; you can redistribute it and/or modify *
25 * it under the terms of the GNU General Public License as published by *
26 * the Free Software Foundation; either version 2 of the License, or *
27 * (at your option) any later version. *
29 * This program is distributed in the hope that it will be useful, *
30 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
31 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
32 * GNU General Public License for more details. *
34 * You should have received a copy of the GNU General Public License *
35 * along with this program; if not, write to the Free Software *
36 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
38 ************************************************************************/
40 // Some security stuff...
41 if ((!defined('__SECURITY')) || (!isAdmin())) {
45 // Add description as navigation point
46 addMenuDescription('admin', __FILE__);
48 // Check if there is enougth selected
50 if ((isPostRequestParameterSet('id')) && (is_array(postRequestParameter('id'))) && (count(postRequestParameter('id')) > 0)) {
51 // Okay, which button was pressed?
52 if (isFormSent('change')) {
54 adminChangeActivationStatus(postRequestParameter('id'), 'bank_packages', 'package_active');
55 } elseif (isFormSent('edit')) {
56 // Delete entries (with confirmation)
57 adminEditEntriesConfirm(
58 postRequestParameter('id'),
60 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'),
61 array('bigintval', '', '', 'translateComma', 'bigintval', 'translateComma', '', '', 'bigintval', 'translateComma', 'translateComma', 'translateComma', 'translateComma', '', 'bigintval'),
62 array('', '', '', '', '', '', '', '', '', '', '', '', '', '', '')
65 } elseif (isPostRequestParameterSet('do_edit')) {
66 // Delete entries (with confirmation)
67 adminEditEntriesConfirm(postRequestParameter('id'), 'bank_packages', array(), array(), array(), true);
68 } elseif (isPostRequestParameterSet('delete')) {
69 // Delete entries (with confirmation)
70 adminDeleteEntriesConfirm(postRequestParameter('id'), 'bank_packages', array('id', 'title', 'description', 'account_fee'), array('bigintval', '', '', 'translateComma'), array('', '', '', ''));
72 } elseif (isFormSent('remove')) {
73 // Delete entries (with confirmation)
74 adminDeleteEntriesConfirm(postRequestParameter('id'), 'bank_packages', array(), array(), array(), true);
78 // Skip showing old entries?
79 if ($show === false) return;
81 // Load all banking packages from DB
82 $result = SQL_QUERY("SELECT
83 `id`, `title`, `description`, `account_fee`, `package_active`, `interest_plus`, `interest_minus`
85 `{?_MYSQL_PREFIX?}_bank_packages`
87 `id` ASC", __FILE__, __LINE__);
89 // Is there at lease one package?
90 if (!SQL_HASZERONUMS($result)) {
93 while ($content = SQL_FETCHARRAY($result)) {
95 $OUT .= loadTemplate('admin_list_bank_package_row', true, $content);
99 loadTemplate('admin_list_bank_package', false, $OUT);
101 // No packages found!
102 loadTemplate('admin_settings_saved', false, '{--ADMIN_BANK_NO_PACKAGES_FOUND--}');
106 SQL_FREERESULT($result);