]> git.mxchange.org Git - mailer.git/blobdiff - inc/mails/birthday_mails.php
Counter for pending surfbar added
[mailer.git] / inc / mails / birthday_mails.php
index 597d7288448f1a001c249379e9bb6a0464a8173e..0d3e2ef4a2c3a20768587ef21c3bc02d91ab9f88 100644 (file)
@@ -53,7 +53,7 @@ $YEAR  = date('Y', time());
 
 // Shall I include only active members?
 $ADD = "%s"; $VALUE = "";
-if (($_CONFIG['birthday_active']) && (EXT_IS_ACTIVE("autopurge")) && ($_CONFIG['ap_in_since'] > 0) && ($_CONFIG['ap_inactive'] == 'Y'))
+if (($_CONFIG['birthday_active']) && (EXT_IS_ACTIVE("autopurge")) && ($_CONFIG['ap_in_since'] > 0) && ($_CONFIG['ap_inactive'] == "Y"))
 {
        $ADD = " AND last_online >= %d";
        $VALUE = bigintval(time() - $_CONFIG['ap_in_since']);
@@ -62,7 +62,7 @@ if (($_CONFIG['birthday_active']) && (EXT_IS_ACTIVE("autopurge")) && ($_CONFIG['
 // 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=%d AND birth_month=%d AND birthday_sent < ".(time() - (ONE_DAY*364)).$ADD."
+WHERE status='CONFIRMED' AND birth_day=%s AND birth_month=%s AND birthday_sent < ".(time() - (ONE_DAY*364)).$ADD."
 ORDER BY userid",
  array($DAY, $MONTH, $VALUE), __FILE__, __LINE__);
 
@@ -108,7 +108,7 @@ if (SQL_NUMROWS($result_birthday) > 0)
                SEND_EMAIL($email, HAPPY_BIRTHDAY, $msg);
 
                // Remember him that he has received a birthday mail
-               $result_bd = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET birthday_sent=UNIX_TIMESTAMP() WHERE userid=%d LIMIT 1",
+               $result_bd = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET birthday_sent=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1",
                 array(bigintval($uid)), __FILE__, __LINE__);
        }