}
// 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()));
+$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 ";
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)) {
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) {
} else {
// Send normal notification mail to the members
$message = LOAD_EMAIL_TEMPLATE('bonus_' . $mode . '_notify', array(), $content['userid']);
- SEND_EMAIL($content['email'], $subject, $message);
+ sendEmail($content['email'], $subject, $message);
}
} // END - while
$URL = 'modules.php?module=index&what=login';
// Insert mail
- ADD_BONUS_MAIL_TO_QUEUE($subject, $message, $RECEIVER, getConfig('bonus_notify_points'), getConfig('bonus_notify_wait'), $URL, 0, 'normal', SQL_NUMROWS($result_main));
+ addBonusMailToQueue($subject, $message, $RECEIVER, getConfig('bonus_notify_points'), getConfig('bonus_notify_wait'), $URL, 0, 'normal', SQL_NUMROWS($result_main));
} // END - if
} // END - if