]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_beg.php
AJAX installation is 'basicly finished' :) Plus I threw in a small christmas present...
[mailer.git] / inc / modules / admin / what-list_beg.php
index c168877428d6e60bd9769d2c9f34bb12e2adb222..1eb7c9ca105531a29e9b3294e1b964e52f497f03 100644 (file)
@@ -47,8 +47,7 @@ if (isBegRallyeEnabled()) {
        // Shall I withdraw now?
        if (isPostRequestElementSet('withdraw')) {
                // Okay, let's prepare...
-               $curr = getMonth() - 1;
-               if (strlen($curr) == 1) $curr = '0' . $curr;
+               $curr = str_pad((getMonth() - 1), 2, '0', STR_PAD_LEFT);
                updateConfiguration('last_month', $curr);
                displayMessage('{--ADMIN_BEG_WITHDRAW_PREPARED--}');
        } // END - if
@@ -106,7 +105,7 @@ ORDER BY
                        );
 
                        // Load template and add it
-                       $OUT .= loadTemplate('admin_list_beg_rows', true, $row);
+                       $OUT .= loadTemplate('admin_list_beg_rows', TRUE, $row);
                        $count++;
                        $total += $content['beg_points'];
                } // END - while
@@ -117,21 +116,21 @@ ORDER BY
                // Check if we need to display form or not with manuel withdraw
                if (getLastMonth() == getMonth()) {
                        // Load form
-                       $content['withdraw_form'] = loadTemplate('admin_list_beg_form', true);
+                       $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'] = displayMessage('{--ADMIN_BEG_ALREADY_WITHDRAW--}', TRUE);
                }
 
                // 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'] = displayMessage('{%pipe,generateExtensionInactiveNotInstalledMessage=autopurge%}', TRUE);
                }
 
                // Load final template
-               loadTemplate('admin_list_beg', false, $content);
+               loadTemplate('admin_list_beg', FALSE, $content);
        } else {
                // No one has joined the begging rallye...
                displayMessage('{--ADMIN_BEG_NO_RALLYE--}');