]> git.mxchange.org Git - mailer.git/blobdiff - inc/mails/bonus_mails.php
Global variables rewritten
[mailer.git] / inc / mails / bonus_mails.php
index b77202d461f1133bae50fa78efc1ca3c42c82af9..ff07609ab54c7bdf1b1fddb4186b102ef78a116d 100644 (file)
@@ -40,15 +40,14 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode
-global $CSS;
-if ($CSS == 1) return;
+if ($GLOBALS['output_mode'] == 1) return;
 
 // Create timemark from saved month
 $mark = mktime(0, 0, 0, getConfig('last_month'), date("d", time()), date('Y', time()));
 $SQL = ""; $MODE = "";
 
 // Shall I sent activation or deactivation mail?
-$SQL = "SELECT userid, email FROM `"._MYSQL_PREFIX."_user_data` WHERE (bonus_ral_notify ";
+$SQL = "SELECT userid, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE (bonus_ral_notify ";
 switch (getConfig('bonus_active'))
 {
 case "Y": // Active rallye is activated
@@ -76,7 +75,7 @@ case "N": // Active rallye is deactivated
 
 if (!empty($SQL)) {
        // The SQL command needs to be finisched here (only confirmed accounts!)
-       $SQL .= ") AND status='CONFIRMED' ORDER BY last_online ASC";
+       $SQL .= ") AND `status`='CONFIRMED' ORDER BY last_online ASC";
 
        // Normal notification mails or bonus mails?
        $MAIL_MODE = ((getConfig('bonus_notify_points') > 0) && ($MODE == "en") && (EXT_IS_ACTIVE("bonus")));
@@ -92,9 +91,9 @@ if (!empty($SQL)) {
        $result_main = SQL_QUERY($SQL, __FILE__, __LINE__);
        if (SQL_NUMROWS($result_main) > 0) {
                // Okay lets notify all users!
-               while(list($uid, $email) = SQL_FETCHROW($result_main)) {
+               while (list($uid, $email) = SQL_FETCHROW($result_main)) {
                        // Update account
-                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data
+                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data`
 SET bonus_ral_notify='%s', bonus_ral_%s_notify='%s'
 WHERE userid=%s
 LIMIT 1",