]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_bonus.php
Renamed function, used more "pool functions":
[mailer.git] / inc / modules / admin / what-list_bonus.php
index 78e687de933eaf28bfd8377e78973a6f52c3217a..ee0a4fba8cbe2e0279528e8f8517299613f89d17 100644 (file)
@@ -47,8 +47,8 @@ if (isBonusRallyeActive()) {
        // Shall I withdraw now?
        if (isPostRequestElementSet('withdraw')) {
                // Okay, let's prepare...
-               $curr = str_pad((getMonth() - 1), 2, '0', STR_PAD_LEFT);
-               updateConfiguration('last_month', $curr);
+               $curr = padLeftZero(getMonth() - 1);
+               updateConfiguration('last_monthly', $curr);
                displayMessage('{--ADMIN_BONUS_WITHDRAW_PREPARED--}');
        } // END - if
 
@@ -124,12 +124,12 @@ ORDER BY
                $content['total_points'] = $total;
 
                // Check if we need to display form or not with manuel withdraw
-               if (getLastMonth() == getMonth()) {
+               if (getLastMonthly() == getMonth()) {
                        // Load form
                        $content['withdraw_form'] = loadTemplate('admin_list_bonus_form', TRUE);
                } else {
                        // Display message "no manual withdraw possible"
-                       $content['withdraw_form'] = loadTemplate('admin_settings_unsaved', TRUE, '{--ADMIN_BONUS_ALREADY_WITHDRAW--}');
+                       $content['withdraw_form'] = displayErrorMessage('{--ADMIN_BONUS_ALREADY_WITHDRAW--}', TRUE);
                }
 
                // Prepare constant for timemark