-$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;
-}
+$sql = "SELECT `userid`, `email` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE (`bonus_rallye_enable_notify` ";
+switch (getConfig('bonus_active')) {
+ case 'Y': // Active rallye is activated
+ if (getConfig('bonus_enable_notify') == 'Y') {
+ // Okay, let's check for member accounts
+ $sql .= '= 0 OR (`bonus_rallye_enable_notify` > 0 AND `bonus_rallye_enable_notify` < `bonus_rallye_disable_notify`)';
+ $mode = 'enable';
+ } else {
+ // Do not notify!
+ $sql = '';
+ }
+ break;
+
+ case 'N': // Active rallye is deactivated
+ if (getConfig('bonus_disable_notify') == 'Y') {
+ // Okay, let's check for member accounts
+ $sql .= ' > 0 AND `bonus_rallye_disable_notify` < `bonus_rallye_enable_notify`';
+ $mode = 'disable';
+ } else {
+ // Do not notify!
+ $sql = '';
+ }
+ break;
+} // END - switch