Renamed ifSqlHasZeroNums() to ifSqlHasZeroNumRows() and improved some queries.
[mailer.git] / inc / modules / admin / what-list_bank_package.php
index 963faa233be2f496879c4a86363b383690f04a2d..ed1427960b498126b2dfdb4485d4516709547add 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2015 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 addYouAreHereLink('admin', __FILE__);
 
 // Check if there is enougth selected
-$show = true;
+$show = TRUE;
 if (ifPostContainsSelections('id')) {
        // Okay, which button was pressed?
        if (isFormSent('change')) {
@@ -108,7 +108,7 @@ if (ifPostContainsSelections('id')) {
                                ''
                        )
                );
-               $show = false;
+               $show = FALSE;
        } elseif (isFormSent('do_edit')) {
                // Delete entries (with confirmation)
                adminEditEntriesConfirm(
@@ -118,7 +118,7 @@ if (ifPostContainsSelections('id')) {
                        array(),
                        array(),
                        array(),
-                       array(true)
+                       array(TRUE)
                );
        } elseif (isFormSent('delete')) {
                // Delete entries (with confirmation)
@@ -145,7 +145,7 @@ if (ifPostContainsSelections('id')) {
                                ''
                        )
                );
-               $show = false;
+               $show = FALSE;
        } elseif (isFormSent('do_delete')) {
                // Delete entries (with confirmation)
                adminDeleteEntriesConfirm(
@@ -155,16 +155,16 @@ if (ifPostContainsSelections('id')) {
                        array(),
                        array(),
                        array(),
-                       array(true)
+                       array(TRUE)
                );
        }
 } // END - if
 
 // Skip showing old entries?
-if ($show === false) return;
+if ($show === FALSE) return;
 
 // Load all banking packages from DB
-$result = SQL_QUERY('SELECT
+$result = sqlQuery('SELECT
        `id`,
        `title`,
        `description`,
@@ -178,23 +178,23 @@ ORDER BY
        `id` ASC', __FILE__, __LINE__);
 
 // Is there at lease one package?
-if (!SQL_HASZERONUMS($result)) {
+if (!ifSqlHasZeroNumRows($result)) {
        // List all packages
        $OUT = '';
-       while ($content = SQL_FETCHARRAY($result)) {
+       while ($content = sqlFetchArray($result)) {
                // Load row template
-               $OUT .= loadTemplate('admin_list_bank_package_row', true, $content);
+               $OUT .= loadTemplate('admin_list_bank_package_row', TRUE, $content);
        } // END - while
 
        // Load main template
-       loadTemplate('admin_list_bank_package', false, $OUT);
+       loadTemplate('admin_list_bank_package', FALSE, $OUT);
 } else {
        // No packages found
        displayMessage('{--ADMIN_BANK_NO_PACKAGES_FOUND--}');
 }
 
 // Free the result
-SQL_FREERESULT($result);
+sqlFreeResult($result);
 
 // [EOF]
 ?>