]> git.mxchange.org Git - mailer.git/blobdiff - inc/mails/bonus_mails.php
Missing bracket fixed
[mailer.git] / inc / mails / bonus_mails.php
index b6b4d8102a47e1f37ab3509448cbde310bbdbc64..da5d22c5128459193a825a404d9aa822ae3437dc 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode
-if ($GLOBALS['output_mode'] == 1) return;
+if (getOutputMode() == 1) return;
 
 // Create timemark from saved month
 $mark = mktime(0, 0, 0, getConfig('last_month'), date('d', time()), date('Y', time()));
@@ -55,27 +55,27 @@ $sql = ''; $mode = '';
 $sql = "SELECT userid, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE (bonus_ral_notify ";
 switch (getConfig('bonus_active'))
 {
-case 'Y': // Active rallye is activated
-       if (getConfig('bonus_en_notify') == 'Y') {
-               // Okay, let's check for member accounts
-               $sql .= "= 0 OR (bonus_ral_notify > 0 AND bonus_ral_en_notify < bonus_ral_di_notify)";
-               $mode = "en";
-       } else {
-               // Do not notify!
-               $sql = '';
-       }
-       break;
-
-case 'N': // Active rallye is deactivated
-       if (getConfig('bonus_di_notify') == 'Y') {
-               // Okay, let's check for member accounts
-               $sql .= " > 0 AND bonus_ral_di_notify < bonus_ral_en_notify";
-               $mode = "di";
-       } else {
-               // Do not notify!
-               $sql = '';
-       }
-       break;
+       case 'Y': // Active rallye is activated
+               if (getConfig('bonus_en_notify') == 'Y') {
+                       // Okay, let's check for member accounts
+                       $sql .= "= 0 OR (bonus_ral_notify > 0 AND bonus_ral_en_notify < bonus_ral_di_notify)";
+                       $mode = "en";
+               } else {
+                       // Do not notify!
+                       $sql = '';
+               }
+               break;
+
+       case 'N': // Active rallye is deactivated
+               if (getConfig('bonus_di_notify') == 'Y') {
+                       // Okay, let's check for member accounts
+                       $sql .= " > 0 AND bonus_ral_di_notify < bonus_ral_en_notify";
+                       $mode = "di";
+               } else {
+                       // Do not notify!
+                       $sql = '';
+               }
+               break;
 }
 
 if (!empty($sql)) {
@@ -102,7 +102,7 @@ if (!empty($sql)) {
 SET bonus_ral_notify='%s', bonus_ral_%s_notify='%s'
 WHERE userid=%s
 LIMIT 1",
-                               array(time(), $mode, time(), $content['userid']), __FILE__, __LINE__);
+                       array(time(), $mode, time(), $content['userid']), __FILE__, __LINE__);
 
                        // Load email template and send it to the user!
                        if ($sentBonusMails === true) {