$curr = getMonth() - 1;
if (strlen($curr) == 1) $curr = '0' . $curr;
updateConfiguration('last_month', $curr);
- loadTemplate('admin_settings_saved', false, '{--ADMIN_BEG_WITHDRAW_PREPARED--}');
+ displayMessage('{--ADMIN_BEG_WITHDRAW_PREPARED--}');
} // END - if
- // Autopurge installed?
+ // Init variable
$lastOnline = '';
- if (isExtensionActive('autopurge')) {
+
+ // Autopurge installed?
+ if ((isExtensionActive('autopurge')) && (isBegActiveEnabled()) && ((getApInactiveSince() > 0))) {
// Use last online timestamp to keep inactive members away from here
- $lastOnline = " AND `last_online` >= (UNIX_TIMESTAMP() - {?ap_inactive_since?})";
+ $lastOnline = ' AND (UNIX_TIMESTAMP() - `last_online`) >= {?ap_inactive_since?}';
} // END - if
// Check if at least one is in the active rallye
} // END - while
$content['rows'] = $OUT;
- $content['total'] = $total;
+ $content['total_points'] = $total;
// Check if we need to display form or not with manuel withdraw
if (getLastMonth() == getMonth()) {
$content['withdraw_form'] = loadTemplate('admin_list_beg_form', true);
} else {
// Display message "no manual withdraw possible"
- $content['withdraw_form'] = loadTemplate('admin_settings_saved', true, '{--ADMIN_BEG_ALREADY_WITHDRAW--}');
+ $content['withdraw_form'] = displayMessage('{--ADMIN_BEG_ALREADY_WITHDRAW--}', true);
}
// Prepare constant for timemark
if (isExtensionActive('autopurge')) {
$content['autopurge_timeout'] = generateDateTime(time() - getApInactiveSince(), 2);
} else {
- $content['autopurge_timeout'] = loadTemplate('admin_settings_saved', true, generateExtensionInactiveNotInstalledMessage('autopurge'));
+ $content['autopurge_timeout'] = displayMessage(generateExtensionInactiveNotInstalledMessage('autopurge'), true);
}
// Load final template
loadTemplate('admin_list_beg', false, $content);
} else {
// No one has joined the begging rallye...
- loadTemplate('admin_settings_saved', false, '{--ADMIN_BEG_NO_RALLYE--}');
+ displayMessage('{--ADMIN_BEG_NO_RALLYE--}');
}
} else {
// Rallye deactivated
- loadTemplate('admin_settings_saved', false, '{--ADMIN_BEG_RALLYE_DEACTIVATED--}');
+ displayMessage('{--ADMIN_BEG_RALLYE_DEACTIVATED--}');
}
// [EOF]