setContentType('text/html');
// No hash provided then we redirect to the right page
-$URL = 'modules.php?module=index&what=confirm';
+$url = 'modules.php?module=index&what=confirm';
// Is the hash there?
if (isGetRequestParameterSet('hash')) {
// We have a hash here. So we simply add it
- $URL .= '&hash=' . getRequestParameter('hash');
+ $url .= '&hash=' . getRequestParameter('hash');
} // END - if
// Load the URL
-redirectToUrl($URL);
+redirectToUrl($url);
// [EOF]
?>
// CFG: REGISTER-GLOBALS
@import_request_variables('');
-// Detect path
-$PATH = str_replace("\\", '/', substr(dirname(__FILE__), 0, -3));
+// Detect path and fix windozer paths
+$path = str_replace("\\", '/', substr(dirname(__FILE__), 0, -3));
// Some very important function includes
-foreach (array('config','wrapper','template','module','inc','stats','http') as $inc) {
- include($PATH . 'inc/' . $inc . '-functions.php');
+foreach (array('config', 'wrapper', 'template', 'module', 'inc', 'stats', 'http') as $inc) {
+ include($path . 'inc/' . $inc . '-functions.php');
} // END - foreach
-// Own functions
-include($PATH . 'inc/functions.php');
+// General functions
+include($path . 'inc/functions.php');
// Auto-detection... (patched by "Stelzi" aka. profi-concept, thanks again!)
$URL = 'http://' . detectServerName() . str_replace("\\", '/', dirname($_SERVER['PHP_SELF']));
setConfigEntry('DOMAIN', detectDomainName());
// CFG: SERVER-PATH
-setConfigEntry('PATH', $PATH);
+setConfigEntry('PATH', $path);
// CFG: VERSION
setConfigEntry('VERSION', 'v0.2.1');
// CFG: MINIMUM-ADMIN-PASS-LENGTH
setConfigEntry('minium_admin_pass_length', 4);
+// Remove maybe conflicting variables
+unset($url);
+unset($path);
+
// Connect to the database...
loadIncludeOnce('inc/mysql-connect.php');
}
// Generates an URL for the dereferer
-function generateDerefererUrl ($URL) {
+function generateDerefererUrl ($url) {
// Don't de-refer our own links!
- if (substr($URL, 0, strlen(getUrl())) != getUrl()) {
+ if (substr($url, 0, strlen(getUrl())) != getUrl()) {
// De-refer this link
- $URL = '{%url=modules.php?module=loader&url=' . encodeString(compileUriCode($URL)) . '%}';
+ $url = '{%url=modules.php?module=loader&url=' . encodeString(compileUriCode($url)) . '%}';
} // END - if
// Return link
- return $URL;
+ return $url;
}
// Generates an URL for the frametester
-function generateFrametesterUrl ($URL) {
+function generateFrametesterUrl ($url) {
// Prepare frametester URL
$frametesterUrl = sprintf("{%%url=modules.php?module=frametester&url=%s%%}",
- encodeString(compileUriCode($URL))
+ encodeString(compileUriCode($url))
);
// Return the new URL
}
// Redirects to an URL and if neccessarry extends it with own base URL
-function redirectToUrl ($URL, $allowSpider = true) {
+function redirectToUrl ($url, $allowSpider = true) {
// Remove {%url=
- if (substr($URL, 0, 6) == '{%url=') $URL = substr($URL, 6, -2);
+ if (substr($url, 0, 6) == '{%url=') {
+ $url = substr($url, 6, -2);
+ } // END - if
// Compile out codes
- eval('$URL = "' . compileRawCode(encodeUrl($URL)) . '";');
+ eval('$url = "' . compileRawCode(encodeUrl($url)) . '";');
// Default 'rel' value is external, nofollow is evil from Google and hurts the Internet
$rel = ' rel="external"';
// Do we have internal or external URL?
- if (substr($URL, 0, strlen(getUrl())) == getUrl()) {
+ if (substr($url, 0, strlen(getUrl())) == getUrl()) {
// Own (=internal) URL
$rel = '';
} // END - if
// Three different ways to debug...
- //* DEBUG: */ debug_report_bug(__FUNCTION__, __LINE__, 'URL=' . $URL);
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'URL=' . $URL);
- //* DEBUG: */ die($URL);
+ //* DEBUG: */ debug_report_bug(__FUNCTION__, __LINE__, 'URL=' . $url);
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'URL=' . $url);
+ //* DEBUG: */ die($url);
// We should not sent a redirect if headers are already sent
if (!headers_sent()) {
$GLOBALS['output'] = '';
// Load URL when headers are not sent
- sendRawRedirect(doFinalCompilation(str_replace('&', '&', $URL), false));
+ sendRawRedirect(doFinalCompilation(str_replace('&', '&', $url), false));
} else {
// Output error message
loadInclude('inc/header.php');
- loadTemplate('redirect_url', false, str_replace('&', '&', $URL));
+ loadTemplate('redirect_url', false, str_replace('&', '&', $url));
loadInclude('inc/footer.php');
}
}
// Function taken from user comments on www.php.net / function isInStringIgnoreCase()
-function isUrlValid ($URL, $compile=true) {
+function isUrlValid ($url, $compile=true) {
// Trim URL a little
- $URL = trim(urldecode($URL));
- //* DEBUG: */ debugOutput($URL);
+ $url = trim(urldecode($url));
+ //* DEBUG: */ debugOutput($url);
// Compile some chars out...
- if ($compile === true) $URL = compileUriCode($URL, false, false, false);
- //* DEBUG: */ debugOutput($URL);
+ if ($compile === true) {
+ $url = compileUriCode($url, false, false, false);
+ } // END - if
+ //* DEBUG: */ debugOutput($url);
// Check for the extension filter
if (isExtensionActive('filter')) {
// Use the extension's filter set
- return FILTER_VALIDATE_URL($URL, false);
+ return FILTER_VALIDATE_URL($url, false);
} // END - if
// If not installed, perform a simple test. Just make it sure there is always a http:// or
// https:// in front of the URLs
- return isUrlValidSimple($URL);
+ return isUrlValidSimple($url);
}
// Generate a hash for extra-security for all passwords
// Wrapper function to redirect from member-only modules to index
function redirectToIndexMemberOnlyModule () {
// Do the redirect here
- redirectToUrl('modules.php?module=index&code=' . getCode('MODULE_MEMBER_ONLY') . '&mod=' . getModule());
+ redirectToUrl('modules.php?module=index&code=' . getCode('MODULE_MEMBER_ONLY') . '&mod=' . getModule());
}
// Wrapper function to redirect to current URL
}
// Wrapper function to redirect to de-refered URL
-function redirectToDereferedUrl ($URL) {
+function redirectToDereferedUrl ($url) {
// Redirect to to
- redirectToUrl(generateDerefererUrl($URL));
+ redirectToUrl(generateDerefererUrl($url));
}
// Wrapper function for checking if extension is installed and newer or same version
if (SQL_NUMROWS($result) == 1) {
// Load data
- list($pool, $URL, $title) = SQL_FETCHROW($result);
+ list($pool, $url, $title) = SQL_FETCHROW($result);
// Free result
SQL_FREERESULT($result);
if ($isValid === true) {
// If time is zero seconds we have a sponsor mail. 1 Second shall be set to avoid problems
if (($time == '0') && ($payment > 0)) {
- $URL = getUrl();
+ $url = getUrl();
$time = 1;
} // END - if
'userid' => $userId,
'type' => $type,
'data' => $urlId,
- 'url' => $URL
+ 'url' => $url
);
// Load template
// Modules are by default not valid!
$isModuleValid = false;
-$URL = '';
// Init module state as 'failed' (always failed first)
$moduleState = 'failed';
setContentType('text/html');
// No refid by default
-$URL = 'modules.php?module=index';
+$url = 'modules.php?module=index';
if (isValidUserId(determineReferalId())) {
// Test if nickname or numeric id
// Base URL for redirection
switch (getConfig('refid_target')) {
case 'register':
- $URL = 'modules.php?module=index&what=register';
+ $url = 'modules.php?module=index&what=register';
break;
case 'index':
- $URL = 'modules.php?module=index';
+ $url = 'modules.php?module=index';
break;
} // END - switch
} // END - if
} // END - if
// Load the URL
-redirectToUrl($URL);
+redirectToUrl($url);
// [EOF]
?>
setContentType('text/html');
// No hash provided by default
-$URL = 'modules.php?module=index';
+$url = 'modules.php?module=index';
// Is there a hash?
if (isGetRequestParameterSet('hash')) {
// We have an refid here. So we simply add it
- $URL = 'modules.php?module=index&what=sponsor_login&hash=' . getRequestParameter('hash');
+ $url = 'modules.php?module=index&what=sponsor_login&hash=' . getRequestParameter('hash');
} // END - if
// Load the URL
-redirectToUrl($URL);
+redirectToUrl($url);
// [EOF]
?>
setContentType('text/html');
// Base URL for redirection
-$URL = 'modules.php?module=index&what=sponsor_reg&refid=';
+$url = 'modules.php?module=index';
// Do we have a referal id?
if (isValidUserId($GLOBALS['refid'])) {
// We have an refid here. So we simply add it
- $URL .= $GLOBALS['refid'];
-} else {
- // No refid so we redirect to the index page
- $URL = 'modules.php?module=index';
-}
+ $url .= '&what=sponsor_reg&refid=' . $GLOBALS['refid'];
+} // END - if
// Load the URL
-redirectToUrl($URL);
+redirectToUrl($url);
// [EOF]
?>
// Is the form sent?
if ((isFormSent()) && (isPostRequestParameterSet('id')) && (isPostRequestParameterSet('password'))) {
// Do the login procedure
- $URL = doUserLogin(postRequestParameter('id'), postRequestParameter('password'), basename(__FILE__), basename(__FILE__) . '?code=');
+ $url = doUserLogin(postRequestParameter('id'), postRequestParameter('password'), basename(__FILE__), basename(__FILE__) . '?code=');
// And redirect to the URL
- redirectToUrl($URL);
+ redirectToUrl($url);
} else {
// Load header
loadIncludeOnce('inc/header.php');