]> git.mxchange.org Git - mailer.git/commitdiff
Renamed some all-capitalized variables small
authorRoland Häder <roland@mxchange.org>
Tue, 28 Jun 2011 20:39:41 +0000 (20:39 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 28 Jun 2011 20:39:41 +0000 (20:39 +0000)
confirm.php
inc/config-global.php
inc/functions.php
inc/wrapper-functions.php
mailid.php
modules.php
ref.php
sponsor_confirm.php
sponsor_ref.php
surfbar.php

index 6c283d3fee6cbda4f87f503bee298700d5283e32..b17229394b954a6957fd2d364b8c0ea6c9467336 100644 (file)
@@ -49,16 +49,16 @@ require('inc/config-global.php');
 setContentType('text/html');
 
 // No hash provided then we redirect to the right page
 setContentType('text/html');
 
 // No hash provided then we redirect to the right page
-$URL = 'modules.php?module=index&amp;what=confirm';
+$url = 'modules.php?module=index&amp;what=confirm';
 
 // Is the hash there?
 if (isGetRequestParameterSet('hash')) {
        // We have a hash here. So we simply add it
 
 // Is the hash there?
 if (isGetRequestParameterSet('hash')) {
        // We have a hash here. So we simply add it
-       $URL .= '&amp;hash=' . getRequestParameter('hash');
+       $url .= '&amp;hash=' . getRequestParameter('hash');
 } // END - if
 
 // Load the URL
 } // END - if
 
 // Load the URL
-redirectToUrl($URL);
+redirectToUrl($url);
 
 // [EOF]
 ?>
 
 // [EOF]
 ?>
index e4ad94833692650e41b506abdc41d8bff93ee682..425f89082e5168d84e4f83ea7be41bb0614ac336 100644 (file)
@@ -56,16 +56,16 @@ error_reporting(E_ALL | E_STRICT);
 // CFG: REGISTER-GLOBALS
 @import_request_variables('');
 
 // 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
 
 // 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
 
 } // 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']));
 
 // Auto-detection... (patched by "Stelzi" aka. profi-concept, thanks again!)
 $URL = 'http://' . detectServerName() . str_replace("\\", '/', dirname($_SERVER['PHP_SELF']));
@@ -81,7 +81,7 @@ setConfigEntry('URL', $URL);
 setConfigEntry('DOMAIN', detectDomainName());
 
 // CFG: SERVER-PATH
 setConfigEntry('DOMAIN', detectDomainName());
 
 // CFG: SERVER-PATH
-setConfigEntry('PATH', $PATH);
+setConfigEntry('PATH', $path);
 
 // CFG: VERSION
 setConfigEntry('VERSION', 'v0.2.1');
 
 // CFG: VERSION
 setConfigEntry('VERSION', 'v0.2.1');
@@ -110,6 +110,10 @@ setConfigEntry('salt_length', 10);
 // CFG: MINIMUM-ADMIN-PASS-LENGTH
 setConfigEntry('minium_admin_pass_length', 4);
 
 // 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');
 
 // Connect to the database...
 loadIncludeOnce('inc/mysql-connect.php');
 
index dbb38836ce3805886a5b7280f30b48474b2d9714..6f570cdd1ffc2afa2b191fba0d67a3ebc7ee5673 100644 (file)
@@ -478,22 +478,22 @@ function translateMenuVisibleLocked ($content, $prefix = '') {
 }
 
 // Generates an URL for the dereferer
 }
 
 // Generates an URL for the dereferer
-function generateDerefererUrl ($URL) {
+function generateDerefererUrl ($url) {
        // Don't de-refer our own links!
        // 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
                // De-refer this link
-               $URL = '{%url=modules.php?module=loader&amp;url=' . encodeString(compileUriCode($URL)) . '%}';
+               $url = '{%url=modules.php?module=loader&amp;url=' . encodeString(compileUriCode($url)) . '%}';
        } // END - if
 
        // Return link
        } // END - if
 
        // Return link
-       return $URL;
+       return $url;
 }
 
 // Generates an URL for the frametester
 }
 
 // Generates an URL for the frametester
