X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fmember%2Fwhat-refback.php;h=6ca744e64676ed00bf5018e65ef975a010e25e72;hb=a14286dbeccc671261191608fbab164d0f35c507;hp=922861be91a481525842c17d439c0782435618d9;hpb=a090e351c49fe021fb3064325694da03402332e0;p=mailer.git diff --git a/inc/modules/member/what-refback.php b/inc/modules/member/what-refback.php index 922861be91..6ca744e646 100644 --- a/inc/modules/member/what-refback.php +++ b/inc/modules/member/what-refback.php @@ -38,18 +38,18 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; + $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; require($INC); } elseif (!IS_MEMBER()) { // User is not logged in - LOAD_URL('modules.php?module=index'); + redirectToUrl('modules.php?module=index'); } elseif ((!EXT_IS_ACTIVE('refback')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'refback'); + addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('refback')); return; } // Is the refback system enabled? -if (getConfig('refback_enabled') != "Y") { +if (getConfig('refback_enabled') != 'Y') { // Output message LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_REFBACK_DISABLED')); // Abort here @@ -60,11 +60,11 @@ if (getConfig('refback_enabled') != "Y") { ADD_DESCR('member', __FILE__); // Was the form submitted? -if ((REQUEST_ISSET_POST('edit')) && (REQUEST_ISSET_POST(('id')))) { +if ((REQUEST_ISSET_POST('edit')) && (REQUEST_ISSET_POST('id'))) { // Okay, has the user entered some values? - if (REQUEST_ISSET_POST(('percents'))) { + if (REQUEST_ISSET_POST('percents')) { // Revert german commta for testing - $percents = REVERT_COMMA(REQUEST_POST('percents')); + $percents = convertCommaToDot(REQUEST_POST('percents')); // Validate percents if ((($percents >= getConfig('refback_min_perc')) || (round($percents) == 0)) && ($percents <= getConfig('refback_max_perc'))) { @@ -93,9 +93,9 @@ if ((REQUEST_ISSET_POST('edit')) && (REQUEST_ISSET_POST(('id')))) { $content = GET_USER_REF_ENTRY(REQUEST_POST('id')); // Translate comma - $content['refback'] = TRANSLATE_COMMA($content['refback']); - $content['min'] = TRANSLATE_COMMA(getConfig('refback_min_perc').".0"); - $content['max'] = TRANSLATE_COMMA(getConfig('refback_max_perc').".0"); + $content['refback'] = translateComma($content['refback']); + $content['min'] = translateComma(getConfig('refback_min_perc').".0"); + $content['max'] = translateComma(getConfig('refback_max_perc').".0"); // Load form for editing LOAD_TEMPLATE("member_refback_edit", false, $content); @@ -107,7 +107,7 @@ $result = SQL_QUERY_ESC("SELECT r.level, r.percents FROM `{!_MYSQL_PREFIX!}_refdepths` AS r WHERE r.level > 0 ORDER BY r.level ASC", - array(getUserId()), __FILE__, __LINE__); +array(getUserId()), __FILE__, __LINE__); // Are there some entries? (Shall be!) if (SQL_NUMROWS($result) > 0) { @@ -127,10 +127,10 @@ if (SQL_NUMROWS($result) > 0) { // Add/"translate" more content $refRow['sw'] = $SW; - $refRow['points'] = TRANSLATE_COMMA($refRow['points']); - $refRow['refback'] = TRANSLATE_COMMA($refRow['refback']); - $refRow['status'] = TRANSLATE_STATUS($refRow['status']); - if (empty($refRow['nickname'])) $refRow['nickname'] = "---"; + $refRow['points'] = translateComma($refRow['points']); + $refRow['refback'] = translateComma($refRow['refback']); + $refRow['status'] = translateUserStatus($refRow['status']); + if (empty($refRow['nickname'])) $refRow['nickname'] = '---'; // Load row template if ($deleted) { @@ -145,8 +145,8 @@ if (SQL_NUMROWS($result) > 0) { } // END - foreach // Remember the content - $content['counter'] = TRANSLATE_COMMA($counter); - $content['percents'] = TRANSLATE_COMMA($content['percents']); + $content['counter'] = translateComma($counter); + $content['percents'] = translateComma($content['percents']); $content['rows'] = $rows; // Load level template