<?php
/************************************************************************
* Mailer v0.2.1-FINAL Start: 11/14/2004 *
- * =================== Last change: 11/19/2004 *
+ * =================== Last change: 06/20/2010 *
* *
* -------------------------------------------------------------------- *
* File : monthly_bonus.php *
// Some security stuff...
if (!defined('__SECURITY')) {
die();
+} elseif ((getOutputMode() == 1) || (!isResetModeEnabled())) {
+ // Do not execute when script is in CSS mode or no daily reset
+ return;
} elseif (!isExtensionActive('bonus')) {
+ logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
return;
}
-// Do not execute when script is in CSS mode or no daily reset
-if ((getOutputMode() == 1) || (!isResetModeEnabled())) return;
-//* DEBUG: */ outputHtml(basename(__FILE__)."<br />");
-
// Get current month (2 digits)
-$curr = date('m', time());
+$curr = getMonth();
if (($curr != getConfig('last_month')) && (getConfig('bonus_ranks') > 0) && (getOutputMode() != 1)) {
// Extension 'autopurge' is inactive or purging of inactive accounts is deactivated
// Add points to user's account directly
addPointsDirectly('monthly_bonus', $content['userid'], $content['points']);
- // Translate gender/points
- $content['gender'] = translateGender($content['gender']);
- $content['points'] = translateComma($content['points']);
-
// Load email template and email it away
$message = loadEmailTemplate('member_bonus', $content, bigintval($content['userid']));
- sendEmail($content['email'], getMessage('BONUS_MONTHLY_ONLINE_BONUS'), $message);
+ sendEmail($content['email'], '{--BONUS_MONTHLY_ONLINE_BONUS--}', $message);
} // END - if
} // END - while
SQL_FREERESULT($result_main);
} // END - if
-//
+// [EOF]
?>