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__, sprintf(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'refback'));
+ addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('refback'));
return;
}
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'))) {
$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);
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) {
// 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']);
+ $refRow['points'] = translateComma($refRow['points']);
+ $refRow['refback'] = translateComma($refRow['refback']);
+ $refRow['status'] = translateUserStatus($refRow['status']);
if (empty($refRow['nickname'])) $refRow['nickname'] = '---';
// Load row template
} // 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