default:
logDebugMessage(__FUNCTION__, __LINE__, sprintf("Invalid type %s detected.", $type));
break;
- }
+ } // END - switch
// Is a column name set?
if (empty($column)) {
array(
$type,
$data,
- $userid
+ bigintval($userid)
), __FUNCTION__, __LINE__);
// Entry found?
$self = true;
// Transfer data to template
- $GLOBALS['ranking_content']['yr_level'] = $GLOBALS['ranking_content']['level'];
- $GLOBALS['ranking_content']['yr_points'] = translateComma($GLOBALS['ranking_content']['points']);
- $GLOBALS['ranking_content']['yr_tmark'] = generateDateTime($GLOBALS['ranking_content']['timemark'], 1);
+ $GLOBALS['ranking_content']['timemark'] = generateDateTime($GLOBALS['ranking_content']['timemark'], 1);
// Load template
$GLOBALS['ranking_content']['own'] = loadTemplate('show_bonus_yr', true, $GLOBALS['ranking_content']);
if ($self === false) {
// If current user was not found set constant
- $GLOBALS['ranking_content']['rankings'] = '{--BONUS_RANK_YOU_ARE_404--}';
+ $GLOBALS['ranking_content']['rankings'] = '{--MEMBER_BONUS_RANK_YOU_ARE_404--}';
} // END - if
} else {
// No entries found!
// @TODO Move this HTML to a template
$OUT = '<tr>
<td colspan="3" align="center" height="30" class="bottom">
- <div class="guest_failed">' . getMaskedMessage('BONUS_NO_RANKS', $data) . '</div>
+ <div class="guest_failed">' . getMaskedMessage('MEMBER_BONUS_NO_RANKS', $data) . '</div>
</td>
</tr>';
}
// Purges expired fast-click bonus entries
function purgeExpiredTurboBonus() {
// Remove entries
- $result = SQL_QUERY("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_bonus_turbo` WHERE `timemark` < (UNIX_TIMESTAMP() - {?bonus_timeout?})", __FUNCTION__, __LINE__);
+ $result = SQL_QUERY('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_bonus_turbo` WHERE `timemark` < (UNIX_TIMESTAMP() - {?bonus_timeout?})', __FUNCTION__, __LINE__);
if (SQL_AFFECTEDROWS() > 0) {
// Send out email to admin
} // END - if
}
-///////////////////////////////////////////////////////////////////////////////
-// Only filter functions
-///////////////////////////////////////////////////////////////////////////////
+//-----------------------------------------------------------------------------
+// Filter Functions
+//-----------------------------------------------------------------------------
// Filter for adding login bonus to the user's account
function FILTER_ADD_LOGIN_BONUS () {
if (($bonus === true) && (getRequestParameter('mode') == 'bonus')) {
// Output message with added points
- $GLOBALS['message'] .= '<div class="tiny">{--BONUS_LOGIN_BONUS_ADDED--}</div>';
+ $GLOBALS['message'] .= '<div class="tiny">{--MEMBER_BONUS_LOGIN_BONUS_ADDED--}</div>';
} elseif (isExtensionActive('bonus')) {
// No login bonus added!
- $GLOBALS['message'] .= '<div class="member_failed">{--BONUS_LOGIN_BONUS_NOT_ADDED--}</div>';
+ $GLOBALS['message'] .= '<div class="member_failed">{--MEMBER_BONUS_LOGIN_BONUS_NOT_ADDED--}</div>';
}
}
-///////////////////////////////////////////////////////////////////////////////
-// Wrapper functions //
-///////////////////////////////////////////////////////////////////////////////
+//-----------------------------------------------------------------------------
+// Wrapper Functions
+//-----------------------------------------------------------------------------
// Determines wether the "bonus rallye" is active
function isBonusRallyeActive () {