-function generateFrametesterUrl ($URL) {
+function generateFrametesterUrl ($url) {
        // Prepare frametester URL
        $frametesterUrl = sprintf("{%%url=modules.php?module=frametester&amp;url=%s%%}",
        // Prepare frametester URL
        $frametesterUrl = sprintf("{%%url=modules.php?module=frametester&amp;url=%s%%}",
-               encodeString(compileUriCode($URL))
+               encodeString(compileUriCode($url))
        );
 
        // Return the new URL
        );
 
        // Return the new URL
@@ -540,26 +540,28 @@ function makeTime ($hours, $minutes, $seconds, $stamp) {
 }
 
 // Redirects to an URL and if neccessarry extends it with own base 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=
        // 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
 
        // 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?
 
        // 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...
                // 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()) {
 
        // We should not sent a redirect if headers are already sent
        if (!headers_sent()) {
@@ -570,11 +572,11 @@ function redirectToUrl ($URL, $allowSpider = true) {
                $GLOBALS['output'] = '';
 
                // Load URL when headers are not sent
                $GLOBALS['output'] = '';
 
                // Load URL when headers are not sent
-               sendRawRedirect(doFinalCompilation(str_replace('&amp;', '&', $URL), false));
+               sendRawRedirect(doFinalCompilation(str_replace('&amp;', '&', $url), false));
        } else {
                // Output error message
                loadInclude('inc/header.php');
        } else {
                // Output error message
                loadInclude('inc/header.php');
-               loadTemplate('redirect_url', false, str_replace('&amp;', '&', $URL));
+               loadTemplate('redirect_url', false, str_replace('&amp;', '&', $url));
                loadInclude('inc/footer.php');
        }
 
                loadInclude('inc/footer.php');
        }
 
@@ -844,24 +846,26 @@ function isEmailValid ($email) {
 }
 
 // Function taken from user comments on www.php.net / function isInStringIgnoreCase()
 }
 
 // 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
        // Trim URL a little
-       $URL = trim(urldecode($URL));
-       //* DEBUG: */ debugOutput($URL);
+       $url = trim(urldecode($url));
+       //* DEBUG: */ debugOutput($url);
 
        // Compile some chars out...
 
        // 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
 
        // 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
        } // 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
 }
 
 // Generate a hash for extra-security for all passwords
index 0c2c4425efa2beb4bc47669cf68636dd3a46396e..eeed642ae71b576ecc4d3e9579e18db71b39c107 100644 (file)
@@ -752,7 +752,7 @@ function redirectToConfiguredUrl ($configEntry) {
 // Wrapper function to redirect from member-only modules to index
 function redirectToIndexMemberOnlyModule () {
        // Do the redirect here
 // 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&amp;code=' . getCode('MODULE_MEMBER_ONLY') . '&amp;mod=' . getModule());
 }
 
 // Wrapper function to redirect to current URL
 }
 
 // Wrapper function to redirect to current URL
@@ -761,9 +761,9 @@ function redirectToRequestUri () {
 }
 
 // Wrapper function to redirect to de-refered URL
 }
 
 // Wrapper function to redirect to de-refered URL
-function redirectToDereferedUrl ($URL) {
+function redirectToDereferedUrl ($url) {
        // Redirect to to
        // Redirect to to
-       redirectToUrl(generateDerefererUrl($URL));
+       redirectToUrl(generateDerefererUrl($url));
 }
 
 // Wrapper function for checking if extension is installed and newer or same version
 }
 
 // Wrapper function for checking if extension is installed and newer or same version
index 3ae1fa55b87ae77d89c0b9d7efae61ca6b6ba32c..7f1746bdfb4204ba4de49f9974df7815e3717e33 100644 (file)
@@ -117,7 +117,7 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr
 
                if (SQL_NUMROWS($result) == 1) {
                        // Load data
 
                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);
 
                        // Free result
                        SQL_FREERESULT($result);
@@ -177,7 +177,7 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr
                                        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)) { 
                                        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
 
                                                        $time = 1; 
                                                } // END - if
 
@@ -190,7 +190,7 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr
                                                                'userid'  => $userId,
                                                                'type'    => $type,
                                                                'data'    => $urlId,
                                                                'userid'  => $userId,
                                                                'type'    => $type,
                                                                'data'    => $urlId,
-                                                               'url'     => $URL
+                                                               'url'     => $url
                                                        );
 
                                                        // Load template
                                                        );
 
                                                        // Load template
