X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-list_bonus.php;h=648aa7ed31b4765e0ea7a7b87f2d139fa275f183;hp=78e687de933eaf28bfd8377e78973a6f52c3217a;hb=61621983cc6d7195fcc7eab29b5f6080ff283b34;hpb=c9a5bbe818b2dbcf8e8d5774fb25f08c40c92bd8 diff --git a/inc/modules/admin/what-list_bonus.php b/inc/modules/admin/what-list_bonus.php index 78e687de93..648aa7ed31 100644 --- a/inc/modules/admin/what-list_bonus.php +++ b/inc/modules/admin/what-list_bonus.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2012 by Mailer Developer Team * + * Copyright (c) 2009 - 2016 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -47,8 +47,8 @@ if (isBonusRallyeActive()) { // 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, 2); + updateConfiguration('last_monthly', $curr); displayMessage('{--ADMIN_BONUS_WITHDRAW_PREPARED--}'); } // END - if @@ -74,7 +74,7 @@ if (isBonusRallyeActive()) { } // END - if // Check if at least one is in the active rallye - $result = SQL_QUERY("SELECT + $result = sqlQuery("SELECT `userid`, `email`, " . $pointsColumns . " AS `points`, @@ -91,12 +91,12 @@ ORDER BY `last_online` DESC, `userid` ASC", __FILE__, __LINE__); - if (!SQL_HASZERONUMS($result)) { + if (!ifSqlHasZeroNumRows($result)) { // List users $OUT = ''; $count = 1; $total = '0'; - while ($content = SQL_FETCHARRAY($result)) { + while ($content = sqlFetchArray($result)) { // Add total points $total += $content['points']; @@ -124,12 +124,12 @@ ORDER BY $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'] = returnErrorMessage('{--ADMIN_BONUS_ALREADY_WITHDRAW--}'); } // Prepare constant for timemark