X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_payouts.php;h=022278ebe6648fc471ee39b60ba589365f4134c8;hb=ee3a0b42f93de7676fca549c866c1c2e6f3f0576;hp=2b016d0b3e9aaf2621c1accf892c8bd031ca04bb;hpb=20741b93fd58620af677a7f1039ffd16ea6ec689;p=mailer.git diff --git a/inc/modules/admin/what-config_payouts.php b/inc/modules/admin/what-config_payouts.php index 2b016d0b3e..022278ebe6 100644 --- a/inc/modules/admin/what-config_payouts.php +++ b/inc/modules/admin/what-config_payouts.php @@ -43,11 +43,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addYouAreHereLink('admin', __FILE__); -// Convert 'rate' if set -if (isPostRequestElementSet('rate')) { - convertCommaToDotInPostData('rate'); -} // END - if - +// Do we add an entry? if ((isFormSent('add')) && (isPostRequestElementSet('title')) && (postRequestElement('rate') > 0)) { // Add new payout type $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_payout_types` WHERE type='%s' LIMIT 1", @@ -81,7 +77,7 @@ if ((isFormSent('add')) && (isPostRequestElementSet('title')) && (postRequestEle SQL_FREERESULT($result); // Does already exist - $message = '
{--ADMIN_PAYOUT_TYPE_ALREADY--}
'; + $message = '
{--ADMIN_PAYOUT_TYPE_ALREADY--}
'; } } @@ -120,7 +116,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections())) { $id = bigintval($id); // Edit only if something is entered - if ((isPostRequestElementSet('title', $id)) && (postRequestElement('rate', $id) > 0)) { + if ((isPostRequestElementSet('type', $id)) && (postRequestElement('rate', $id) > 0)) { // Update entry addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_payout_types` SET `type`='%s', @@ -135,7 +131,7 @@ LIMIT 1", convertCommaToDot(postRequestElement('rate', $id)), convertCommaToDot(postRequestElement('min_points' , $id)), postRequestElement('allow_url', $id), - bigintval($id) + $id ),__FILE__, __LINE__, false)); } } @@ -223,7 +219,7 @@ SQL_FREERESULT($result_mem); // Add new payout type if ($display === true) { - loadTemplate('admin_payout_add_new'); + loadTemplate('admin_add_payout'); } // END - if // [EOF]