// 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, MEMBER_REFBACK_DISABLED);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEMBER_REFBACK_DISABLED'));
// Abort here
return false;
} // END - if
// Check status
if (isset($status['ok'])) {
// No message found
- LOAD_TEMPLATE("admin_settings_saved", false, MEMBER_REFBACK_DONE);
+ 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, 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("<br />");
} else {
// Read data from refback table
$content = GET_USER_REF_ENTRY($_POST['id']);
// Load all referal levels
$result = SQL_QUERY_ESC("SELECT r.level, r.percents
-FROM `{!MYSQL_PREFIX!}_refdepths` AS r
+FROM `{!_MYSQL_PREFIX!}_refdepths` AS r
WHERE r.level > 0
ORDER BY r.level ASC",
array($GLOBALS['userid']), __FILE__, __LINE__);
LOAD_TEMPLATE("member_refback_list", false, $OUT);
} else {
// No entries
- LOAD_TEMPLATE("admin_settings_saved", false, MEMBER_REFBACK_NO_ENTRIES);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEMBER_REFBACK_NO_ENTRIES'));
}
// Free result