X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_payouts.php;h=b75664a70102dbb7c926ba4c66ca662126cce992;hb=01c643fbb3dabb7953a6e9646113eb5742ebe3be;hp=526b80d3345b7937c97b988421daeb40fd87a37f;hpb=64c8349613addc3da2242c5cd6b99d64e3fb5f8e;p=mailer.git diff --git a/inc/modules/admin/what-config_payouts.php b/inc/modules/admin/what-config_payouts.php index 526b80d334..b75664a701 100644 --- a/inc/modules/admin/what-config_payouts.php +++ b/inc/modules/admin/what-config_payouts.php @@ -1,7 +1,7 @@ {--ADMIN_PAYOUT_TYPE_ALREADY--}"; + $message = '
{--ADMIN_PAYOUT_TYPE_ALREADY--}
'; } } @@ -91,7 +91,7 @@ if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0)) { // Edit entries foreach (postRequestElement('sel') as $id => $sel) { - // Secure ID + // Secure id $id = bigintval($id); // Edit only if something is entered @@ -106,7 +106,7 @@ WHERE `id`='".$id."' LIMIT 1", array( postRequestElement('title', $id), convertCommaToDot(postRequestElement('rate', $id)), - convertCommaToDot(postRequestElement('mpoi' , $id)), + convertCommaToDot(postRequestElement('min_points' , $id)), postRequestElement('allow', $id), ),__FILE__, __LINE__, false)); } @@ -124,7 +124,7 @@ WHERE `id`='".$id."' LIMIT 1", // Load data $result = SQL_QUERY_ESC("SELECT type, rate, min_points, allow_url FROM `{?_MYSQL_PREFIX?}_payout_types` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); - list($title, $rate, $mpoi, $allow) = SQL_FETCHROW($result); + list($title, $rate, $min_points, $allow) = SQL_FETCHROW($result); SQL_FREERESULT($result); // Prepare data for the row template @@ -133,7 +133,7 @@ WHERE `id`='".$id."' LIMIT 1", 'id' => $id, 'title' => $title, 'rate' => translateComma($rate), - 'mpoi' => translateComma($mpoi), + 'min_points' => translateComma($min_points), 'allow' => addSelectionBox('yn', $allow, "allow[".$id."]"), ); @@ -166,13 +166,13 @@ WHERE `id`='".$id."' LIMIT 1", $display = false; //Suppress any other outputs $OUT = ''; $SW = 2; foreach (postRequestElement('sel') as $id => $sel) { - // Secure ID number + // Secure id number $id = bigintval($id); // Load data $result = SQL_QUERY_ESC("SELECT type, rate, min_points FROM `{?_MYSQL_PREFIX?}_payout_types` WHERE `id`=%s LIMIT 1", array($id), __FILE__, __LINE__); - list($title, $rate, $mpoi) = SQL_FETCHROW($result); + list($title, $rate, $min_points) = SQL_FETCHROW($result); SQL_FREERESULT($result); // Prepare data for the row template @@ -181,7 +181,7 @@ WHERE `id`='".$id."' LIMIT 1", 'id' => $id, 'title' => $title, 'rate' => translateComma($rate), - 'mpoi' => translateComma($mpoi), + 'min_points' => translateComma($min_points), ); // Load row template and switch color @@ -212,20 +212,19 @@ if ((SQL_NUMROWS($result_type) > 0) && ($display)) { $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result_type)) { // Prepare data for the row template - // @TODO Rewrite in template: mpoi->min_points,from->from_account $content = array( - 'sw' => $SW, - 'id' => $content['id'], - 'from' => $content['from_account'], - 'type' => $content['type'], - 'rate' => translateComma($content['rate']), - 'mpoi' => translateComma($content['min_points']), + 'sw' => $SW, + 'id' => $content['id'], + 'from_account' => $content['from_account'], + 'type' => $content['type'], + 'rate' => translateComma($content['rate']), + 'min_points' => translateComma($content['min_points']), ); // Load row template and switch color $OUT .= loadTemplate('admin_config_payouts_row', true, $content); $SW = 3 - $SW; - } + } // END - while // Free memory SQL_FREERESULT($result_type); @@ -237,7 +236,7 @@ if ((SQL_NUMROWS($result_type) > 0) && ($display)) { // Does your members request payouts? if ((SQL_NUMROWS($result_mem) > 0) && ($display)) { // Members has requested payouts - loadTemplate('admin_settings_saved', false, "{--ADMIN_PAYOUT_LIST_REQUESTS--}

"); + loadTemplate('admin_settings_saved', false, '{--ADMIN_PAYOUT_LIST_REQUESTS--}'); } elseif ($display) { // No member requests so far loadTemplate('admin_settings_saved', false, getMessage('ADMIN_PAYOUT_NO_MEMBER_REQUESTS')); @@ -246,7 +245,7 @@ if ((SQL_NUMROWS($result_mem) > 0) && ($display)) { // Free result SQL_FREERESULT($result_mem); -// Add new paypout type +// Add new payout type if ($display === true) loadTemplate('admin_payout_add_new'); // [EOF]