// Shall I withdraw now?
if (isPostRequestElementSet('withdraw')) {
// Okay, let's prepare...
- $curr = str_pad((getMonth() - 1), 2, '0', STR_PAD_LEFT);
- updateConfiguration('last_month', $curr);
+ $curr = padLeftZero(getMonth() - 1);
+ updateConfiguration('last_monthly', $curr);
displayMessage('{--ADMIN_BONUS_WITHDRAW_PREPARED--}');
} // END - if
$content['total_points'] = $total;
// Check if we need to display form or not with manuel withdraw
- if (getLastMonth() == getMonth()) {
+ if (getLastMonthly() == getMonth()) {
// Load form
$content['withdraw_form'] = loadTemplate('admin_list_bonus_form', TRUE);
} else {
// Display message "no manual withdraw possible"
- $content['withdraw_form'] = loadTemplate('admin_settings_unsaved', TRUE, '{--ADMIN_BONUS_ALREADY_WITHDRAW--}');
+ $content['withdraw_form'] = displayErrorMessage('{--ADMIN_BONUS_ALREADY_WITHDRAW--}', TRUE);
}
// Prepare constant for timemark