index 2b1b2acf75497a78a4f8f9fa8c6bd4d1e2d6cf35..247d98cd48f0f7b4a63ed123f20d330aa01228f8 100644 (file)
@@ -59,7 +59,6 @@ loadIncludeOnce('inc/header.php');
 
 // Modules are by default not valid!
 $isModuleValid = false;
 
 // Modules are by default not valid!
 $isModuleValid = false;
-$URL = '';
 
 // Init module state as 'failed' (always failed first)
 $moduleState = 'failed';
 
 // Init module state as 'failed' (always failed first)
 $moduleState = 'failed';
diff --git a/ref.php b/ref.php
index f6e5f1913bfa20f027ebdf6be9d06e0493e6ca30..4eb1fe139f7e9fb5bd3e0dd4b5390293f216c180 100644 (file)
--- a/ref.php
+++ b/ref.php
@@ -49,7 +49,7 @@ require('inc/config-global.php');
 setContentType('text/html');
 
 // No refid by default
 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
 
 if (isValidUserId(determineReferalId())) {
        // Test if nickname or numeric id
@@ -85,18 +85,18 @@ if (isValidUserId(determineReferalId())) {
                // Base URL for redirection
                switch (getConfig('refid_target')) {
                        case 'register':
                // Base URL for redirection
                switch (getConfig('refid_target')) {
                        case 'register':
-                               $URL = 'modules.php?module=index&amp;what=register';
+                               $url = 'modules.php?module=index&amp;what=register';
                                break;
 
                        case 'index':
                                break;
 
                        case 'index':
-                               $URL = 'modules.php?module=index';
+                               $url = 'modules.php?module=index';
                                break;
                } // END - switch
        } // END - if
 } // END - if
 
 // Load the URL
                                break;
                } // END - switch
        } // END - if
 } // END - if
 
 // Load the URL
-redirectToUrl($URL);
+redirectToUrl($url);
 
 // [EOF]
 ?>
 
 // [EOF]
 ?>
index ea061a4d64afe4234dab656d3afc26dec7ff6719..efa72fcc5ff2042c9e36d49c2cb77bbeaa48cf5f 100644 (file)
@@ -50,16 +50,16 @@ require('inc/config-global.php');
 setContentType('text/html');
 
 // No hash provided by default
 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
 
 // Is there a hash?
 if (isGetRequestParameterSet('hash')) {
        // We have an refid here. So we simply add it
-       $URL = 'modules.php?module=index&amp;what=sponsor_login&amp;hash=' . getRequestParameter('hash');
+       $url = 'modules.php?module=index&amp;what=sponsor_login&amp;hash=' . getRequestParameter('hash');
 } // END - if
 
 // Load the URL
 } // END - if
 
 // Load the URL
-redirectToUrl($URL);
+redirectToUrl($url);
 
 // [EOF]
 ?>
 
 // [EOF]
 ?>
index 2656eb9c89f97bd047d6ba80e569645bf31d6f9a..d6cbd1f0de10c076b9a16990154897b71790d003 100644 (file)
@@ -50,19 +50,16 @@ require('inc/config-global.php');
 setContentType('text/html');
 
 // Base URL for redirection
 setContentType('text/html');
 
 // Base URL for redirection
-$URL = 'modules.php?module=index&amp;what=sponsor_reg&amp;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
 
 // 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 .= '&amp;what=sponsor_reg&amp;refid=' . $GLOBALS['refid'];
+} // END - if
 
 // Load the URL
 
 // Load the URL
-redirectToUrl($URL);
+redirectToUrl($url);
 
 // [EOF]
 ?>
 
 // [EOF]
 ?>
index eb9ab63004b2dda97c1ca90a7851760718a39aff..cb718f47b8a5d525e133e53a5bde3c7c00313dce 100644 (file)
@@ -68,10 +68,10 @@ if (!isMember()) {
                // Is the form sent?
                if ((isFormSent()) && (isPostRequestParameterSet('id')) && (isPostRequestParameterSet('password'))) {
                        // Do the login procedure
                // 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
 
                        // And redirect to the URL
-                       redirectToUrl($URL);
+                       redirectToUrl($url);
                } else {
                        // Load header
                        loadIncludeOnce('inc/header.php');
                } else {
                        // Load header
                        loadIncludeOnce('inc/header.php');