X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmails%2Fbirthday_mails.php;h=0d3e2ef4a2c3a20768587ef21c3bc02d91ab9f88;hb=c3ea029c279923888cebf39020fe152c4540fbe8;hp=ec8317a92629a5578b653c9d23fbdce75efd9d4e;hpb=e1653405d28923c78b2e292125306ccf61138f24;p=mailer.git diff --git a/inc/mails/birthday_mails.php b/inc/mails/birthday_mails.php index ec8317a926..0d3e2ef4a2 100644 --- a/inc/mails/birthday_mails.php +++ b/inc/mails/birthday_mails.php @@ -53,16 +53,16 @@ $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']); + $VALUE = bigintval(time() - $_CONFIG['ap_in_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=%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__); @@ -78,12 +78,12 @@ if (SQL_NUMROWS($result_birthday) > 0) // Simply subtract both values and you got the age... :) $AGE = $NOW - $BD; - if ($CONFIG['birthday_points'] > 0) + if ($_CONFIG['birthday_points'] > 0) { // Prepare array for loading template $content = array( 'age' => $AGE, - 'points' => $CONFIG['birthday_points'], + 'points' => $_CONFIG['birthday_points'], 'check' => "", ); for ($idx = 0; $idx < 4; $idx++) @@ -93,7 +93,7 @@ if (SQL_NUMROWS($result_birthday) > 0) // Insert row into database $result_insert = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_birthday (userid, points, chk_value) VALUES ('%s', '%s', '%s' )", - array(bigintval($uid), $CONFIG['birthday_points'], $content['check']), __FILE__, __LINE__); + array(bigintval($uid), $_CONFIG['birthday_points'], $content['check']), __FILE__, __LINE__); // Load email template with confirmation link $msg = LOAD_EMAIL_TEMPLATE("member_birthday_confirm", $content, bigintval($uid)); @@ -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__); }