]> git.mxchange.org Git - mailer.git/blobdiff - inc/mails/birthday_mails.php
A lot double-quotes rewritten to single-quotes, some redirect URLs fixed
[mailer.git] / inc / mails / birthday_mails.php
index a1c870faca57c9bff23dff3c72997613e104d597..81a49e97a389673ab38672a291fe60e1ee6c9bd1 100644 (file)
@@ -10,7 +10,7 @@
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Versendet Geburtstagsmails                       *
  * -------------------------------------------------------------------- *
- * $Revision:: 856                                                    $ *
+ * $Revision::                                                        $ *
  * $Date::                                                            $ *
  * $Tag:: 0.2.1-FINAL                                                 $ *
  * $Author::                                                          $ *
@@ -38,9 +38,9 @@
 
 // Some security stuff...
 if (!defined('__SECURITY')) {
-       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
        require($INC);
-} elseif (!EXT_IS_ACTIVE("birthday")) {
+} elseif (!EXT_IS_ACTIVE('birthday')) {
        return;
 }
 
@@ -53,16 +53,16 @@ $MONTH = date("m", time());
 $YEAR  = date('Y', time());
 
 // Shall I include only active members?
-$ADD = "%s"; $VALUE = "";
-if ((getConfig('birthday_active')) && (EXT_IS_ACTIVE("autopurge")) && (getConfig('autopurge_inactive') == "Y") && (getConfig('ap_inactive_since') > 0)) {
-       $ADD = " AND last_online >= (UNIX_TIMESTAP() - %s)";
+$add = "%s"; $VALUE = '';
+if ((getConfig('birthday_active')) && (EXT_IS_ACTIVE('autopurge')) && (getConfig('autopurge_inactive') == 'Y') && (getConfig('ap_inactive_since') > 0)) {
+       $add = " AND last_online >= (UNIX_TIMESTAP() - %s)";
        $VALUE = getConfig('ap_inactive_since');
 }
 
 // Only confirmed members shall receive birthday mails...
 $result_birthday = SQL_QUERY_ESC("SELECT userid, email, birth_year
 FROM `{!_MYSQL_PREFIX!}_user_data`
-WHERE `status`='CONFIRMED' AND birth_day=%s AND birth_month=%s AND birthday_sent < (UNIX_TIMESTAMP() - ".(getConfig('one_day') * 364).")".$ADD."
+WHERE `status`='CONFIRMED' AND birth_day=%s AND birth_month=%s AND birthday_sent < (UNIX_TIMESTAMP() - ".(getConfig('one_day') * 364).")".$add."
 ORDER BY userid",
  array($DAY, $MONTH, $VALUE), __FILE__, __LINE__);
 
@@ -80,7 +80,7 @@ if (SQL_NUMROWS($result_birthday) > 0) {
                        // Add more entries to the array
                        $content['age']    = $AGE;
                        $content['points'] = TRANSLATE_COMMA(getConfig('birthday_points'));
-                       $content['check']  = "";
+                       $content['check']  = '';
 
                        // @TODO 4 is hard-coded here, should we move it out in config?
                        for ($idx = 0; $idx < 4; $idx++) {