X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmails%2Fbeg_mails.php;h=58fae33f77bf0cf589351da5ddc6685a92ac368b;hb=a524135c24dd0a8fa359c9a92399467d50fd69e0;hp=efe0738383e0c761d610f908112cb3b7ef709976;hpb=cd7d344ea7007cfa20413acd3e03e50f0ab86d86;p=mailer.git diff --git a/inc/mails/beg_mails.php b/inc/mails/beg_mails.php index efe0738383..58fae33f77 100644 --- a/inc/mails/beg_mails.php +++ b/inc/mails/beg_mails.php @@ -10,13 +10,8 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Versendet Erinnerungsmails * * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2013 by Mailer Developer Team * + * Copyright (c) 2009 - 2016 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -77,18 +72,8 @@ switch (getBegRallye()) { } // END - switch if (!empty($sql)) { - // Init additional WHERE statement - $whereStatement = ''; - - // Is ext-holiday installed? - // @TODO Rewrite these if() blocks to a filter - if (isExtensionActive('holiday')) { - // Exclude those as well - $whereStatement .= " AND `d`.`holiday_active`='N'"; - } // END - if - // The SQL command needs to be finisched here (only confirmed accounts!) - $sql .= ')' . $whereStatement . runFilterChain('user_exclusion_sql', " AND `d`.`status`='CONFIRMED'") . ' ORDER BY `d`.`last_online` ASC'; + $sql .= ')' . runFilterChain('user_exclusion_sql', " AND `d`.`status`='CONFIRMED'") . ' ORDER BY `d`.`last_online` ASC'; // No IP locking setuped by default $content['ip_locker'] = '{--BEG_NO_LIMITATION--}'; @@ -99,8 +84,9 @@ if (!empty($sql)) { } // END - if // Check for accounts to be notified - $result_main = SQL_QUERY($sql, __FILE__, __LINE__); - if (!SQL_HASZERONUMS($result_main)) { + $result_main = sqlQuery($sql, __FILE__, __LINE__); + + if (!ifSqlHasZeroNumRows($result_main)) { // Normal notification mails or bonus mails? $sentBonusMails = ((getBegNotifyBonus() > 0) && ($mode == 'enable') && (isExtensionActive('bonus'))); @@ -109,12 +95,12 @@ if (!empty($sql)) { $receiver = ''; $userids = array(); // Okay lets notify all users! - while ($row = SQL_FETCHARRAY($result_main)) { + while ($row = sqlFetchArray($result_main)) { // Merge arrays $content = merge_array($content, $row); // Update account - SQL_QUERY_ESC("UPDATE + sqlQueryEscaped("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `beg_rallye_%s_notify`=UNIX_TIMESTAMP() @@ -146,12 +132,12 @@ LIMIT 1", $url = 'modules.php?module=index&what=login'; // Insert mail - addBonusMailToQueue('{--BEG_RALLYE_' . strtoupper($mode) . '_SUBJECT--}', $message, $receiver, getBegNotifyBonus(), getBegNotifyWait(), $url, 0, 'normal', SQL_NUMROWS($result_main)); + addBonusMailToQueue('{--BEG_RALLYE_' . strtoupper($mode) . '_SUBJECT--}', $message, $receiver, getBegNotifyBonus(), getBegNotifyWait(), $url, 0, 'normal', sqlNumRows($result_main)); } // END - if } // END - if // Free memory - SQL_FREERESULT($result_main); + sqlFreeResult($result_main); } // END - if // [EOF]