return false;
}
-if (getConfig('auto_purge') > 0) {
+if (getAutoPurge() > 0) {
// Init SQLs
initSqls();
// Prepare variables and constants...
$useridsContent = '';
$content['since'] = (getApInactiveSince() / 60 / 60);
- $content['time'] = (getConfig('ap_inactive_time') / 60 / 60);
+ $content['time'] = (getApInactiveTime() / 60 / 60);
// Mark found accounts as inactive and send an email
while ($row = SQL_FETCHARRAY($result_inactive)) {
if (!SQL_HASZERONUMS($result_uncon)) {
// Prepare variable...
$userids = '';
- $content['time'] = (getConfig('ap_unconfirmed_time') / 60 / 60);
+ $content['time'] = (getApUnconfirmedTime() / 60 / 60);
// Delete inactive accounts
while ($row = SQL_FETCHARRAY($result_uncon)) {
if (!isBonusRallyeActive()) return;
// Switch to jackpot-mode when no UID is supplied but userid-mode is selected
- if ((getConfig('bonus_mode') == 'UID') && (getConfig('bonus_userid') == '0') && (isExtensionActive('jackpot'))) {
+ if ((getConfig('bonus_mode') == 'UID') && (getBonusUserId() == '0') && (isExtensionActive('jackpot'))) {
// Update database & config
updateConfiguration('bonus_mode', 'JACKPOT');
} // END - if
}
// Check his amount first
- $total = countSumTotalData(getConfig('bonus_userid'), 'user_points', 'points') - countSumTotalData(getConfig('bonus_userid'), 'user_data', 'used_points');
+ $total = countSumTotalData(getBonusUserId(), 'user_points', 'points') - countSumTotalData(getBonusUserId(), 'user_data', 'used_points');
// Subtract points from...
switch (getConfig('bonus_mode')) {
case 'JACKPOT': // ... jackpot
- if ((isExtensionActive('jackpot')) && (subtractPointsFromJackpot($points) == -1) && (isValidUserId(getConfig('bonus_userid')))) {
+ if ((isExtensionActive('jackpot')) && (subtractPointsFromJackpot($points) == -1) && (isValidUserId(getBonusUserId()))) {
if ($total >= $points) {
// Subtract points from userid's account
- subtractPointsFromJackpot('bonus_payout_jackpot', getConfig('bonus_userid'), $points);
+ subtractPointsFromJackpot('bonus_payout_jackpot', getBonusUserId(), $points);
} // END - if
} // END - if
break;
case 'UID': // ... userid's account
if ($total >= $points) {
// Subtract points from userid's account
- subtractPoints('bonus_payout_userid', getConfig('bonus_userid'), $points);
+ subtractPoints('bonus_payout_userid', getBonusUserId(), $points);
} elseif (isExtensionActive('jackpot')) {
// Try to subtract from jackpot
$dummy = subtractPointsFromJackpot($points);
// Output time selection boxes
$content['ap_in_since'] = createTimeSelections(getApInactiveSince() , 'ap_inactive_since' , 'MWDh');
- $content['ap_in_time'] = createTimeSelections(getConfig('ap_inactive_time') , 'ap_inactive_time' , 'MWDh');
- $content['ap_un_time'] = createTimeSelections(getConfig('ap_unconfirmed_time'), 'ap_unconfirmed_time', 'MWDh');
- $content['ap_task_time'] = createTimeSelections(getConfig('ap_tasks_time') , 'ap_tasks_time' , 'MWDh');
- $content['ap_del_mails_time'] = createTimeSelections(getConfig('ap_dm_timeout') , 'ap_dm_timeout' , 'MWDh');
+ $content['ap_in_time'] = createTimeSelections(getApInactiveTime() , 'ap_inactive_time' , 'MWDh');
+ $content['ap_un_time'] = createTimeSelections(getApUnconfirmedTime(), 'ap_unconfirmed_time', 'MWDh');
+ $content['ap_task_time'] = createTimeSelections(getApTasksTime() , 'ap_tasks_time' , 'MWDh');
+ $content['ap_del_mails_time'] = createTimeSelections(getApDmTimeout() , 'ap_dm_timeout' , 'MWDh');
// Mail confirmation links
- $content['auto_purge'] = createTimeSelections(getConfig('auto_purge'), 'auto_purge', 'MWD');
+ $content['auto_purge'] = createTimeSelections(getAutoPurge(), 'auto_purge', 'MWD');
// Prepare more Y/N selections
foreach (array('auto_purge_active') as $entry) {
$content['notify'] = translateComma(getConfig('bonus_notify_points'), false);
// Transfer options to template
- $content['member_selection'] = addMemberSelectionBox(getConfig('bonus_userid'), false, true, true, 'bonus_userid');
+ $content['member_selection'] = addMemberSelectionBox(getBonusUserId(), false, true, true, 'bonus_userid');
// Initialize array for the points list
$RANKS = explode(';', getConfig('turbo_rates'));
// Is content an array?
if (is_array($content)) {
// Add expiration to array
- if ((isConfigEntrySet('auto_purge')) && (getConfig('auto_purge') == '0')) {
+ if ((isConfigEntrySet('auto_purge')) && (getAutoPurge() == '0')) {
// Will never expire!
$content['expiration'] = '{--MAIL_WILL_NEVER_EXPIRE--}';
} elseif (isConfigEntrySet('auto_purge')) {
// Create nice date string
- $content['expiration'] = createFancyTime(getConfig('auto_purge'));
+ $content['expiration'] = createFancyTime(getAutoPurge());
} else {
// Missing entry
$content['expiration'] = '{--MAIL_NO_CONFIG_AUTO_PURGE--}';
return $GLOBALS['ap_inactive_since'];
}
+// "Getter" for user_min_confirmed
+function getUserMinConfirmed () {
+ // Do we have cache?
+ if (!isset($GLOBALS['user_min_confirmed'])) {
+ // Determine it
+ $GLOBALS['user_min_confirmed'] = getConfig('user_min_confirmed');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['user_min_confirmed'];
+}
+
+// "Getter" for auto_purge
+function getAutoPurge () {
+ // Do we have cache?
+ if (!isset($GLOBALS['auto_purge'])) {
+ // Determine it
+ $GLOBALS['auto_purge'] = getConfig('auto_purge');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['auto_purge'];
+}
+
+// "Getter" for bonus_userid
+function getBonusUserid () {
+ // Do we have cache?
+ if (!isset($GLOBALS['bonus_userid'])) {
+ // Determine it
+ $GLOBALS['bonus_userid'] = getConfig('bonus_userid');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['bonus_userid'];
+}
+
+// "Getter" for ap_inactive_time
+function getApInactiveTime () {
+ // Do we have cache?
+ if (!isset($GLOBALS['ap_inactive_time'])) {
+ // Determine it
+ $GLOBALS['ap_inactive_time'] = getConfig('ap_inactive_time');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['ap_inactive_time'];
+}
+
+// "Getter" for ap_dm_timeout
+function getApDmTimeout () {
+ // Do we have cache?
+ if (!isset($GLOBALS['ap_dm_timeout'])) {
+ // Determine it
+ $GLOBALS['ap_dm_timeout'] = getConfig('ap_dm_timeout');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['ap_dm_timeout'];
+}
+
+// "Getter" for ap_tasks_time
+function getApTasksTime () {
+ // Do we have cache?
+ if (!isset($GLOBALS['ap_tasks_time'])) {
+ // Determine it
+ $GLOBALS['ap_tasks_time'] = getConfig('ap_tasks_time');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['ap_tasks_time'];
+}
+
+// "Getter" for ap_unconfirmed_time
+function getApUnconfirmedTime () {
+ // Do we have cache?
+ if (!isset($GLOBALS['ap_unconfirmed_time'])) {
+ // Determine it
+ $GLOBALS['ap_unconfirmed_time'] = getConfig('ap_unconfirmed_time');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['ap_unconfirmed_time'];
+}
+
+// "Getter" for points
+function getPoints () {
+ // Do we have cache?
+ if (!isset($GLOBALS['points'])) {
+ // Determine it
+ $GLOBALS['points'] = getConfig('POINTS');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['points'];
+}
+
+// "Getter" for slogan
+function getSlogan () {
+ // Do we have cache?
+ if (!isset($GLOBALS['slogan'])) {
+ // Determine it
+ $GLOBALS['slogan'] = getConfig('SLOGAN');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['slogan'];
+}
+
+// "Getter" for copy
+function getCopy () {
+ // Do we have cache?
+ if (!isset($GLOBALS['copy'])) {
+ // Determine it
+ $GLOBALS['copy'] = getConfig('COPY');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['copy'];
+}
+
+// "Getter" for sql_count
+function getSqlCount () {
+ // Do we have cache?
+ if (!isset($GLOBALS['sql_count'])) {
+ // Determine it
+ $GLOBALS['sql_count'] = getConfig('sql_count');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['sql_count'];
+}
+
+// "Getter" for num_templates
+function getNumTemplates () {
+ // Do we have cache?
+ if (!isset($GLOBALS['num_templates'])) {
+ // Determine it
+ $GLOBALS['num_templates'] = getConfig('num_templates');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['num_templates'];
+}
+
+// "Getter" for dns_cache_timeout
+function getDnsCacheTimeout () {
+ // Do we have cache?
+ if (!isset($GLOBALS['dns_cache_timeout'])) {
+ // Determine it
+ $GLOBALS['dns_cache_timeout'] = getConfig('dns_cache_timeout');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['dns_cache_timeout'];
+}
+
// Checks wether proxy configuration is used
function isProxyUsed () {
// Do we have cache?
// Is an active-rallye running and this is not a notification mail?
if ((isBonusRallyeActive()) && ($notify != 'Y')) {
// Shall I exclude the webmaster's own userid from the active-rallye?
- if ((((getConfig('bonus_userid') == $url_userid) && (getConfig('bonus_include_own') == 'Y')) || (getConfig('bonus_userid') != $url_userid)) && (getConfig('def_refid') != $url_userid)) {
+ if ((((getBonusUserId() == $url_userid) && (getConfig('bonus_include_own') == 'Y')) || (getBonusUserId() != $url_userid)) && (getConfig('def_refid') != $url_userid)) {
// Add points and remember ranking are done in this function....
addTurboBonus($urlId, $url_userid, $type);