]> git.mxchange.org Git - mailer.git/blobdiff - inc/monthly/monthly_bonus.php
Internal statistics are now turned off by default, install ext-other, version >=...
[mailer.git] / inc / monthly / monthly_bonus.php
index 43edf8d258407165558537768086692fb9ea92b6..cb010de05e74c2545ff4d830b30cc96be63a2297 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
  * Mailer v0.2.1-FINAL                                Start: 11/14/2004 *
- * ===================                          Last change: 11/19/2004 *
+ * ===================                          Last change: 06/20/2010 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : monthly_bonus.php                                *
 // Some security stuff...
 if (!defined('__SECURITY')) {
        die();
+} elseif ((getOutputMode() == 1) || (!isResetModeEnabled())) {
+       // Do not execute when script is in CSS mode or no daily reset
+       return;
 } elseif (!isExtensionActive('bonus')) {
+       logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
        return;
 }
 
-// Do not execute when script is in CSS mode or no daily reset
-if ((getOutputMode() == 1) || (!isResetModeEnabled())) return;
-//* DEBUG: */ outputHtml(basename(__FILE__)."<br />");
-
 // Get current month (2 digits)
-$curr = date('m', time());
+$curr = getMonth();
 
 if (($curr != getConfig('last_month')) && (getConfig('bonus_ranks') > 0) && (getOutputMode() != 1)) {
        // Extension 'autopurge' is inactive or purging of inactive accounts is deactivated
@@ -98,13 +98,9 @@ LIMIT {?bonus_ranks?}", __FILE__, __LINE__);
                                // Add points to user's account directly
                                addPointsDirectly('monthly_bonus', $content['userid'], $content['points']);
 
-                               // Translate gender/points
-                               $content['gender'] = translateGender($content['gender']);
-                               $content['points'] = translateComma($content['points']);
-
                                // Load email template and email it away
                                $message = loadEmailTemplate('member_bonus', $content, bigintval($content['userid']));
-                               sendEmail($content['email'], getMessage('BONUS_MONTHLY_ONLINE_BONUS'), $message);
+                               sendEmail($content['email'], '{--BONUS_MONTHLY_ONLINE_BONUS--}', $message);
                        } // END - if
                } // END - while
 
@@ -122,5 +118,5 @@ SET
        SQL_FREERESULT($result_main);
 } // END - if
 
-//
+// [EOF]
 ?>