$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) {