]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_bank_package.php
Added listing of sub id enhanced referral links in member area + used sub id in refer...
[mailer.git] / inc / modules / admin / what-list_bank_package.php
index 86fc276b8b2746b91c4531e361ff35d7c7bb3682..963faa233be2f496879c4a86363b383690f04a2d 100644 (file)
@@ -16,8 +16,8 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
- * For more information visit: http://www.mxchange.org                  *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
@@ -45,16 +45,17 @@ addYouAreHereLink('admin', __FILE__);
 
 // Check if there is enougth selected
 $show = true;
-if ((isPostRequestParameterSet('id')) && (is_array(postRequestParameter('id'))) && (count(postRequestParameter('id')) > 0)) {
+if (ifPostContainsSelections('id')) {
        // Okay, which button was pressed?
        if (isFormSent('change')) {
                // Change permissions
-               adminChangeActivationStatus(postRequestParameter('id'), 'bank_packages', 'package_active');
+               adminChangeActivationStatus(postRequestElement('id'), 'bank_packages', 'package_active');
        } elseif (isFormSent('edit')) {
                // Delete entries (with confirmation)
                adminEditEntriesConfirm(
-                       postRequestParameter('id'),
-                       'bank_packages',
+                       array('id'),
+                       array('bank_packages'),
+                       postRequestElement('id'),
                        array(
                                'id',
                                'title',
@@ -108,21 +109,23 @@ if ((isPostRequestParameterSet('id')) && (is_array(postRequestParameter('id')))
                        )
                );
                $show = false;
-       } elseif (isPostRequestParameterSet('do_edit')) {
+       } elseif (isFormSent('do_edit')) {
                // Delete entries (with confirmation)
                adminEditEntriesConfirm(
-                       postRequestParameter('id'),
-                       'bank_packages',
+                       array('id'),
+                       array('bank_packages'),
+                       postRequestElement('id'),
                        array(),
                        array(),
                        array(),
-                       true
+                       array(true)
                );
-       } elseif (isPostRequestParameterSet('delete')) {
+       } elseif (isFormSent('delete')) {
                // Delete entries (with confirmation)
                adminDeleteEntriesConfirm(
-                       postRequestParameter('id'),
-                       'bank_packages',
+                       array('id'),
+                       array('bank_packages'),
+                       postRequestElement('id'),
                        array(
                                'id',
                                'title',
@@ -143,15 +146,16 @@ if ((isPostRequestParameterSet('id')) && (is_array(postRequestParameter('id')))
                        )
                );
                $show = false;
-       } elseif (isFormSent('remove')) {
+       } elseif (isFormSent('do_delete')) {
                // Delete entries (with confirmation)
                adminDeleteEntriesConfirm(
-                       postRequestParameter('id'),
-                       'bank_packages',
+                       array('id'),
+                       array('bank_packages'),
+                       postRequestElement('id'),
                        array(),
                        array(),
                        array(),
-                       true
+                       array(true)
                );
        }
 } // END - if
@@ -160,12 +164,18 @@ 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`, `package_active`, `interest_plus`, `interest_minus`
+$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__);
+       `id` ASC', __FILE__, __LINE__);
 
 // Is there at lease one package?
 if (!SQL_HASZERONUMS($result)) {
@@ -180,7 +190,7 @@ if (!SQL_HASZERONUMS($result)) {
        loadTemplate('admin_list_bank_package', false, $OUT);
 } else {
        // No packages found
-       loadTemplate('admin_settings_saved', false, '{--ADMIN_BANK_NO_PACKAGES_FOUND--}');
+       displayMessage('{--ADMIN_BANK_NO_PACKAGES_FOUND--}');
 }
 
 // Free the result