X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=inc%2Fmodules%2Fmember%2Fwhat-refback.php;h=f78aba8b9bd31d3a6ce50f326f963474ecc15203;hb=af59daf6541b279989547829c95adc5bee8ca11d;hp=7bd83a4acded1617c7fd3e09689043ee9533d292;hpb=5bdeaf8b452206598b6c6cd4f941145b11a0eccc;p=mailer.git diff --git a/inc/modules/member/what-refback.php b/inc/modules/member/what-refback.php index 7bd83a4acd..f78aba8b9b 100644 --- a/inc/modules/member/what-refback.php +++ b/inc/modules/member/what-refback.php @@ -39,12 +39,12 @@ if (!defined('__SECURITY')) { // User is not logged in LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("refback")) && (!IS_ADMIN())) { - addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "refback"); + addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "refback"); return; } // Is the refback system enabled? -if (getConfig('refback_enabled') == "N") { +if (getConfig('refback_enabled') != "Y") { // Output message LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEMBER_REFBACK_DISABLED')); // Abort here @@ -55,16 +55,16 @@ if (getConfig('refback_enabled') == "N") { ADD_DESCR("member", __FILE__); // Was the form submitted? -if ((isset($_POST['edit'])) && (isset($_POST['id']))) { +if ((REQUEST_ISSET_POST(('edit'))) && (REQUEST_ISSET_POST(('id')))) { // Okay, has the user entered some values? - if (isset($_POST['percents'])) { + if (REQUEST_ISSET_POST(('percents'))) { // Revert german commta for testing - $percents = REVERT_COMMA($_POST['percents']); + $percents = REVERT_COMMA(REQUEST_POST('percents')); // Validate percents if ((($percents >= getConfig('refback_min_perc')) || (round($percents) == 0)) && ($percents <= getConfig('refback_max_perc'))) { // Change ref-back for this direct id - $status = REFBACK_CHANGE_MEMBER_PERCENTS($_POST['id'], $_POST['percents']); + $status = REFBACK_CHANGE_MEMBER_PERCENTS(REQUEST_POST('id'), REQUEST_POST('percents')); // Check status if (isset($status['ok'])) { @@ -72,21 +72,20 @@ if ((isset($_POST['edit'])) && (isset($_POST['id']))) { LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEMBER_REFBACK_DONE')); } elseif (isset($status['message'])) { // Something went wrong with error message - LOAD_TEMPLATE("admin_settings_saved", false, sprintf(MEMBER_REFBACK_ERROR_MESSAGE, $status['message'])); + LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('MEMBER_REFBACK_ERROR_MESSAGE'), $status['message'])); } else { // No message found - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEMBER_REFBACK_ERROR_EMPTY_MESSAGE); + LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEMBER_REFBACK_ERROR_EMPTY_MESSAGE')); } } else { // Percents out-of-bounds ;-) - LOAD_TEMPLATE("admin_settings_saved", false, sprintf(MEMBER_REFBACK_ERROR_OUT_OF_BOUNDS, getConfig('refback_min_perc'), getConfig('refback_max_perc'))); + LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('MEMBER_REFBACK_ERROR_OUT_OF_BOUNDS'), getConfig('refback_min_perc'), getConfig('refback_max_perc'))); } // Insert line - OUTPUT_HTML("
"); } else { // Read data from refback table - $content = GET_USER_REF_ENTRY($_POST['id']); + $content = GET_USER_REF_ENTRY(REQUEST_POST('id')); // Translate comma $content['refback'] = TRANSLATE_COMMA($content['refback']);