X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Flibs%2Fpayout_functions.php;h=a75d1124d2edd9d315c8f44f36b34071be48eb3e;hp=65eb2937ba9e8a8290886e609a0204919078fbd5;hb=cd7d344ea7007cfa20413acd3e03e50f0ab86d86;hpb=263a089d8a499e0e26d0af9e7aa7639f88b8ca60 diff --git a/inc/libs/payout_functions.php b/inc/libs/payout_functions.php index 65eb2937ba..a75d1124d2 100644 --- a/inc/libs/payout_functions.php +++ b/inc/libs/payout_functions.php @@ -14,11 +14,10 @@ * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * For more information visit: http://www.mxchange.org * + * Copyright (c) 2009 - 2013 by Mailer Developer Team * + * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -46,16 +45,22 @@ function outputPayoutList ($points) { // Enougth points? if ($points > 0) { // Pay this out! - $result = SQL_QUERY_ESC("SELECT - `id`, `type`, `rate`, `min_points` + $result = SQL_QUERY_ESC('SELECT + `id`, + `type`, + `rate`, + `min_points` FROM `{?_MYSQL_PREFIX?}_payout_types` WHERE %s >= `min_points` ORDER BY - `type` ASC", + `type` ASC', array($points), __FUNCTION__, __LINE__); - if (SQL_NUMROWS($result) > 0) { + if (!SQL_HASZERONUMS($result)) { + // Init output + $OUT = ''; + // Now let's check while ($content = SQL_FETCHARRAY($result)) { // Are these points enougth? @@ -64,24 +69,45 @@ ORDER BY $content['points'] = translateComma($points * $content['rate'] - 0.5); // Load row template - $OUT .= loadTemplate('member_payout_li', true, $content); + $OUT .= loadTemplate('member_payout_li', TRUE, $content); } // END - if } // END - while // Load main template - loadTemplate('member_payout_list', true, $OUT); + loadTemplate('member_payout_list', TRUE, $OUT); } else { // No payout types setup so far - loadTemplate('admin_settings_saved', false, "
{--PAYOUT_NO_PAYOUT_TYPES--}{--PAYOUT_NO_POINTS_ENTERED--}