//
function FRAMETESTER ($URL) {
// Prepare frametester URL
- $frametesterUrl = sprintf("%s/modules.php?module=frametester&url=%s",
- URL,
+ $frametesterUrl = sprintf("{!URL!}/modules.php?module=frametester&url=%s",
encodeString(compileUriCode($URL))
);
return $frametesterUrl;
default:
DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status));
- $ret = sprintf(getMessage('UNKNOWN_STATUS"'), $status);
+ $ret = sprintf(getMessage('UNKNOWN_STATUS'), $status);
break;
}
// Generate a hash for extra-security for all passwords
function generateHash ($plainText, $salt = "") {
- global $_SERVER;
-
// Is the required extension "sql_patches" there and a salt is not given?
if (((EXT_VERSION_IS_OLDER("sql_patches", "0.3.6")) || (!EXT_IS_ACTIVE("sql_patches"))) && (empty($salt))) {
// Extension sql_patches is missing/outdated so we hash the plain text with MD5
case getCode('COOKIES_DISABLED') : $msg = getMessage('LOGIN_NO_COOKIES'); break;
case getCode('BEG_SAME_AS_OWN') : $msg = getMessage('BEG_SAME_UID_AS_OWN'); break;
case getCode('LOGIN_FAILED') : $msg = getMessage('LOGIN_FAILED_GENERAL'); break;
- default : $msg = sprintf(getMessage('UNKNOWN_MAILID_CODE'), $code); break;
+ case getCode('MODULE_MEM_ONLY') : $msg = sprintf(getMessage('MODULE_MEM_ONLY'), REQUEST_GET('mod')); break;
+
+ default:
+ // Missing/invalid code
+ $msg = sprintf(getMessage('UNKNOWN_MAILID_CODE'), $code);
+
+ // Log it
+ DEBUG_LOG(__FUNCTION__, __LINE__, $msg);
+ break;
} // END - switch
// Return the message
// Determines referal id and sets it
function DETERMINE_REFID () {
- global $CLICK, $_SERVER;
-
// Check if refid is set
- if ((!empty($_GET['user'])) && ($CLICK == 1) && (basename($_SERVER['PHP_SELF']) == "click.php")) {
+ if ((!empty($_GET['user'])) && (basename($_SERVER['PHP_SELF']) == "click.php")) {
// The variable user comes from the click-counter script click.php and we only accept this here
$GLOBALS['refid'] = bigintval($_GET['user']);
} elseif (!empty($_POST['refid'])) {
} // END - if
}
+// Handle message codes from URL
+function handleCodeMessage () {
+ if (REQUEST_ISSET_GET(('msg'))) {
+ // Default extension is "unknown"
+ $ext = "unknown";
+
+ // Is extension given?
+ if (REQUEST_ISSET_GET(('ext'))) $ext = REQUEST_GET(('ext'));
+
+ // Convert the 'msg' parameter from URL to a human-readable message
+ $msg = convertCodeToMessage(REQUEST_GET('msg'));
+
+ // Load message template
+ LOAD_TEMPLATE("message", false, $msg);
+ } // END - if
+}
+
//////////////////////////////////////////////////
// AUTOMATICALLY RE-GENERATED MISSING FUNCTIONS //
//////////////////////////////////////////////////