* -------------------------------------------------------------------- *
* Kurzbeschreibung : Versendet Geburtstagsmails *
* -------------------------------------------------------------------- *
- * $Revision:: 856 $ *
+ * $Revision:: $ *
* $Date:: $ *
* $Tag:: 0.2.1-FINAL $ *
* $Author:: $ *
if (!defined('__SECURITY')) {
$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;
}
$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__);
// 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++) {