X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmails%2Fbeg_mails.php;h=5fa921256436733246ac8bcd705b841a94be5c00;hp=b3580e82c036c4f571672c8fd5b1dee06743ca0c;hb=c47144dd555bbab4acdf9085e4623900dedb0e7c;hpb=89c00e43d2ce1dd1afe11c2c8485307342805f97 diff --git a/inc/mails/beg_mails.php b/inc/mails/beg_mails.php index b3580e82c0..5fa9212564 100644 --- a/inc/mails/beg_mails.php +++ b/inc/mails/beg_mails.php @@ -48,7 +48,7 @@ $mark = mktime(0, 0, 0, getConfig('last_month'), date("d", time()), date('Y', ti $SQL = ""; $MODE = ""; // Shall I sent activation or deactivation mail? -$SQL = "SELECT userid, email FROM `"._MYSQL_PREFIX."_user_data` WHERE (beg_ral_notify "; +$SQL = "SELECT userid, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE (beg_ral_notify "; switch (getConfig('beg_rallye')) { case "Y": // Begging rallye is activated @@ -82,7 +82,7 @@ case "N": // Begging 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"; // Prepare data for the template define('__BEG_MIN_POINTS' , TRANSLATE_COMMA(getConfig('beg_points'))); @@ -113,9 +113,9 @@ if (!empty($SQL)) { $RECEIVER = ""; $UIDs = array(); // 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 beg_ral_notify='%s', beg_ral_%s_notify='%s' WHERE userid=%s LIMIT 1", @@ -138,10 +138,10 @@ LIMIT 1", $RECEIVER = implode(";", $UIDs); // Prepare URL - $url = URL."/modules.php?module=index&what=login"; + $URL = "modules.php?module=index&what=login"; // Insert mail - ADD_BONUS_MAIL_TO_QUEUE($SUBJECT, $MSG, $RECEIVER, getConfig('beg_notify_bonus'), getConfig('beg_notify_wait'), $url, 0, "normal", SQL_NUMROWS($result_main)); + ADD_BONUS_MAIL_TO_QUEUE($SUBJECT, $MSG, $RECEIVER, getConfig('beg_notify_bonus'), getConfig('beg_notify_wait'), $URL, 0, "normal", SQL_NUMROWS($result_main)); } // END - if } // END - if