]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_bank_package.php
Fixes some HTML errors, shell scripts cleaned up
[mailer.git] / inc / modules / admin / what-list_bank_package.php
index 385b3c2d39b40abddfde41ca4723a85fe596c6f6..4c5b0c112e11f753530105dbe54c3d9621a11b1f 100644 (file)
  * $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 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -43,7 +41,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 } // END - if
 
 // Add description as navigation point
-addMenuDescription('admin', __FILE__);
+addYouAreHereLink('admin', __FILE__);
 
 // Check if there is enougth selected
 $show = true;
@@ -57,21 +55,104 @@ if ((isPostRequestParameterSet('id')) && (is_array(postRequestParameter('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 (isPostRequestParameterSet('do_edit')) {
+       } elseif (isFormSent('do_edit')) {
                // Delete entries (with confirmation)
-               adminEditEntriesConfirm(postRequestParameter('id'), 'bank_packages', array(), array(), array(), true);
-       } elseif (isPostRequestParameterSet('delete')) {
+               adminEditEntriesConfirm(
+                       postRequestParameter('id'),
+                       'bank_packages',
+                       array(),
+                       array(),
+                       array(),
+                       true
+               );
+       } elseif (isFormSent('delete')) {
                // Delete entries (with confirmation)
-               adminDeleteEntriesConfirm(postRequestParameter('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 (isFormSent('remove')) {
                // Delete entries (with confirmation)
-               adminDeleteEntriesConfirm(postRequestParameter('id'), 'bank_packages', array(), array(), array(), true);
+               adminDeleteEntriesConfirm(
+                       postRequestParameter('id'),
+                       'bank_packages',
+                       array(),
+                       array(),
+                       array(),
+                       true
+               );
        }
 } // END - if
 
@@ -87,22 +168,18 @@ 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)) {
-               // Add color switch
-               $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!
+       // No packages found
        loadTemplate('admin_settings_saved', false, '{--ADMIN_BANK_NO_PACKAGES_FOUND--}');
 }