]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_beg.php
Renamed ifSqlHasZeroNums() to ifSqlHasZeroNumRows() and improved some queries.
[mailer.git] / inc / modules / admin / what-list_beg.php
index 4daecda9ef7e0ab540ea507e79ee00ac4dafedcd..c5c8eb2f671c948154ef061a960910753fee69f9 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2013 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 *
@@ -47,7 +47,7 @@ if (isBegRallyeEnabled()) {
        // Shall I withdraw now?
        if (isPostRequestElementSet('withdraw')) {
                // Okay, let's prepare...
-               $curr = padLeftZero(getMonth() - 1);
+               $curr = padLeftZero(getMonth() - 1, 2);
                updateConfiguration('last_monthly', $curr);
                displayMessage('{--ADMIN_BEG_WITHDRAW_PREPARED--}');
        } // END - if
@@ -62,7 +62,7 @@ if (isBegRallyeEnabled()) {
        } // END - if
 
        // Check if at least one is in the active rallye
-       $result = SQL_QUERY("SELECT
+       $result = sqlQuery("SELECT
        `userid`,
        `email`,
        `beg_points`,
@@ -79,10 +79,10 @@ ORDER BY
        `last_online` DESC,
        `userid` ASC", __FILE__, __LINE__);
 
-       if (!SQL_HASZERONUMS($result)) {
+       if (!ifSqlHasZeroNumRows($result)) {
                // List users
                $OUT = ''; $count = 1; $total = '0';
-               while ($content = SQL_FETCHARRAY($result)) {
+               while ($content = sqlFetchArray($result)) {
                        // Init variables
                        $WIN1 = '';
                        $WIN2 = '';
@@ -119,14 +119,14 @@ ORDER BY
                        $content['withdraw_form'] = loadTemplate('admin_list_beg_form', TRUE);
                } else {
                        // Display message "no manual withdraw possible"
-                       $content['withdraw_form'] = displayMessage('{--ADMIN_BEG_ALREADY_WITHDRAW--}', TRUE);
+                       $content['withdraw_form'] = returnMessage('{--ADMIN_BEG_ALREADY_WITHDRAW--}');
                }
 
                // Prepare constant for timemark
                if (isExtensionActive('autopurge')) {
                        $content['autopurge_timeout'] = generateDateTime(time() - getApInactiveSince(), 2);
                } else {
-                       $content['autopurge_timeout'] = displayMessage('{%pipe,generateExtensionInactiveNotInstalledMessage=autopurge%}', TRUE);
+                       $content['autopurge_timeout'] = returnMessage('{%pipe,generateExtensionInactiveNotInstalledMessage=autopurge%}');
                }
 
                // Load final template