}
// 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()));
// Shall I sent activation or deactivation mail?
$sql = "SELECT userid, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE (beg_ral_notify ";
-switch (getConfig('beg_rallye'))
-{
+switch (getConfig('beg_rallye')) {
case 'Y': // Begging rallye is activated
- if (getConfig('beg_ral_en_notify') == 'Y')
- {
+ if (getConfig('beg_ral_en_notify') == 'Y') {
// Okay, let's check for member accounts
$sql .= "= 0 OR (beg_ral_notify > 0 AND beg_ral_en_notify < beg_ral_di_notify)";
$mode = "en";
+ } else {
+ // Do not notify!
+ $sql = '';
}
- else
- {
- // Do not notify!
- $sql = '';
- }
- break;
+ break;
case 'N': // Begging rallye is deactivated
- if (getConfig('beg_ral_di_notify') == 'Y')
- {
+ if (getConfig('beg_ral_di_notify') == 'Y') {
// Okay, let's check for member accounts
$sql .= " > 0 AND beg_ral_di_notify < beg_ral_en_notify";
$mode = "di";
+ } else {
+ // Do not notify!
+ $sql = '';
}
- else
- {
- // Do not notify!
- $sql = '';
- }
- break;
+ break;
}
if (!empty($sql)) {
define('__BEG_MIN_POINTS' , translateComma(getConfig('beg_points')));
define('__BEG_MAX_POINTS' , translateComma(getConfig('beg_points_max')));
define('__BEG_MAX_WINNERS', round(getConfig('beg_ranks')));
- if (getConfig('beg_ip_timeout') == 0)
- {
+ if (getConfig('beg_ip_timeout') == 0) {
// No IP locking setuped!
define('__BEG_IP_LOCKER', getMessage('BEG_NO_LIMITATION'));
- }
- else
- {
+ } else {
// Create timemark
define('__BEG_IP_LOCKER', createFancyTime(getConfig('beg_ip_timeout')));
}