'what','action','module' and 'output_mode' wrapped into functions (WARNUNG: Code...
authorRoland Häder <roland@mxchange.org>
Tue, 28 Jul 2009 18:50:32 +0000 (18:50 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 28 Jul 2009 18:50:32 +0000 (18:50 +0000)
107 files changed:
inc/check-reset.php
inc/db/lib-mysql3.php
inc/extensions/ext-autopurge.php
inc/extensions/ext-bonus.php
inc/extensions/ext-newsletter.php
inc/extensions/ext-profile.php
inc/extensions/ext-rallye.php
inc/filters.php
inc/footer.php
inc/functions.php
inc/header.php
inc/libs/admins_functions.php
inc/libs/online_functions.php
inc/libs/rewrite_functions.php
inc/libs/sponsor_functions.php
inc/libs/user_functions.php
inc/load_extensions.php
inc/loader/load_cache-admin.php
inc/loader/load_cache-config.php
inc/loader/load_cache-modreg.php
inc/loader/load_cache-refdepths.php
inc/loader/load_cache-refsystem.php
inc/loader/load_cache-revision.php
inc/loader/load_cache-them.php
inc/mails/_mails.php
inc/mails/beg_mails.php
inc/mails/birthday_mails.php
inc/mails/bonus_mails.php
inc/modules/admin.php
inc/modules/admin/action-
inc/modules/admin/action-admins.php
inc/modules/admin/action-bank.php
inc/modules/admin/action-country.php
inc/modules/admin/action-doubler.php
inc/modules/admin/action-email.php
inc/modules/admin/action-holiday.php
inc/modules/admin/action-login.php
inc/modules/admin/action-logout.php
inc/modules/admin/action-menu.php
inc/modules/admin/action-misc.php
inc/modules/admin/action-mods.php
inc/modules/admin/action-newsletter.php
inc/modules/admin/action-payouts.php
inc/modules/admin/action-primera.php
inc/modules/admin/action-rallye.php
inc/modules/admin/action-repair.php
inc/modules/admin/action-setup.php
inc/modules/admin/action-sponsor.php
inc/modules/admin/action-stats.php
inc/modules/admin/action-surfbar.php
inc/modules/admin/action-task.php
inc/modules/admin/action-theme.php
inc/modules/admin/action-transfer.php
inc/modules/admin/action-user.php
inc/modules/admin/action-wernis.php
inc/modules/admin/admin-inc.php
inc/modules/admin/what-admins_mails.php
inc/modules/admin/what-config_admin.php
inc/modules/admin/what-config_bonus.php
inc/modules/admin/what-config_payouts.php
inc/modules/admin/what-config_points.php
inc/modules/admin/what-extensions.php
inc/modules/admin/what-list_doubler.php
inc/modules/admin/what-logs.php
inc/modules/admin/what-overview.php
inc/modules/admin/what-theme_check.php
inc/modules/admin/what-usage.php
inc/modules/guest/action-
inc/modules/guest/action-admin.php
inc/modules/guest/action-main.php
inc/modules/guest/action-members.php
inc/modules/guest/action-sponsor.php
inc/modules/guest/action-themes.php
inc/modules/index.php
inc/modules/login.php
inc/modules/member/action-
inc/modules/member/action-account.php
inc/modules/member/action-bank.php
inc/modules/member/action-extras.php
inc/modules/member/action-logout.php
inc/modules/member/action-main.php
inc/modules/member/action-order.php
inc/modules/member/action-rals.php
inc/modules/member/action-stats.php
inc/modules/member/action-surfbar.php
inc/modules/member/action-themes.php
inc/modules/sponsor.php
inc/monthly/monthly_
inc/monthly/monthly_beg.php
inc/monthly/monthly_bonus.php
inc/monthly/monthly_newsletter.php
inc/monthly/monthly_surfbar.php
inc/mysql-connect.php
inc/mysql-manager.php
inc/reset/reset_
inc/reset/reset_beg.php
inc/reset/reset_bonus.php
inc/reset/reset_daily.php
inc/reset/reset_engine.php
inc/reset/reset_holiday.php
inc/reset/reset_surfbar.php
inc/reset/reset_yoomedia.php
inc/session-functions.php
inc/stylesheet.php
inc/weekly/weekly_
inc/weekly/weekly_surfbar.php
inc/wrapper-functions.php

index 56ffcadbbce123cc8ba96c00ca6709e52e4ba079..b6d315ce7e92a4f4a8e4e202a8c9a1c8b06ed486 100644 (file)
@@ -44,7 +44,7 @@ if (!defined('__SECURITY')) {
 
 // Shall we run the reset scripts? If a day has changed, maybe also a week/month has changed... Simple! :D
 // 01    2              3             32        2         3321    1             221    1           221    1                 221    1                  23          321    1                            10
-if ((date('d', getConfig('last_update')) != date('d', time())) && (!isInstalling()) && (isInstalled()) && (isAdminRegistered()) && (!REQUEST_ISSET_GET(('register'))) && ($GLOBALS['output_mode'] != 1)) {
+if ((date('d', getConfig('last_update')) != date('d', time())) && (!isInstalling()) && (isInstalled()) && (isAdminRegistered()) && (!REQUEST_ISSET_GET(('register'))) && (getOutputMode() != 1)) {
        // Tell every module we are in reset-mode!
        enableResetMode();
 
index b62e9132845f16edf451cb6ad6cafffd6a83132c..ccdfd8e9f7b5121fedc5b16ca3fccb84ba325178 100644 (file)
@@ -90,14 +90,14 @@ Query string:<br />
 
        // Debug output
        //* DEBUG: */ print "Query=<pre>".$sql_string."</pre>, affected=<strong>".SQL_AFFECTEDROWS()."</strong>, numrows=<strong>".SQL_NUMROWS($result)."</strong><br />\n";
-       if (($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1') && (isDebugModeEnabled()) && (getConfig('DEBUG_SQL') == 'Y')) {
+       if ((getOutputMode() != '1') && (getOutputMode() != '-1') && (isDebugModeEnabled()) && (getConfig('DEBUG_SQL') == 'Y')) {
                //
                // Debugging stuff...
                //
                $fp = fopen(constant('PATH') . 'inc/cache/mysql.log', 'a') or app_die(__FILE__, __LINE__, "Cannot write mysql.log!");
                if (!isset($GLOBALS['sql_first_entry'])) {
                        // Write first entry
-                       fwrite($fp, 'Module=' . $GLOBALS['module'] . "\n");
+                       fwrite($fp, 'Module=' . getModule() . "\n");
                        $GLOBALS['sql_first_entry'] = true;
                } // END - if
                fwrite($fp, $F."(LINE=".$L."|NUM=".SQL_NUMROWS($result)."|AFFECTED=".SQL_AFFECTEDROWS()."|QUERYTIME:".$queryTime."): ".str_replace("\r", '', str_replace("\n", " ", $sql_string))."\n");
index ff38a3f6494024e1eee74c28a03ecd236d979f8a..cbad4cbfed81ffd0b7f0e95b3f89ee5065800445 100644 (file)
@@ -257,7 +257,7 @@ switch ($EXT_LOAD_MODE)
 
                        default: // Do stuff when extension is loaded
                                // Do we have a daily-reset-run?
-                               if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) {
+                               if (isResetModeEnabled() && (!isDebugModeEnabled()) && (getOutputMode() != 1)) {
                                        // Yes, we have. So let's auto-purge some campaigns, inactive users and unconfirmed accounts
                                        ADD_INC_TO_POOL(sprintf("%sinc/autopurge.php", constant('PATH')));
                                }
index c8485ca186c7161b307d733f59a4f1d338aa6b36..25c62db6e2abb9f38ad0d7338c1dbfd5e0e1e558 100644 (file)
@@ -550,7 +550,7 @@ WHERE `last_online` < ".$mark." ORDER BY `userid` ASC");
                                break;
 
                        default: // Do stuff when extension is loaded
-                               if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) {
+                               if (isResetModeEnabled() && (!isDebugModeEnabled()) && (getOutputMode() != 1)) {
                                        // Daily reset was run so let's check if active rallye is activated
                                        if (getConfig('bonus_active') == 'Y') {
                                                // Run active rallye
index d3c1a6528b89300b35683e118740b2a5bbb21a1a..28bc12287178f86951af6ec8dc75c9a2425b8fc9 100644 (file)
@@ -172,7 +172,7 @@ switch ($EXT_LOAD_MODE)
                '2','3','4','5','6','7','8','9'
                );
 
-               if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) {
+               if (isResetModeEnabled() && (!isDebugModeEnabled()) && (getOutputMode() != 1)) {
                        // Daily reset was run so let's check out for expired newsletter orders
                        ADD_INC_TO_POOL(sprintf("%sinc/monthly/monthly_newsletter.php", constant('PATH')));
                }
index 8edcb43f20c6fcad769f05a4230b2ab1af29c96c..0947f988cca3eaa29fe28198037293d82b8359b8 100644 (file)
@@ -128,7 +128,7 @@ switch ($EXT_LOAD_MODE)
 
                        default: // Do stuff when extension is loaded
                                // Do we have a daily-reset-run?
-                               if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) {
+                               if (isResetModeEnabled() && (!isDebugModeEnabled()) && (getOutputMode() != 1)) {
                                        // So let's check for profiles which needs an update
                                        ADD_INC_TO_POOL(sprintf("%sinc/profile-updte.php", constant('PATH')));
                                }
index 694a984d3c1b437920d32057d445ba14f1ec21e1..8d2f9dd419de86067a6a98714273153df13d7cf3 100644 (file)
@@ -329,7 +329,7 @@ Zudem sollten Sie mindestens folgende Templates (in <strong>templates/".getLangu
 
                        default: // Do stuff when extension is loaded
                                // Do stuff only when not in CSS mode
-                               if (($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1') && ($GLOBALS['cache_mode'] != 'init')) {
+                               if ((getOutputMode() != '1') && (getOutputMode() != '-1') && ($GLOBALS['cache_mode'] != 'init')) {
                                        // Get total member count
                                        $total = GET_TOTAL_DATA('CONFIRMED', 'user_data', 'userid', 'status', true);
 
index 6d92d6a654f5e97f0e997f881818876cb2f3304e..6d02e30e8409261650cab20ce3669268ccf6b6a2 100644 (file)
@@ -329,8 +329,8 @@ function FILTER_CALL_HANDLER_LOGIN_FAILTURES ($data) {
        $content = $data;
 
        // Handle failed logins here if not in guest
-       //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):type={$data['type']},action={$GLOBALS['action']},what={$GLOBALS['what']},lvl={$data['access_level']}<br />\n";
-       if ((($data['type'] == 'what') || ($data['type'] == 'action') && ((!isset($GLOBALS['what'])) || ($GLOBALS['what'] == "overview") || ($GLOBALS['what'] == getConfig('index_home')))) && ($data['access_level'] != 'guest') && ((GET_EXT_VERSION('sql_patches') >= '0.4.7') || (GET_EXT_VERSION('admins') >= '0.7.0'))) {
+       //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):type={$data['type']},action={getAction()},what={getWhat()},lvl={$data['access_level']}<br />\n";
+       if ((($data['type'] == 'what') || ($data['type'] == 'action') && ((!isWhatSet()) || (getWhat() == 'overview') || (getWhat() == getConfig('index_home')))) && ($data['access_level'] != 'guest') && ((GET_EXT_VERSION('sql_patches') >= '0.4.7') || (GET_EXT_VERSION('admins') >= '0.7.0'))) {
                // Handle failure
                $content['content'] .= HANDLE_LOGIN_FAILTURES($data['access_level']);
        } // END - if
@@ -468,7 +468,7 @@ function FILTER_UPDATE_LOGIN_DATA () {
                list($mod, $onl) = SQL_FETCHROW($result);
 
                // Maybe first login time?
-               if (empty($mod)) $mod = "login";
+               if (empty($mod)) $mod = 'login';
 
                // This will be displayed on welcome page! :-)
                if (empty($GLOBALS['last']['module'])) {
@@ -476,15 +476,15 @@ function FILTER_UPDATE_LOGIN_DATA () {
                } // END - if
 
                // 'what' not set?
-               if (empty($GLOBALS['what'])) {
+               if (!isWhatSet()) {
                        // Fix it to default
-                       $GLOBALS['what'] = "welcome";
-                       if (getConfig('index_home') != '') $GLOBALS['what'] = getConfig('index_home');
+                       setWhat('welcome');
+                       if (getConfig('index_home') != '') setWhatFromConfig('index_home');
                } // END - if
 
                // Update last module / online time
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `last_module`='%s', last_online=UNIX_TIMESTAMP(), REMOTE_ADDR='%s' WHERE userid=%s LIMIT 1",
-                       array($GLOBALS['what'], detectRemoteAddr(), getUserId()), __FUNCTION__, __LINE__);
+                       array(getWhat(), detectRemoteAddr(), getUserId()), __FUNCTION__, __LINE__);
        }  else {
                // Destroy session, we cannot update!
                destroyUserSession();
@@ -502,14 +502,14 @@ function FILTER_CHECK_ADMIN_ACL () {
        // Ok, Cookie-Update done
        if ((GET_EXT_VERSION('admins') >= '0.3.0') && (EXT_IS_ACTIVE('admins'))) {
                // Check if action GET variable was set
-               $action = SQL_ESCAPE($GLOBALS['action']);
-               if (!empty($GLOBALS['what'])) {
+               $action = getAction();
+               if (isWhatSet()) {
                        // Get action value by what-value
-                       $action = getModeAction('admin', $GLOBALS['what']);
+                       $action = getModeAction('admin', getWhat());
                } // END - if
 
                // Check for access control line of current menu entry
-               $ret = adminsCheckAdminAcl($action, $GLOBALS['what']);
+               $ret = adminsCheckAdminAcl($action, getWhat());
        } // END - if
 
        // Return result
index e691b2ce62b86154637b764460063d9ab70c1f9f..f35efd9cbf9970693f948871428aa2a7bed5db55 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 
 // Footer disabled or already sent?
 // 1234      5                       54    45                              5    5                              543    3                              321
-if ((((!isset($GLOBALS['footer_sent'])) || (($GLOBALS['footer_sent'] != '1') && ($GLOBALS['footer_sent'] != '2'))) && ($GLOBALS['output_mode'] != '1'))) {
+if ((((!isset($GLOBALS['footer_sent'])) || (($GLOBALS['footer_sent'] != '1') && ($GLOBALS['footer_sent'] != '2'))) && (getOutputMode() != '1'))) {
        // Output the generated HTML code or do nothing in direct-mode
        if (getTotalFatalErrors() > 0) {
                // Output fatal error messages
index ab9fec7b50fa976d8310be6febcdc5958661ef98..16a7194b80aedc83954c4b70732b2e423fda8573 100644 (file)
@@ -114,7 +114,7 @@ function OUTPUT_HTML ($HTML, $newLine = true) {
                sendHeader('Connection: Close');
 
                // Extension 'rewrite' installed?
-               if ((EXT_IS_ACTIVE('rewrite')) && ($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1')) {
+               if ((EXT_IS_ACTIVE('rewrite')) && (getOutputMode() != '1') && (getOutputMode() != '-1')) {
                        $OUTPUT = rewriteLinksInCode($OUTPUT);
                } // END - if
 
@@ -137,7 +137,7 @@ function OUTPUT_HTML ($HTML, $newLine = true) {
                outputRawCode($OUTPUT);
        } elseif ((getConfig('OUTPUT_MODE') == 'render') && (!empty($OUTPUT))) {
                // Rewrite links when rewrite extension is active
-               if ((EXT_IS_ACTIVE('rewrite')) && ($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1')) {
+               if ((EXT_IS_ACTIVE('rewrite')) && (getOutputMode() != '1') && (getOutputMode() != '-1')) {
                        $OUTPUT = rewriteLinksInCode($OUTPUT);
                } // END - if
 
@@ -300,13 +300,13 @@ function LOAD_TEMPLATE ($template, $return=false, $content=array()) {
        ////////////////////////
        $FQFN = $basePath . $mode . $template . '.tpl';
 
-       if ((!empty($GLOBALS['what'])) && ((strpos($template, '_header') > 0) || (strpos($template, '_footer') > 0)) && (($mode == 'guest/') || ($mode == 'member/') || ($mode == 'admin/'))) {
+       if ((isWhatSet()) && ((strpos($template, '_header') > 0) || (strpos($template, '_footer') > 0)) && (($mode == 'guest/') || ($mode == 'member/') || ($mode == 'admin/'))) {
                // Select what depended header/footer template file for admin/guest/member area
                $file2 = sprintf("%s%s%s_%s.tpl",
                        $basePath,
                        $mode,
                        $template,
-                       SQL_ESCAPE($GLOBALS['what'])
+                       getWhat()
                );
 
                // Probe for it...
@@ -1671,7 +1671,7 @@ function ADD_EMAIL_NAV ($PAGES, $offset, $show_form, $colspan, $return=false) {
                        $NAV .= "<strong>-";
                } else {
                        // Open anchor tag and add base URL
-                       $NAV .= "<a href=\"{!URL!}/modules.php?module=admin&amp;what=" . $GLOBALS['what']."&amp;page=" . $page."&amp;offset=" . $offset;
+                       $NAV .= "<a href=\"{!URL!}/modules.php?module=admin&amp;what=" . getWhat()."&amp;page=" . $page."&amp;offset=" . $offset;
 
                        // Add userid when we shall show all mails from a single member
                        if ((REQUEST_ISSET_GET('uid')) && (bigintval(REQUEST_GET('uid')) > 0)) $NAV .= "&amp;uid=".bigintval(REQUEST_GET('uid'));
@@ -2317,7 +2317,7 @@ function getCurrentTheme() {
                        // Fix it to default
                        $ret = 'default';
                } // END - if
-       } elseif ((!isInstalled()) && ((isInstalling()) || ($GLOBALS['output_mode'] == true)) && ((REQUEST_ISSET_GET('theme')) || (REQUEST_ISSET_POST('theme')))) {
+       } elseif ((!isInstalled()) && ((isInstalling()) || (getOutputMode() == true)) && ((REQUEST_ISSET_GET('theme')) || (REQUEST_ISSET_POST('theme')))) {
                // Prepare FQFN for checking
                $theme = sprintf("%stheme/%s/theme.php", constant('PATH'), REQUEST_GET('theme'));
 
@@ -2897,7 +2897,7 @@ function DEBUG_LOG ($funcFile, $line, $message, $force=true) {
 
                // Log this message away
                $fp = fopen(constant('PATH')."inc/cache/debug.log", 'a') or app_die(__FUNCTION__, __LINE__, "Cannot write logfile debug.log!");
-               fwrite($fp, date("d.m.Y|H:i:s", time())."|" . $GLOBALS['module']."|".basename($funcFile)."|" . $line."|".strip_tags($message)."\n");
+               fwrite($fp, date("d.m.Y|H:i:s", time())."|" . getModule()."|".basename($funcFile)."|" . $line."|".strip_tags($message)."\n");
                fclose($fp);
        } // END - if
 }
index a7dc3af343c08feabefed1aff7628d1f08e59225..5887c2944a267c748759d166e4529ffdf38618eb 100644 (file)
@@ -47,7 +47,7 @@ if (!defined('__SECURITY')) {
 // Is the header already sent?
 if (($GLOBALS['header_sent'] != '1') && ($GLOBALS['header_sent'] != '2')) {
        // If not in CSS mode generate the header
-       if (($GLOBALS['output_mode'] != '1')) {
+       if ((getOutputMode() != '1')) {
                // Generate header
                $TITLE = '';
 
@@ -68,13 +68,15 @@ if (($GLOBALS['header_sent'] != '1') && ($GLOBALS['header_sent'] != '2')) {
                                $TITLE .= constant('MAIN_TITLE');
 
                                // Add title of module? (middle decoration will also be added!)
-                               if ((getConfig('enable_mod_title') == 'Y') || ((empty($GLOBALS['what'])) && (empty($GLOBALS['action']))) || ($GLOBALS['module'] == 'admin')) $TITLE .= " ".trim(getConfig('title_middle'))." ".getModuleTitle($GLOBALS['module']);
+                               if ((getConfig('enable_mod_title') == 'Y') || ((!isWhatSet()) && (!isActionSet())) || (getModule() == 'admin')) {
+                                       $TITLE .= " ".trim(getConfig('title_middle'))." ".getModuleTitle(getModule());
+                               } // END - if
 
                                // Add title from what file
                                $mode = '';
-                               if ($GLOBALS['module'] == "login") $mode = 'member';
-                               elseif ($GLOBALS['module'] == 'index') $mode = 'guest';
-                               if ((!empty($mode)) && (getConfig('enable_what_title') == 'Y')) $TITLE .= " ".trim(getConfig('title_middle'))." ".getModuleDescription($mode, $GLOBALS['what']);
+                               if (getModule() == 'login') $mode = 'member';
+                               elseif (getModule() == 'index') $mode = 'guest';
+                               if ((!empty($mode)) && (getConfig('enable_what_title') == 'Y')) $TITLE .= " ".trim(getConfig('title_middle'))." ".getModuleDescription($mode, getWhat());
 
                                // Add title decorations? (right)
                                if ((getConfig('enable_title_deco') == 'Y') && (getConfig('title_right') != '')) $TITLE .= " ".trim(getConfig('title_right'));
@@ -103,14 +105,14 @@ if (($GLOBALS['header_sent'] != '1') && ($GLOBALS['header_sent'] != '2')) {
                LOAD_TEMPLATE('page_header');
 
                // Include meta data in 'guest' module
-               if ($GLOBALS['module'] == 'index') {
+               if (getModule() == 'index') {
                        // Load meta data template
                        LOAD_TEMPLATE('metadata');
 
                        // Add meta description to header
                        if ((isInstalled()) && (isAdminRegistered()) && (SQL_IS_LINK_UP())) {
                                // Add meta description not in admin and login module and when the script is installed
-                               generateMetaDescriptionCode($GLOBALS['module'], $GLOBALS['what']);
+                               generateMetaDescriptionCode(getModule(), getWhat());
                        } // END - if
                } // END - if
 
@@ -122,14 +124,14 @@ if (($GLOBALS['header_sent'] != '1') && ($GLOBALS['header_sent'] != '2')) {
        } // END - if
 
        // Closing HEAD tag
-       if ($GLOBALS['output_mode'] != '1') OUTPUT_HTML('</head>');
+       if (getOutputMode() != '1') OUTPUT_HTML('</head>');
        $GLOBALS['header_sent'] = 1;
 } // END - if
 
 // Load body or not
-if (($GLOBALS['module'] != 'frametester') || (($GLOBALS['module'] == 'frametester') && (REQUEST_ISSET_GET('frame'))) || (($GLOBALS['header_sent'] == '1') && (REQUEST_ISSET_GET('frame'))) && ($GLOBALS['output_mode'] != '1')) {
+if ((getModule() != 'frametester') || ((getModule() == 'frametester') && (REQUEST_ISSET_GET('frame'))) || (($GLOBALS['header_sent'] == '1') && (REQUEST_ISSET_GET('frame'))) && (getOutputMode() != '1')) {
        // Is the header sent and the script is not the mail confirmation script and not a CSS?
-       if (($GLOBALS['header_sent'] == '1') && (basename($_SERVER['PHP_SELF']) != 'mailid.php') && ($GLOBALS['output_mode'] != '1')) {
+       if (($GLOBALS['header_sent'] == '1') && (basename($_SERVER['PHP_SELF']) != 'mailid.php') && (getOutputMode() != '1')) {
                // Add BODY tag
                LOAD_TEMPLATE('page_body');
                $GLOBALS['header_sent'] = 2;
index bc63f76e2c97f45dd44c7f363a24644818c6f6e4..2d143e482410a1ec0a442506d1fcffb05244e4bb 100644 (file)
@@ -45,8 +45,8 @@ if (!defined('__SECURITY')) {
 // Check ACL for menu combination
 function adminsCheckAdminAcl ($act, $wht) {
        // If action is login or logout allow allways!
-       $default = "allow";
-       if (($act == "login") || ($act == "logout")) return true;
+       $default = 'allow';
+       if (($act == 'login') || ($act == 'logout')) return true;
 
        // Default is deny
        $ret = false;
@@ -109,7 +109,7 @@ function adminsCheckAdminAcl ($act, $wht) {
        }
 
        // Check ACL and (maybe) allow
-       if (($default == "allow") || (($default == "deny") && ($acl_mode == "allow")) || ($parent === true)) {
+       if (($default == 'allow') || (($default == 'deny') && ($acl_mode == 'allow')) || ($parent === true)) {
                // Access is granted
                $ret = true;
        } // END - if
@@ -193,7 +193,7 @@ function adminsChangeAdminAccount ($POST) {
                        $default = getAdminDefaultAcl(getCurrentAdminId());
 
                        // Update admin account
-                       if ($default == "allow") {
+                       if ($default == 'allow') {
                                // Allow changing default ACL
                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins` SET
 login='%s'".$add.",
@@ -267,24 +267,24 @@ function adminsEditAdminAccount ($POST) {
                        $content['id'] = $id;
 
                        // Shall we allow changing default ACL?
-                       if ($currMode == "allow") {
+                       if ($currMode == 'allow') {
                                // Allow chaning it
-                               $content['mode']    = generateOptionList('/ARRAY/', array("allow", "deny"), array(constant('ADMINS_ALLOW_MODE'), constant('ADMINS_DENY_MODE')), $content['mode']);
+                               $content['mode']    = generateOptionList('/ARRAY/', array('allow', 'deny'), array(constant('ADMINS_ALLOW_MODE'), constant('ADMINS_DENY_MODE')), $content['mode']);
                        } else {
                                // Don't allow it
                                $content['mode'] = '&nbsp;';
                        }
-                       $content['la_mode'] = generateOptionList('/ARRAY/', array("global", "OLD", "NEW"), array(ADMINS_GLOBAL_LA_SETTING, ADMINS_OLD_LA_SETTING, ADMINS_NEW_LA_SETTING), $content['la_mode']);
+                       $content['la_mode'] = generateOptionList('/ARRAY/', array('global', 'OLD', 'NEW'), array(ADMINS_GLOBAL_LA_SETTING, ADMINS_OLD_LA_SETTING, ADMINS_NEW_LA_SETTING), $content['la_mode']);
 
                        // Load row template and switch color
-                       $OUT .= LOAD_TEMPLATE("admin_edit_admins_row", true, $content);
+                       $OUT .= LOAD_TEMPLATE('admin_edit_admins_row', true, $content);
                        $SW = 3 - $SW;
                }
        }
        define('__ADMINS_ROWS', $OUT);
 
        // Load template
-       LOAD_TEMPLATE("admin_edit_admins");
+       LOAD_TEMPLATE('admin_edit_admins');
 }
 
 // Delete given admin accounts
@@ -315,14 +315,14 @@ function adminsDeleteAdminAccount ($POST) {
                                $content['id'] = $id;
 
                                // Load row template and switch color
-                               $OUT .= LOAD_TEMPLATE("admin_del_admins_row", true, $content);
+                               $OUT .= LOAD_TEMPLATE('admin_del_admins_row', true, $content);
                                $SW = 3 - $SW;
                        }
                }
                define('__ADMINS_ROWS', $OUT);
 
                // Load template
-               LOAD_TEMPLATE("admin_del_admins");
+               LOAD_TEMPLATE('admin_del_admins');
        } else {
                // Cannot delete last account!
                LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_ADMINS_CANNOT_DELETE_LAST'));
@@ -372,7 +372,7 @@ function adminsListAdminAccounts() {
                $content['email_link'] = generateMemberEmailLink($content['id']);
 
                // Load row template and switch color
-               $OUT .= LOAD_TEMPLATE("admin_list_admins_row", true, $content);
+               $OUT .= LOAD_TEMPLATE('admin_list_admins_row', true, $content);
                $SW = 3 - $SW;
        }
 
@@ -381,7 +381,7 @@ function adminsListAdminAccounts() {
        define('__ADMINS_ROWS', $OUT);
 
        // Load template
-       LOAD_TEMPLATE("admin_list_admins");
+       LOAD_TEMPLATE('admin_list_admins');
 }
 
 // Filter for adding extra data to the query
index 7d1eb61339e95b7faec89c03b4371c98c7a259c4..51c0662aa176450570675b35441dce83da728d23 100644 (file)
@@ -92,32 +92,30 @@ timestamp=UNIX_TIMESTAMP(),
 ip='%s'
 WHERE sid='%s' LIMIT 1",
                array(
-               $GLOBALS['module'],
-               $GLOBALS['action'],
-               $GLOBALS['what'],
-               $uid,
-               $rid,
-               $MEM,
-               $ADMIN,
-               detectRemoteAddr(),
-               session_id()
-               ), __FUNCTION__, __LINE__
-               );
+                       getModule(),
+                       getAction(),
+                       getWhat(),
+                       $uid,
+                       $rid,
+                       $MEM,
+                       $ADMIN,
+                       detectRemoteAddr(),
+                       session_id()
+               ), __FUNCTION__, __LINE__);
        } else {
                // No entry does exists so we simply add it!
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_online` (module, action, what, userid, refid, is_member, is_admin, timestamp, sid, ip) VALUES ('%s','%s','%s', %s, %s, '%s','%s', UNIX_TIMESTAMP(), '%s','%s')",
                array(
-               $GLOBALS['module'],
-               $GLOBALS['action'],
-               $GLOBALS['what'],
-               $uid,
-               $rid,
-               $MEM,
-               $ADMIN,
-               session_id(),
-               detectRemoteAddr()
-               ), __FUNCTION__, __LINE__
-               );
+                       getModule(),
+                       getAction(),
+                       getWhat(),
+                       $uid,
+                       $rid,
+                       $MEM,
+                       $ADMIN,
+                       session_id(),
+                       detectRemoteAddr()
+               ), __FUNCTION__, __LINE__);
        }
 
        // Free result
index 467e6babfbbdcf8649ce0c3eb170973201098eb2..561d281f4e5b71aae3a395f47aa56bf6f5af689c 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 // Rewrite links in HTML for better SEO (ugly part of mx!)
 function rewriteLinksInCode ($HTML) {
        // Skip rewriting for configured modules
-       if (eregi($GLOBALS['module'], getConfig('rewrite_skip')) !== false) return $HTML;
+       if (eregi(getModule(), getConfig('rewrite_skip')) !== false) return $HTML;
 
        // Generate target URL
        $target = "{!URL!}/cms/";
index 531741c3e2ba9e664026a9074832c30fb069b45e..3c8a36d81185485082b6ba7ee0e07817189d7b59 100644 (file)
@@ -80,7 +80,7 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $messageArray=array()
                                                        // Is a sponsor alread in the db?
                                                        if (SQL_NUMROWS($result) == 1) {
                                                                // Yes, he is!
-                                                               if (($GLOBALS['what'] == 'add_sponsor') || ($NO_UPDATE)) {
+                                                               if ((getWhat() == 'add_sponsor') || ($NO_UPDATE)) {
                                                                        // Already found!
                                                                        $ALREADY = true;
                                                                } else {
@@ -146,7 +146,7 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $messageArray=array()
                                // Add new sponsor, first add more data
                                $DATA['keys'][] = "sponsor_created"; $DATA['values'][] = time();
                                $DATA['keys'][] = 'status';
-                               if ((!$NO_UPDATE) && (IS_ADMIN()) && ($GLOBALS['what'] == "add_sponsor")) {
+                               if ((!$NO_UPDATE) && (IS_ADMIN()) && (getWhat() == "add_sponsor")) {
                                        // Only allowed for admin
                                        $DATA['values'][] = 'PENDING';
                                } else {
@@ -439,7 +439,7 @@ function SPONSOR_SAVE_DATA ($POST, $content) {
        $DATA[] = getSession('sponsorpass');
 
        // Saving data was completed... ufff...
-       switch ($GLOBALS['what'])
+       switch (getWhat())
        {
                case "account": // Change account data
                        if ($EMAIL === true) {
@@ -465,8 +465,8 @@ function SPONSOR_SAVE_DATA ($POST, $content) {
                        break;
 
                default: // Unknown sponsor what value!
-                       DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown sponsor module (what) %s detected.", $GLOBALS['what']));
-                       $message = sprintf(getMessage('SPONSOR_UNKNOWN_WHAT'), $GLOBALS['what']);
+                       DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown sponsor module (what) %s detected.", getWhat()));
+                       $message = sprintf(getMessage('SPONSOR_UNKNOWN_WHAT'), getWhat());
                        $templ = ''; $subj = '';
                        break;
        }
@@ -495,7 +495,7 @@ function SPONSOR_SAVE_DATA ($POST, $content) {
                                // to the old address
 
                                // First to old address
-                               switch ($GLOBALS['what'])
+                               switch (getWhat())
                                {
                                        case "account": // Change account data
                                                $email_msg = LOAD_EMAIL_TEMPLATE("sponsor_change_data", $content);
index 1d39e644e8c7137b035c846dcff87f4d6b57f83d..0737b412fd450bad2987e4d02073a19d157e4b14 100644 (file)
@@ -58,7 +58,7 @@ function alpha ($sortby, $colspan, $return=false) {
                        $OUT .= "<strong>".$ltr."</strong>";
                } else {
                        // Output link to letter
-                       $OUT .= "<a href=\"{!URL!}/modules.php?module=admin&amp;what=".$GLOBALS['what'];
+                       $OUT .= "<a href=\"{!URL!}/modules.php?module=admin&amp;what=".getWhat();
                        if (REQUEST_ISSET_GET('mode')) $OUT .= "&amp;mode=".REQUEST_GET('mode');
                        $OUT .= "&amp;letter=".$ltr."&amp;sortby=".$sortby.$add."\">".$ltr."</a>";
                }
@@ -160,7 +160,7 @@ function ADD_PAGENAV ($PAGES, $offset, $show_form, $colspan,$return=false) {
                        if (!REQUEST_ISSET_GET('sortby')) REQUEST_SET_GET('sortby', 'userid');
 
                        // Base link
-                       $OUT .= "<a href=\"{!URL!}/modules.php?module=admin&amp;what=".$GLOBALS['what'];
+                       $OUT .= "<a href=\"{!URL!}/modules.php?module=admin&amp;what=".getWhat();
 
                        // Add status or mode
                        if (REQUEST_ISSET_GET(('status'))) $OUT .= "&amp;mode=".REQUEST_GET(('status'));
index 96b15450cd3c61e3b4b3a2d1afdc2c621c5c7d23..207b3fe022d8ac2f1020f83dfec88aa4194a9fc0 100644 (file)
@@ -215,7 +215,7 @@ ORDER BY ext_name", __FILE__, __LINE__);
 $DEL = array();
 
 // At least one found?
-if ((SQL_NUMROWS($res_ext_crt) > 0) && ((($GLOBALS['cache_mode'] == 'init') && ($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1')) || ($GLOBALS['cache_mode'] == 'no'))) {
+if ((SQL_NUMROWS($res_ext_crt) > 0) && ((($GLOBALS['cache_mode'] == 'init') && (getOutputMode() != '1') && (getOutputMode() != '-1')) || ($GLOBALS['cache_mode'] == 'no'))) {
        // Extensions are registered so we load them
        while ($content = SQL_FETCHARRAY($res_ext_crt)) {
                // Get menu entry
index 93280c2a561025c23d7785aab7d576d40f47866c..11d80fe5118e3fcb59c2df467d4a561e719f8b5b 100644 (file)
@@ -84,7 +84,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('admins')) && ($GLOBALS['cache_in
                $GLOBALS['cache_instance']->destroyCacheFile();
                unset($GLOBALS['cache_array']['admins']);
        }
-} elseif ((getConfig('cache_admins') == 'Y') && ($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1')) {
+} elseif ((getConfig('cache_admins') == 'Y') && (getOutputMode() != '1') && (getOutputMode() != '-1')) {
        // Create cache file
        $GLOBALS['cache_instance']->init('ADMINS');
        $GLOBALS['cache_instance']->storeExtensionVersion('admins');
@@ -117,7 +117,7 @@ if (GET_EXT_VERSION('admins') >= '0.3') {
        if (($GLOBALS['cache_instance']->loadCacheFile('admins_acls')) && ($GLOBALS['cache_instance']->extensionVersionMatches('admins'))) {
                // Load referal system from cache
                $GLOBALS['cache_array']['admin_acls'] = $GLOBALS['cache_instance']->getArrayFromCache();
-       } elseif ((getConfig('cache_acls') == 'Y') && ($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1')) {
+       } elseif ((getConfig('cache_acls') == 'Y') && (getOutputMode() != '1') && (getOutputMode() != '-1')) {
                // Create cache file here
                $GLOBALS['cache_instance']->init('ADMINS_ACLS');
                $GLOBALS['cache_instance']->storeExtensionVersion('admins');
index cbb44999bb6711b4474c14a8199d4df80c562a9f..b0e9f29117517c1e5bcddf1520025aeef39c2260 100644 (file)
@@ -46,7 +46,7 @@ if (!defined('__SECURITY')) {
 if (($GLOBALS['cache_instance']->loadCacheFile('config', true)) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
        // Load config from cache
        $GLOBALS['cache_array']['config'] = $GLOBALS['cache_instance']->getArrayFromCache();
-} elseif ((getConfig('cache_config') == 'Y') && ($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1')) {
+} elseif ((getConfig('cache_config') == 'Y') && (getOutputMode() != '1') && (getOutputMode() != '-1')) {
        // Create cache file here
        $GLOBALS['cache_instance']->init('CONFIG');
        $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches');
index 92be2dfe84510e65f8683d9cbed5fe6c6c75316f..b37d67f01777f11cd4101da2ef51d667a81c299c 100644 (file)
@@ -68,7 +68,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('modreg')) && ($GLOBALS['cache_in
                } // END - if
        } // END - foreach
        unset($modArray);
-} elseif ((getConfig('cache_modreg') == 'Y') && ($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1')) {
+} elseif ((getConfig('cache_modreg') == 'Y') && (getOutputMode() != '1') && (getOutputMode() != '-1')) {
        // Create cache file here
        $GLOBALS['cache_instance']->init('MODULES');
        $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches');
index 6414981688c0294f4ffccaa45ce566ebd110a230..ced42c3c41210cac0815fb51ce055c6c6e416058 100644 (file)
@@ -46,7 +46,7 @@ if (!defined('__SECURITY')) {
 if (($GLOBALS['cache_instance']->loadCacheFile('refdepths')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
        // Load referal system from cache
        $GLOBALS['cache_array']['ref_depths'] = $GLOBALS['cache_instance']->getArrayFromCache();
-} elseif ((getConfig('cache_refdepth') == 'Y') && ($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1')) {
+} elseif ((getConfig('cache_refdepth') == 'Y') && (getOutputMode() != '1') && (getOutputMode() != '-1')) {
        // Create cache file here
        $GLOBALS['cache_instance']->init('REFDEPTHS');
        $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches');
index 8a8b50f8c4676799d26acf6f8f0ee86a403087bf..8aa48c2699b6448f0c7f865272e14ce6b5c50aa9 100644 (file)
@@ -46,7 +46,7 @@ if (!defined('__SECURITY')) {
 if (($GLOBALS['cache_instance']->loadCacheFile('refsystem')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
        // Load referal system from cache
        $GLOBALS['cache_array']['refsystem'] = $GLOBALS['cache_instance']->getArrayFromCache();
-} elseif ((getConfig('cache_refsys') == 'Y') && ($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1')) {
+} elseif ((getConfig('cache_refsys') == 'Y') && (getOutputMode() != '1') && (getOutputMode() != '-1')) {
        // Create cache file here
        $GLOBALS['cache_instance']->init('REFSYSTEM');
        $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches');
index 564429cc83e41db2898f666718068b35a596d63a..1c2f3971fae4a5682047c2949c30447ed55c1e67 100644 (file)
@@ -46,7 +46,7 @@ if (!defined('__SECURITY')) {
 if (($GLOBALS['cache_instance']->loadCacheFile('revision', true))) {
        // Load revision from cache
        $GLOBALS['cache_array']['revision'] = $GLOBALS['cache_instance']->getArrayFromCache();
-} elseif (($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1')) {
+} elseif ((getOutputMode() != '1') && (getOutputMode() != '-1')) {
        // Create cache file here
        $GLOBALS['cache_instance']->init('revision');
 
index 382be5c04e9d31f1776aa2e63b5602cab198b855..87dd7a1c0daf9b53fbed5c37c55ee13048209aca 100644 (file)
@@ -69,7 +69,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('themes')) && ($GLOBALS['cache_in
 
        // Remove dummy array
        unset($cache);
-} elseif ((getConfig('cache_themes') == 'Y') && ($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1')) {
+} elseif ((getConfig('cache_themes') == 'Y') && (getOutputMode() != '1') && (getOutputMode() != '-1')) {
        // Create cache file here
        $GLOBALS['cache_instance']->init('THEMES');
        $GLOBALS['cache_instance']->storeExtensionVersion('theme');
index 0576148bd58b60f2d9c0d18fe73be09e5beebac7..9b0e67c412820bb11590f5966ceb7af7f073c013 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode
-if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return;
+if ((getOutputMode() == 1) || (!isResetModeEnabled())) return;
 
 //
 ?>
index 9a9872f746ee695a9967574d7f67cd0016b6ef98..424d1ccba4a49e25c25cf2f8d2cf84986b3dea9f 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode
-if ($GLOBALS['output_mode'] == 1) return;
+if (getOutputMode() == 1) return;
 
 // Create timemark from saved month
 $mark = mktime(0, 0, 0, getConfig('last_month'), date('d', time()), date('Y', time()));
@@ -53,35 +53,28 @@ $sql = ''; $mode = '';
 
 // Shall I sent activation or deactivation mail?
 $sql = "SELECT userid, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE (beg_ral_notify ";
-switch (getConfig('beg_rallye'))
-{
+switch (getConfig('beg_rallye')) {
        case 'Y': // Begging rallye is activated
-               if (getConfig('beg_ral_en_notify') == 'Y')
-               {
+               if (getConfig('beg_ral_en_notify') == 'Y') {
                        // Okay, let's check for member accounts
                        $sql .= "= 0 OR (beg_ral_notify > 0 AND beg_ral_en_notify < beg_ral_di_notify)";
                        $mode = "en";
+               } else {
+                       // Do not notify!
+                       $sql = '';
                }
-        else
-        {
-               // Do not notify!
-               $sql = '';
-        }
-        break;
+               break;
 
        case 'N': // Begging rallye is deactivated
-               if (getConfig('beg_ral_di_notify') == 'Y')
-               {
+               if (getConfig('beg_ral_di_notify') == 'Y') {
                        // Okay, let's check for member accounts
                        $sql .= " > 0 AND beg_ral_di_notify < beg_ral_en_notify";
                        $mode = "di";
+               } else {
+               // Do not notify!
+               $sql = '';
                }
-        else
-        {
-               // Do not notify!
-               $sql = '';
-        }
-        break;
+               break;
 }
 
 if (!empty($sql)) {
@@ -92,13 +85,10 @@ if (!empty($sql)) {
        define('__BEG_MIN_POINTS' , translateComma(getConfig('beg_points')));
        define('__BEG_MAX_POINTS' , translateComma(getConfig('beg_points_max')));
        define('__BEG_MAX_WINNERS', round(getConfig('beg_ranks')));
-       if (getConfig('beg_ip_timeout') == 0)
-       {
+       if (getConfig('beg_ip_timeout') == 0) {
                // No IP locking setuped!
                define('__BEG_IP_LOCKER', getMessage('BEG_NO_LIMITATION'));
-       }
-       else
-       {
+       } else {
                // Create timemark
                define('__BEG_IP_LOCKER', createFancyTime(getConfig('beg_ip_timeout')));
        }
index 4cc3ef182b9b4d84573a6519581c16616eacee38..a1e81587ab33713651ce1d8092c4e8fcc87f253f 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode
-if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return;
+if ((getOutputMode() == 1) || (!isResetModeEnabled())) return;
 
 // Get current day (01 to 31), month (01 to 12) and year (4-digits year)
 $day   = date('d', time());
index 620488d25b6e8995d9fe568789dcf5882d108dbe..da5d22c5128459193a825a404d9aa822ae3437dc 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode
-if ($GLOBALS['output_mode'] == 1) return;
+if (getOutputMode() == 1) return;
 
 // Create timemark from saved month
 $mark = mktime(0, 0, 0, getConfig('last_month'), date('d', time()), date('Y', time()));
index da1be6a77cef86a5d8e50500446d2070bee27e83..cb120546621b44250fd204d9859466ba1d4e90ad 100644 (file)
@@ -222,13 +222,13 @@ if (!isAdminRegistered()) {
                                $URL = 'modules.php?module=admin&amp;';
 
                                // Rewrite overview module
-                               if ($GLOBALS['what'] == 'overview') {
-                                       $GLOBALS['action'] = getModeAction($GLOBALS['module'], $GLOBALS['what']);
+                               if (getWhat() == 'overview') {
+                                       setAction(getModeAction(getModule(), getWhat()));
                                } // END - if
 
                                // Add data to URL
-                               if (!empty($GLOBALS['what']))        $URL .= 'what='.$GLOBALS['what'];
-                                elseif (!empty($GLOBALS['action'])) $URL .= 'action='.$GLOBALS['action'];
+                               if (isWhatSet())        $URL .= 'what='.getWhat();
+                                elseif (isActionSet()) $URL .= 'action='.getAction();
                                 elseif (REQUEST_ISSET_GET('area'))  $URL .= 'area='.REQUEST_GET('area');
 
                         // Load URL
@@ -295,13 +295,13 @@ if (!isAdminRegistered()) {
                }
 
                // Load login form
-               if (!empty($GLOBALS['what'])) {
+               if (isWhatSet()) {
                        // Restore old what value
-                       $content = array('target' => 'what', 'value' => $GLOBALS['what']);
-               } elseif (!empty($GLOBALS['action'])) {
-                       if ($GLOBALS['action'] != 'logout') {
+                       $content = array('target' => 'what', 'value' => getWhat());
+               } elseif (isActionSet()) {
+                       if (getAction() != 'logout') {
                                // Restore old action value
-                               $content = array('target' => 'action', 'value' => $GLOBALS['action']);
+                               $content = array('target' => 'action', 'value' => getAction());
                        } else {
                                // Set default values
                                $content = array('target' => 'action', 'value' => 'login');
@@ -368,11 +368,11 @@ if (!isAdminRegistered()) {
                                loadIncludeOnce('inc/modules/admin/lasys-inc.php');
 
                                // Create new-style menu system will logical areas
-                               ADMIN_LOGICAL_AREA_SYSTEM($area, $act, $GLOBALS['what']);
+                               ADMIN_LOGICAL_AREA_SYSTEM($area, $act, getWhat());
                        } else {
                                // This little call constructs the whole default old and lacky menu system
                                // on left side. It also renders the content on right side
-                               ADMIN_DO_ACTION($GLOBALS['what']);
+                               ADMIN_DO_ACTION(getWhat());
                        }
                        break;
 
index 1200c49dc93c997ef609a4239ca3b931caf981f3..1f76fd3313761e180dc23826e21d0c7ce1c37c21 100644 (file)
@@ -46,12 +46,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) { 
        // Ok, we finally load the admin action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('ADMIN_404_ACTION', getWhat())));
 }
 
 //
index 56ae370c462314e57aeb9ea323ca06fd619418d2..d470716f45aced4d6481c516b58e235920f3e436 100644 (file)
@@ -46,12 +46,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the admin action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
 }
 
 //
index 0a5ddf70fe2c9262adba2809f407817c32f4a778..7d531bfdaf8d62478bc2d6442441ec914c3edc81 100644 (file)
@@ -46,12 +46,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the admin action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
 }
 
 //
index 4c08cfac0b1e5e2b3cef02f5706440800965c146..54df02e52583219dc98e4755fd0a940c5d2cfd7b 100644 (file)
@@ -46,12 +46,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the admin action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
 }
 
 //
index 327dddc125a96e5e0031c2bcbae550f42643e6c5..175fbf3a77bbf073c7fc173d88939aef39c72b2f 100644 (file)
@@ -46,13 +46,13 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the admin action module
        loadInclude($INC);
 } else {
        // "what file" not found
-       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
 }
 
 //
index 8db1b0de02b076dc76d2cc11f1e8faac0598c6e8..315df5c1be262257296908b10293d206ffafc306 100644 (file)
@@ -46,12 +46,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the admin action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
 }
 
 //
index 891af6a815ccf47a37b68547aa64db7ffb0faa71..798fba3f457a1eef1f9d73738840a0d4c7143974 100644 (file)
@@ -46,12 +46,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the admin action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
 }
 
 //
index 1a9cf120d6e54da1ac37df1f7f84c6fd5e1f889f..594a50a313396b8632e8d1598b0949b07ca5c854 100644 (file)
@@ -46,12 +46,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the admin action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
 }
 
 //
index 95ede33f3af0a699b75b9177f619ac18d456f946..d31da7d8703bb8ba86b978458925b0b605a5532a 100644 (file)
@@ -48,7 +48,7 @@ ADD_DESCR('admin', __FILE__);
 if (REQUEST_ISSET_POST('no')) {
        // Do not logout now
        redirectToUrl('admin.php');
-} elseif ((REQUEST_ISSET_POST(('yes'))) && ($GLOBALS['action'] == 'logout')) {
+} elseif ((REQUEST_ISSET_POST(('yes'))) && (getAction() == 'logout')) {
        // Redirect to logout link
        redirectToUrl('modules.php?module=admin&amp;logout=1');
 }
index 292f283744ed398a7a1cc1b2cd3a913c776fbdf9..eb7f1fa8001ab6a1575addc57d53162a2be39eb8 100644 (file)
@@ -46,12 +46,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the admin action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
 }
 
 //
index 311dd77aa4f958890fd5d681135907ab55280851..c8a688e1983fb68e9762dae94dbd186329cae906 100644 (file)
@@ -46,12 +46,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the admin action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
 }
 
 //
index 1de455a49a355a47539965bb87c3b3d3c76989b0..3f31c0adb8466ab7c213046de442edf6bdb339fe 100644 (file)
@@ -46,12 +46,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the admin action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
 }
 
 //
index 605c6a41f0354c243ede1c5c70aa617d17775b1f..e20ac2a733b7ef5614356fdfc9ab50e191f63d83 100644 (file)
@@ -46,12 +46,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the admin action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
 }
 
 //
index 73340586a1099fa783bbb32668816e6c4b4251ae..f61f6fa133da128020cacfdc46026eae460b2c9d 100644 (file)
@@ -46,12 +46,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the admin action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
 }
 
 //
index f97366a69bd10940e610e768e9791da667536abe..55134ed1c6a1785524c91644cadd6af919941f0b 100644 (file)
@@ -46,12 +46,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the admin action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
 }
 
 //
index b77fae24280a6148f03e250ab3c49022fcb25f33..14facb5b59ae9295d49e94f97fa0854e79c7a7ab 100644 (file)
@@ -46,12 +46,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the admin action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
 }
 
 //
index e5a8165bca535d9ab77a6446ed6a3e6400d9dc83..77a5132f84f13e69f5076ade1b0cd56d927cae7c 100644 (file)
@@ -46,12 +46,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the admin action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
 }
 
 //
index 2f9d38f0f998a65008c2fdb942054c90f4381834..fd20b86d2784e35e1dd8941437ef132252c3d2dc 100644 (file)
@@ -46,12 +46,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the admin action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
 }
 
 //
index c05bb77f7b999ca6cd70f0f477d5e70b47a85acf..1f527dced7602845079f3544129cf88dc1f00b40 100644 (file)
@@ -46,12 +46,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the admin action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
 }
 //
 ?>
index bd662bc6e925808c74ffbe3af330521d78b4dffe..7a58414c74db5f41aac379388f4b0f948b6f9341 100644 (file)
@@ -46,12 +46,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the admin action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
 }
 
 //
index 5e4a8ea3e4be330ae869a893a53ed148157af921..9fba2e4ea44389aff009e84a75627afac80ea226 100644 (file)
@@ -46,12 +46,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the admin action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
 }
 
 //
index 8897cf761970194fd9a8b15b4a03ec89f71519a7..bdc3fe5402b71c56519b737b0fdf1fd2c44b679a 100644 (file)
@@ -49,12 +49,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the admin action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
 }
 
 //
index 48e2d96df841e4fe87363eec8112ef9090974002..c4ab6ced5afbe72d49495bcc6a9a980c9acc7af9 100644 (file)
@@ -46,12 +46,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the admin action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
 }
 
 //
index 64375b4434d273fa27548db384c1057134758787..ef4c9680a8612e3d0257f54ba08c032eeba6fc8e 100644 (file)
@@ -46,12 +46,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the admin action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
 }
 
 //
index 86b97c7dc6c1493dfb4b9939fe5a742aee041843..6d481f6ed6263e97e5c79924d42c8f9b56248c5b 100644 (file)
@@ -46,12 +46,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the admin action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
 }
 
 //
index 94308609b3b86736c83de059bdde03be4e0df53e..12c9a9c556c7f8b0289cfe4bdeb379a90997649d 100644 (file)
@@ -46,12 +46,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the admin action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
 }
 
 //
index 9a9eab41e00d956cafb98c7eedcea76a581cfb1e..bdb9dedaf6c4ed86e8a64b269737850f92662f81 100644 (file)
@@ -239,19 +239,19 @@ function CHECK_ADMIN_COOKIES ($admin_login, $password) {
 //
 function ADMIN_DO_ACTION ($wht) {
        global $DATA;
-       //* DEBUG: */ echo __LINE__."*".$wht.'/'.$GLOBALS['module'].'/'.$GLOBALS['action'].'/'.$GLOBALS['what']."*<br />\n";
+       //* DEBUG: */ echo __LINE__."*".$wht.'/'.getModule().'/'.getAction().'/'.getWhat()."*<br />\n";
 
        // Remove any spaces from variable
        if (empty($wht)) {
                // Default admin action is the overview page
-               $wht = "overview";
+               $wht = 'overview';
        } else {
                // Compile out some chars
                $wht = COMPILE_CODE($wht, false, false, false);
        }
 
        // Get action value
-       $act = getModeAction($GLOBALS['module'], $wht);
+       $act = getModeAction(getModule(), $wht);
 
        // Define admin login name and ID number
        define('__ADMIN_LOGIN', getSession('admin_login'));
@@ -259,15 +259,15 @@ function ADMIN_DO_ACTION ($wht) {
 
        // Preload templates
        if (EXT_IS_ACTIVE('admins')) {
-               define('__ADMIN_WELCOME', LOAD_TEMPLATE("admin_welcome_admins", true));
+               define('__ADMIN_WELCOME', LOAD_TEMPLATE('admin_welcome_admins', true));
        } else {
-               define('__ADMIN_WELCOME', LOAD_TEMPLATE("admin_welcome", true));
+               define('__ADMIN_WELCOME', LOAD_TEMPLATE('admin_welcome', true));
        }
-       define('__ADMIN_FOOTER' , LOAD_TEMPLATE("admin_footer" , true));
+       define('__ADMIN_FOOTER' , LOAD_TEMPLATE('admin_footer' , true));
        define('__ADMIN_MENU'   , ADD_ADMIN_MENU($act, $wht, true));
 
        // Tableset header
-       LOAD_TEMPLATE("admin_main_header");
+       LOAD_TEMPLATE('admin_main_header');
 
        // Check if action/what pair is valid
        $result_action = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_admin_menu`
@@ -281,16 +281,16 @@ LIMIT 1", array($act, $wht, $wht), __FUNCTION__, __LINE__);
                        loadInclude($INC);
                } elseif ($GLOBALS['acl_allow'] === false) {
                        // Access denied
-                       LOAD_TEMPLATE("admin_menu_failed", false, getMessage('ADMIN_ACCESS_DENIED'));
+                       LOAD_TEMPLATE('admin_menu_failed', false, getMessage('ADMIN_ACCESS_DENIED'));
                        addFatalMessage(__FUNCTION__, __LINE__, getMessage('ADMIN_ACCESS_DENIED'));
                } else {
                        // Include file not found! :-(
-                       LOAD_TEMPLATE("admin_menu_failed", false, sprintf(getMessage('ADMIN_ACTION_404'), $act));
+                       LOAD_TEMPLATE('admin_menu_failed', false, sprintf(getMessage('ADMIN_ACTION_404'), $act));
                        addFatalMessage(__FUNCTION__, __LINE__, getMessage('ADMIN_ACTION_404'), $act);
                }
        } else {
                // Invalid action/what pair found!
-               LOAD_TEMPLATE("admin_menu_failed", false, sprintf(getMessage('ADMIN_ACTION_INVALID'), $act.'/'.$wht));
+               LOAD_TEMPLATE('admin_menu_failed', false, sprintf(getMessage('ADMIN_ACTION_INVALID'), $act.'/'.$wht));
                addFatalMessage(__FUNCTION__, __LINE__, getMessage('ADMIN_ACTION_INVALID'), $act.'/'.$wht);
        }
 
@@ -298,7 +298,7 @@ LIMIT 1", array($act, $wht, $wht), __FUNCTION__, __LINE__);
        SQL_FREERESULT($result_action);
 
        // Tableset footer
-       LOAD_TEMPLATE("admin_main_footer");
+       LOAD_TEMPLATE('admin_main_footer');
 }
 
 //
@@ -314,7 +314,7 @@ function ADD_ADMIN_MENU ($act, $wht, $return=false) {
        // Is there a cache instance?
        if ((isCacheInstanceValid()) && (getConfig('cache_admin_menu') == 'Y')) {
                // Create cache name
-               $cacheName = "admin_".$act."_".$wht."_".getLanguage()."_".strtolower(getSession('admin_login'));
+               $cacheName = 'admin_' . $act . '_' . $wht . '_' . getLanguage() . '_' . strtolower(getSession('admin_login'));
 
                // Is that cache there?
                if ($GLOBALS['cache_instance']->loadCacheFile($cacheName)) {
@@ -345,7 +345,7 @@ function ADD_ADMIN_MENU ($act, $wht, $return=false) {
                        if ((EXT_IS_ACTIVE('admins')) && (GET_EXT_VERSION('admins') > '0.2.0')) {
                                $ACL = adminsCheckAdminAcl($menu, '');
                        } else {
-                               // ACL is "allow"... hmmm
+                               // @TODO ACL is 'allow'... hmmm
                                $ACL = true;
                        }
 
@@ -393,7 +393,7 @@ function ADD_ADMIN_MENU ($act, $wht, $return=false) {
                                                if ((EXT_IS_ACTIVE('admins')) && (GET_EXT_VERSION('admins') > '0.2.0')) {
                                                        $ACL = adminsCheckAdminAcl('', $wht_sub);
                                                } else {
-                                                       // ACL is "allow"... hmmm
+                                                       // @TODO ACL is 'allow'... hmmm
                                                        $ACL = true;
                                                }
 
@@ -488,7 +488,7 @@ function ADD_MEMBER_SELECTION_BOX ($def='0', $add_all=false, $return=false, $non
 
        // USe this only for adding points (e.g. adding refs really makes no sence ;-) )
        if ($add_all === true)   $OUT = "      <option value=\"all\">{--ALL_MEMBERS--}</option>\n";
-       elseif ($none === true) $OUT = "      <option value=\"0\">{--SELECT_NONE--}</option>\n";
+        elseif ($none === true) $OUT = "      <option value=\"0\">{--SELECT_NONE--}</option>\n";
 
        while ($content = SQL_FETCHARRAY($result)) {
                $OUT .= "      <option value=\"".bigintval($content['userid'])."\"";
@@ -508,7 +508,7 @@ function ADD_MEMBER_SELECTION_BOX ($def='0', $add_all=false, $return=false, $non
                define('__LANG_VALUE', getLanguage());
 
                // Load template
-               LOAD_TEMPLATE("admin_member_selection_box", false, $GLOBALS['what']);
+               LOAD_TEMPLATE('admin_member_selection_box', false, getWhat());
        } else {
                // Return content in selection frame
                return "<select class=\"admin_select\" name=\"".$field."\" size=\"1\">\n".$OUT."</select>\n";
@@ -564,7 +564,7 @@ function ADMIN_SAVE_SETTINGS (&$POST, $tableName = "_config", $whereStatement =
        // Now, walk through all entries and prepare them for saving
        foreach ($POST as $id => $val) {
                // Process only formular field but not submit buttons ;)
-               if ($id != "ok") {
+               if ($id != 'ok') {
                        // Do not save the ok value
                        convertSelectionsToTimestamp($POST, $DATA, $id, $skip);
 
@@ -672,7 +672,7 @@ function ADMIN_MAKE_MENU_SELECTION ($menu, $type, $name, $default = '') {
                                $part = substr($part, 0, -4);
 
                                // Is that part different from the overview?
-                               if ($part != "overview") {
+                               if ($part != 'overview') {
                                        $OUT .= "       <option value=\"".$part."\"";
                                        if ($part == $default) $OUT .= ' selected="selected"';
                                        $OUT .= ">".$part."</option>\n";
@@ -733,7 +733,7 @@ function ADMIN_CHECK_MENU_MODE () {
        }
 
        // Check what the admin wants and set it when it's not the global mode
-       if ($ADMIN != "global") $mode = $ADMIN;
+       if ($ADMIN != 'global') $mode = $ADMIN;
 
        // Return admin-menu's mode
        return $mode;
@@ -1278,13 +1278,13 @@ function ADMIN_UPDATE_TASK_DATA ($id, $row, $data) {
 // Checks wether if the admin menu has entries
 function ifAdminMenuHasEntries ($action) {
        return (
-       ((
-       isset($GLOBALS['admin_menu_has_entries'][$action])
-       ) && (
-       $GLOBALS['admin_menu_has_entries'][$action] === true
-       )) || (
-       $action == "login"
-       )
+               ((
+                       isset($GLOBALS['admin_menu_has_entries'][$action])
+               ) && (
+                       $GLOBALS['admin_menu_has_entries'][$action] === true
+               )) || (
+                       $action == 'login'
+               )
        );
 }
 
@@ -1298,11 +1298,11 @@ function ADMIN_CREATE_USERID_LINK ($uid) {
        // Is the userid set correctly?
        if ($uid > 0) {
                // Create a link to that profile
-               return "{!URL!}/modules.php?module=admin&amp;what=list_user&amp;uid=".bigintval($uid);
+               return '{!URL!}/modules.php?module=admin&amp;what=list_user&amp;uid='.bigintval($uid);
        } // END - if
 
        // Return a link to the user list
-       return "{!URL!}/modules.php?module=admin&amp;what=list_user";
+       return '{!URL!}/modules.php?module=admin&amp;what=list_user';
 }
 
 //
index a004f02bf099fc905dd0aa66bdbb87eee81e23a5..b8b0e4c51a7ff1cfbb4b2486442e548bc4eca8d0 100644 (file)
@@ -50,7 +50,7 @@ if (REQUEST_ISSET_POST('edit')) {
        $SEL = countPostSelection();
        if ($SEL > 0) {
                // Add option for events
-               $GLOBALS['cache_array']['admins'] = generateOptionList('admins', 'id', "login", '', 'email');
+               $GLOBALS['cache_array']['admins'] = generateOptionList('admins', 'id', 'login', '', 'email');
                $SW = 2; $rowNameS = '';
                foreach (REQUEST_POST('sel') as $template => $sel) {
                        // First of all load data from DB
@@ -68,7 +68,7 @@ if (REQUEST_ISSET_POST('edit')) {
                                        if ($content['admin_id'] == '-1') $OUT .= ' selected="selected"';
                                        $OUT .= ">{--ADMINS_TO_USER_EVENTS--}</option>\n";
                                }
-                               $OUT .= generateOptionList('admins', 'id', "login", $content['admin_id'], 'email');
+                               $OUT .= generateOptionList('admins', 'id', 'login', $content['admin_id'], 'email');
                                $OUT .= "</select>\n<br />\n";
                                $aid2 = $content['admin_id']; $id2 = $content['id'];
                        }
index 9c7eb830f1e1e68137a1e36b6f0fcf3535437535..7d2b9aba6afbc71c02858eb2f01bca90de63aaf0 100644 (file)
@@ -49,21 +49,20 @@ if (isFormSent()) {
        ADMIN_SAVE_SETTINGS_POST();
 } else {
        // Prepare data for the template
-       switch (getConfig('admin_menu'))
-       {
-               case "NEW":
-                       define('__ADMIN_MENU_NEW', ' checked="checked"');
+       switch (getConfig('admin_menu')) {
+               case 'NEW':
+                       define('__ADMIN_MENU_NEW', ' checked='checked'');
                        define('__ADMIN_MENU_OLD'   , '');
                        break;
 
-               case "OLD":
+               case 'OLD':
                        define('__ADMIN_MENU_NEW', '');
-                       define('__ADMIN_MENU_OLD'   , ' checked="checked"');
+                       define('__ADMIN_MENU_OLD'   , ' checked='checked'');
                        break;
        }
 
        // Display form
-       LOAD_TEMPLATE("admin_config_admin");
+       LOAD_TEMPLATE('admin_config_admin');
 }
 
 //
index 84912169d5cc332df93dc0aaa7e708401fc47be0..8f0a376d8b14a1d1a239b13e519d54883a8d12d5 100644 (file)
@@ -61,10 +61,10 @@ if (isFormSent()) {
                if (!empty($rate)) $RATES[] = $rate;
        }
        REQUEST_SET_POST('turbo_rates', trim(implode(';', $RATES)));
-       REQUEST_UNSET_POST(('rate'));
+       REQUEST_UNSET_POST('rate');
 
        // Automatically calculate bonus points for ranks 2 and 3 when not set
-       if (!REQUEST_ISSET_POST(('turbo_rates'))) REQUEST_SET_POST('turbo_rates', "".round(getConfig('turbo_bonus') / 2).';'.round(getConfig('turbo_bonus') / 4)."");
+       if (!REQUEST_ISSET_POST(('turbo_rates'))) REQUEST_SET_POST('turbo_rates', ''.round(getConfig('turbo_bonus') / 2).';'.round(getConfig('turbo_bonus') / 4).'');
 
        // Save data
        ADMIN_SAVE_SETTINGS_POST();
@@ -85,7 +85,7 @@ if (isFormSent()) {
        define('__TLINES_VALUE', getConfig('bonus_lines'));
 
        // Transfer options to template __MEMBER_SELECTION
-       define('__MEMBER_SELECTION', ADD_MEMBER_SELECTION_BOX(getConfig('bonus_uid'), false, true, true, "bonus_uid"));
+       define('__MEMBER_SELECTION', ADD_MEMBER_SELECTION_BOX(getConfig('bonus_uid'), false, true, true, 'bonus_uid'));
 
        // Initialize array for the points list
        //die("*".getConfig('turbo_rates')."*");
index 19b350a1419e5a111bc80f854c7ed114efb3f479..ef1973fbe404d45fc4730c5a1e52329d350f084c 100644 (file)
@@ -45,8 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 // Add description as navigation point
 ADD_DESCR('admin', __FILE__);
 
-
-if (REQUEST_ISSET_POST(('rate'))) REQUEST_SET_POST('rate', convertCommaToDot(REQUEST_POST('rate')));
+if (REQUEST_ISSET_POST('rate')) REQUEST_SET_POST('rate', convertCommaToDot(REQUEST_POST('rate')));
 
 if ((REQUEST_ISSET_POST('add')) && (REQUEST_ISSET_POST('title')) && (REQUEST_POST('rate') > 0)) {
        // Add new payout type
@@ -58,17 +57,19 @@ if ((REQUEST_ISSET_POST('add')) && (REQUEST_ISSET_POST('title')) && (REQUEST_POS
 (type, rate, min_points, from_account, from_pass, engine_url, engine_ret_ok, engine_ret_failed, pass_enc, allow_url)
 VALUES ('%s', %d, %d,'%s','%s','%s','%s','%s','%s','%s')",
                array(
-               REQUEST_POST('title'),
-               bigintval(REQUEST_POST('rate')),
-               bigintval(REQUEST_POST('mpoi')),
-               REQUEST_POST('yacc'),
-               REQUEST_POST('ypass'),
-               REQUEST_POST('yurl'),
-               REQUEST_POST('yrdone'),
-               REQUEST_POST('yrfailed'),
-               REQUEST_POST('ytrans'),
-               REQUEST_POST('allow_url'),
+                       REQUEST_POST('title'),
+                       bigintval(REQUEST_POST('rate')),
+                       bigintval(REQUEST_POST('mpoi')),
+                       REQUEST_POST('yacc'),
+                       REQUEST_POST('ypass'),
+                       REQUEST_POST('yurl'),
+                       REQUEST_POST('yrdone'),
+                       REQUEST_POST('yrfailed'),
+                       REQUEST_POST('ytrans'),
+                       REQUEST_POST('allow_url'),
                ), __FILE__, __LINE__);
+
+               // Get message
                $msg = getMessage('ADMIN_PAYOUT_TYPE_ADDED');
        } else {
                // Free memory
@@ -85,7 +86,7 @@ $result_mem = SQL_QUERY("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_payouts` WHERE
 $display = true;
 if ((REQUEST_ISSET_POST('edit')) && (countPostSelection() > 0)) {
        // Edit payout types
-       if ((REQUEST_ISSET_GET('ok')) && (REQUEST_GET('ok') == "ok")) {
+       if ((REQUEST_ISSET_GET('ok')) && (REQUEST_GET('ok') == 'ok')) {
                // Init SQLs
                INIT_SQLS();
 
@@ -104,10 +105,10 @@ min_points=%s,
 allow_url='%s'
 WHERE `id`='".$id."' LIMIT 1",
                                array(
-                               REQUEST_POST('title', $id),
-                               convertCommaToDot(REQUEST_POST('rate', $id)),
-                               convertCommaToDot(REQUEST_POST('mpoi' , $id)),
-                               REQUEST_POST('allow', $id),
+                                       REQUEST_POST('title', $id),
+                                       convertCommaToDot(REQUEST_POST('rate', $id)),
+                                       convertCommaToDot(REQUEST_POST('mpoi' , $id)),
+                                       REQUEST_POST('allow', $id),
                                ),__FILE__, __LINE__, false));
                        }
                }
@@ -138,7 +139,7 @@ WHERE `id`='".$id."' LIMIT 1",
                        );
 
                        // Load row template and switch color
-                       $OUT .= LOAD_TEMPLATE("admin_config_payouts_edit_row", true, $content);
+                       $OUT .= LOAD_TEMPLATE('admin_config_payouts_edit_row', true, $content);
                        $SW = 3 - $SW;
                }
 
@@ -146,11 +147,11 @@ WHERE `id`='".$id."' LIMIT 1",
                define('__PAYOUT_ROWS', $OUT);
 
                // Load main template
-               LOAD_TEMPLATE("admin_config_payouts_edit");
+               LOAD_TEMPLATE('admin_config_payouts_edit');
        }
 } elseif ((REQUEST_ISSET_POST('del')) && (countPostSelection() > 0)) {
        // Delete payout types
-       if ((REQUEST_ISSET_GET('ok')) && (REQUEST_GET('ok') == "ok")) {
+       if ((REQUEST_ISSET_GET('ok')) && (REQUEST_GET('ok') == 'ok')) {
                // Init SQLs
                INIT_SQLS();
 
@@ -188,13 +189,13 @@ WHERE `id`='".$id."' LIMIT 1",
                        );
 
                        // Load row template and switch color
-                       $OUT .= LOAD_TEMPLATE("admin_config_payouts_del_row", true, $content);
+                       $OUT .= LOAD_TEMPLATE('admin_config_payouts_del_row', true, $content);
                        $SW = 3 - $SW;
                }
                define('__PAYOUT_ROWS', $OUT);
 
                // Load main template
-               LOAD_TEMPLATE("admin_config_payouts_del");
+               LOAD_TEMPLATE('admin_config_payouts_del');
        }
 }
 
@@ -221,7 +222,7 @@ if ((SQL_NUMROWS($result_type) > 0) && ($display)) {
                );
 
                // Load row template and switch color
-               $OUT .= LOAD_TEMPLATE("admin_config_payouts_row", true, $content);
+               $OUT .= LOAD_TEMPLATE('admin_config_payouts_row', true, $content);
                $SW = 3 - $SW;
        }
 
@@ -232,7 +233,7 @@ if ((SQL_NUMROWS($result_type) > 0) && ($display)) {
        define('__PAYOUT_ROWS', $OUT);
 
        // Load main template
-       LOAD_TEMPLATE("admin_config_payouts");
+       LOAD_TEMPLATE('admin_config_payouts');
 }
 
 // Does your members request payouts?
@@ -248,7 +249,7 @@ if ((SQL_NUMROWS($result_mem) > 0) && ($display)) {
 SQL_FREERESULT($result_mem);
 
 // Add new paypout type
-if ($display) LOAD_TEMPLATE("admin_payout_add_new");
+if ($display === true) LOAD_TEMPLATE('admin_payout_add_new');
 
 //
 ?>
index 51aef758e7ef7fe878a037d3d3e613200cf20e57..4c10dafb62d17d45359fc47989e9735ec8d4a921 100644 (file)
@@ -51,15 +51,14 @@ $message = '';
 // Is the 'sub' parameter set?
 if (REQUEST_ISSET_GET('sub')) {
        // Yes, then do some sanity-checks
-       switch (REQUEST_GET('sub'))
-       {
-               case "points":
+       switch (REQUEST_GET('sub')) {
+               case 'points':
                        if ((!REQUEST_ISSET_POST(('points_register'))) || (!REQUEST_ISSET_POST(('points_ref')))) {
                                REQUEST_UNSET_POST('ok');
                        }
                        break;
 
-               case "ref":
+               case 'ref':
                        if (REQUEST_ISSET_GET('do')) {
                                if (((!REQUEST_ISSET_POST(('lvl'))) || (!REQUEST_ISSET_POST(('perc')))) && (REQUEST_GET('do') == 'add')) {
                                        REQUEST_UNSET_POST('ok');
@@ -69,18 +68,17 @@ if (REQUEST_ISSET_GET('sub')) {
        }
 } else {
        // Display overview
-       REQUEST_SET_GET('sub', "overview");
+       REQUEST_SET_GET('sub', 'overview');
 }
 
 if (isFormSent()) {
        INIT_SQLS();
-       switch (REQUEST_GET('sub'))
-       {
-               case "points":
+       switch (REQUEST_GET('sub')) {
+               case 'points':
                        ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_config` SET points_register='".REQUEST_POST('points_register')."', points_ref='".REQUEST_POST('points_ref')."' WHERE config=0 LIMIT 1");
                        break;
 
-               case "ref":
+               case 'ref':
                        switch (REQUEST_GET('do'))
                        {
                                case 'add':
index be7cc1d23b573616d76408fa95239a6f9674e89a..68849e0a63ff6c303459159a5eacaefa1ccdc130 100644 (file)
@@ -235,7 +235,7 @@ if (REQUEST_ISSET_GET(('active'))) {
 
 // Case selection
 switch ($do) {
-       case "overview": // List all registered extensions
+       case 'overview': // List all registered extensions
                if (GET_EXT_VERSION('sql_patches') >= '0.0.6') {
                        // Load extension data with CSS informations
                        $result = SQL_QUERY("SELECT id AS ext_id, ext_name, ext_active, ext_has_css AS ext_css, ext_version
index f27255b6664fc0ef770931e31ea644ebbd6c03b9..c6ffdd6749b61e2cf099874c7de78f408ba59402 100644 (file)
@@ -47,7 +47,7 @@ ADD_DESCR('admin', __FILE__);
 
 if (!REQUEST_ISSET_GET('mode')) {
        // Chosse the overview page as default
-       REQUEST_GET('mode', "overview");
+       REQUEST_GET('mode', 'overview');
 } else {
        // Set table title automatically
        if (!REQUEST_ISSET_GET(('select'))) REQUEST_GET('select', "all");
@@ -61,7 +61,7 @@ switch (REQUEST_GET('mode'))
        case "already":  // Already payed out points
                break;
 
-       case "overview": // General overview page
+       case 'overview': // General overview page
                $SUM_ALREADY = 0; $SUM_WAITING = 0;
                // Number of direct already payouts and referal
                $result = SQL_QUERY("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_doubler` WHERE completed='Y' AND is_ref='N'", __FILE__, __LINE__);
index df3a5872f02f9c5d6c38b599fb337d4d18d37575..f2fded492112afa250a83e2ac3eeb04623e83c30 100644 (file)
@@ -100,7 +100,7 @@ if (REQUEST_ISSET_GET('access')) {
                        // We currenly only like files with "access" as prefix, should be more flexible!
                        if (substr($file, 0, 6) == 'access') {
                                // Okay, let us print it out
-                               OUTPUT_HTML("<li><a href=\"{!URL!}/modules.php?module=admin&amp;what=".$GLOBALS['what']."&amp;access=".urlencode($file)."\">".$file."</a></li>");
+                               OUTPUT_HTML("<li><a href=\"{!URL!}/modules.php?module=admin&amp;what=".getWhat()."&amp;access=".urlencode($file)."\">".$file."</a></li>");
                        }
                }
                closedir($handle);
index 677277428947dcfe1aa53906c45f7002fd08470f..e3204cb0d03bf77500a30ddc38263864abded766 100644 (file)
@@ -52,7 +52,7 @@ $jobsDone = true;
 $taskExt = false; // Default is that 'task' is not installed
 
 // When the admin is logging in check several things first (new jobs to complete and so on)
-if ($GLOBALS['action'] == "login") {
+if (getAction() == 'login') {
        if (EXT_IS_ACTIVE('task')) {
                // When task extension is registered output advanced overview page
                $jobsDone = OUTPUT_ADVANCED_OVERVIEW($result_tasks); // This function is provided by the extension 'task'
@@ -64,9 +64,9 @@ if ($GLOBALS['action'] == "login") {
 } // END - if
 
 // Are we in 'welcome' page and are there jobs to be done?
-if (!ifAdminMenuHasEntries($GLOBALS['action'])) {
+if (!ifAdminMenuHasEntries(getAction())) {
        // This menu is empty and so no content is displayed
-       LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_MENU_IS_EMPTY'), $GLOBALS['action']));
+       LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_MENU_IS_EMPTY'), getAction()));
 } elseif ($jobsDone === true) {
        // Generate overview of all main menus
        if ((is_array($GLOBALS['menu']['description'])) && (count($GLOBALS['menu']['description']) > 0)) {
index 993ecc443ba86f25165b39aa9aad92ae67dc6010..f7023c24023b4daf4b1551c3469fcc2e82f83e4d 100644 (file)
@@ -46,7 +46,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Normally we want the overview of all registered theme_check
-$mode = "overview";
+$mode = 'overview';
 $SEL = 0;
 
 // Get response from our server
index 70d433eb40e1c04d0102118d95fcd1c9c458cb52..a90fc640de3e64ae0bdf90c08e552a207abe9392 100644 (file)
@@ -93,11 +93,11 @@ if ((!empty($FQFN)) && (isFileReadable($FQFN))) {
        // Until here...
 
        // Replace URLs
-       $content = str_replace("usage.png", "{!URL!}/modules.php?module=admin&amp;what=".$GLOBALS['what']."&type=usage&image=usage", $content);
-       $content = str_replace("daily_usage_", "{!URL!}/modules.php?module=admin&amp;what=".$GLOBALS['what']."&type=daily&image=", $content);
-       $content = str_replace("hourly_usage_", "{!URL!}/modules.php?module=admin&amp;what=".$GLOBALS['what']."&type=hourly&image=", $content);
-       $content = str_replace("ctry_usage_", "{!URL!}/modules.php?module=admin&amp;what=".$GLOBALS['what']."&type=ctry&image=", $content);
-       $content = str_replace("usage_", "{!URL!}/modules.php?module=admin&amp;what=".$GLOBALS['what']."&usage=", str_replace(".html", '', $content));
+       $content = str_replace("usage.png", "{!URL!}/modules.php?module=admin&amp;what=".getWhat()."&type=usage&image=usage", $content);
+       $content = str_replace("daily_usage_", "{!URL!}/modules.php?module=admin&amp;what=".getWhat()."&type=daily&image=", $content);
+       $content = str_replace("hourly_usage_", "{!URL!}/modules.php?module=admin&amp;what=".getWhat()."&type=hourly&image=", $content);
+       $content = str_replace("ctry_usage_", "{!URL!}/modules.php?module=admin&amp;what=".getWhat()."&type=ctry&image=", $content);
+       $content = str_replace("usage_", "{!URL!}/modules.php?module=admin&amp;what=".getWhat()."&usage=", str_replace(".html", '', $content));
 
        // Disabled due to too much trouble
        //$content = str_replace("HREF=\'http://', "href=\"{!URL!}/modules.php?module=loader&amp;url=http://", $content);
index 1dcd93d11ed31b97a499ab8ae858da252540dc52..cf4f43962a47ae245f1d0b0e3048d8d8e03bc501 100644 (file)
@@ -52,14 +52,14 @@ if (!defined('__SECURITY')) {
 ADD_DESCR('guest', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/guest/what-%s.php", $GLOBALS['what']);
+$INC = sprintf("inc/modules/guest/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the guest action module
        loadInclude($INC);
 } elseif ($IS_VALID) {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('GUEST_404_ACTION'), getWhat()));
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('GUEST_LOCKED_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('GUEST_LOCKED_ACTION'), getWhat()));
 }
 
 //
index a28716c64442b51c38ae6700241a257bf14c8d1e..844be918d2eba2f1c30a6e51b047600f8a54f955 100644 (file)
@@ -46,12 +46,12 @@ if (!defined('__SECURITY')) {
 }
 
 // Only when one admin link is clicked...
-$INC = sprintf("inc/modules/guest/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/guest/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the guest action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('GUEST_404_ACTION'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('GUEST_404_ACTION'), getWhat());
 }
 
 //
index a555c07e79914463f22311a1839ec9a716f178ca..2515ae59d8b050d27c02c7d1889655a2df5ebefe 100644 (file)
@@ -49,12 +49,12 @@ if (!defined('__SECURITY')) {
 ADD_DESCR('guest', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/guest/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/guest/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the guest action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('GUEST_404_ACTION'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('GUEST_404_ACTION'), getWhat());
 }
 
 //
index feed98a8b3c90ea76705b6cb2c7bc14b695a4e20..c98d8569e598e30191f423ffae17be5d763b5a5a 100644 (file)
@@ -49,12 +49,12 @@ if (!defined('__SECURITY')) {
 ADD_DESCR('guest', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/guest/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/guest/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the guest action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('GUEST_404_ACTION'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('GUEST_404_ACTION'), getWhat());
 }
 
 //
index b53694dd7ac276e3ca4f1c4364d45f4fe8a8d863..948fbf7cdfe10b82e7e16d9588aaf19d86a6eb53 100644 (file)
@@ -51,12 +51,12 @@ if (!defined('__SECURITY')) {
 ADD_DESCR('guest', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/guest/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/guest/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the guest action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, getMessage('GUEST_404_ACTION'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('GUEST_404_ACTION'), getWhat());
 }
 
 //
index 80210b25438b0366ed15dfa08f3794fcf6d512a0..52e22c9fd9967b6b13d18b63ba9ec9eb1e2b87a4 100644 (file)
@@ -54,8 +54,8 @@ $num_themes = SQL_NUMROWS($result_themes);
 if ($num_themes > 1) {
        // If more than 1 is installed output selection box
        $act = '';
-       if (!empty($GLOBALS['action'])) $act = SQL_ESCAPE($GLOBALS['action']);
-       $OUT = generateThemeSelectionBox('index', $act, $GLOBALS['what'], $result_themes);
+       if (isActionSet()) $act = getAction();
+       $OUT = generateThemeSelectionBox('index', $act, getWhat(), $result_themes);
 } elseif (($num_themes == 1) || ((!IS_ADMIN()) && ($num_themes == 0))) {
        // If there's only one just print it's name
        define('__THEME_NAME', getCurrentThemeName());
index 28bb48b2a3ccac7b4d1332434f1564e75be745be..10525b30e92d5075bb8103bb64ca366b1d14b7a4 100644 (file)
@@ -58,18 +58,18 @@ handleCodeMessage();
 LOAD_TEMPLATE('guest_menu_td');
 
 // When no what value is provided take the "home" value
-if (empty($GLOBALS['what'])) $GLOBALS['what'] = getConfig('index_home');
+if (!isWhatSet()) setWhatFromConfig('index_home');
 
 // Adding the main content module here
-if (empty($GLOBALS['action'])) {
+if (!isActionSet()) {
        // Get action value from what value
-       $GLOBALS['action'] = getModeAction('guest', $GLOBALS['what']);
+       setAction(getModeAction('guest', getWhat()));
 } // END - if
 
 // Add the guest's menu here...
 if ((getConfig('guest_menu') == 'Y') || (!EXT_IS_ACTIVE('sql_patches', true))) {
        // Show only when guest menu is active
-       ADD_MENU('guest', $GLOBALS['action'], $GLOBALS['what']);
+       ADD_MENU('guest', getAction(), getWhat());
 } // END - if
 
 // TDs between menu and content
@@ -79,10 +79,10 @@ LOAD_TEMPLATE('guest_menu_content');
 $GLOBALS['block_mode'] = false;
 
 // Construct FQFN
-$INC = sprintf("inc/modules/guest/action-%s.php", $GLOBALS['action']);
+$INC = sprintf("inc/modules/guest/action-%s.php", getAction());
 
 // Is the file there?
-if ((isIncludeReadable($INC)) && (isMenuActionValid('guest', $GLOBALS['action'], $GLOBALS['what']))) {
+if ((isIncludeReadable($INC)) && (isMenuActionValid('guest', getAction(), getWhat()))) {
        // Requested module is available so we load it
        loadIncludeOnce($INC);
 } else {
index 90a768f92259131d0543f138965fdfaa6e5857f3..67b049ad2e9abf09fce5cd3a8b75519c7a671627 100644 (file)
@@ -42,7 +42,7 @@ if (!defined('__SECURITY')) {
        require($INC);
 } elseif (!IS_MEMBER()) {
        $URL = 'modules.php?module=index';
-       if ($check == 'mem_only') $URL .= '&amp;msg='.getCode('MODULE_MEM_ONLY') . '&amp;mod='.$GLOBALS['module'];
+       if ($check == 'mem_only') $URL .= '&amp;msg='.getCode('MODULE_MEM_ONLY') . '&amp;mod='.getModule();
        redirectToUrl($URL);
 }
 
@@ -68,15 +68,15 @@ OUTPUT_HTML("<tr>
   <td class=\"member_menu\">");
 
 // Adding the main content module here
-if (empty($GLOBALS['action'])) {
-       if (empty($GLOBALS['what'])) $GLOBALS['what'] = 'welcome';
+if (!isActionSet()) {
+       if (!isWhatSet()) setWhat('welcome');
 } else {
-       $act = SQL_ESCAPE($GLOBALS['action']);
+       $act = getAction();
 }
 
 // Add the member's menu here...
 if ((getConfig('member_menu') == 'Y') || (!EXT_IS_ACTIVE('sql_patches', true))) {
-       ADD_MENU('member', getModeAction('member', $GLOBALS['what']), $GLOBALS['what']);
+       ADD_MENU('member', getModeAction('member', getWhat()), getWhat());
 } // END - if
 
 // Menu -> content
@@ -84,7 +84,7 @@ OUTPUT_HTML("   </td>
   <td valign=\"top\" align=\"center\" rowspan=\"3\" class=\"member_content\">");
 
 $INC = sprintf("inc/modules/member/action-%s.php", $act);
-if ((isIncludeReadable($INC)) && (isMenuActionValid('member', $GLOBALS['action'], $GLOBALS['what']))) {
+if ((isIncludeReadable($INC)) && (isMenuActionValid('member', getAction(), getWhat()))) {
        // Requested module is available so we load it
        loadInclude($INC);
 } else {
index e238f6d920206187923c47f689d7d7a00126467e..da78c8466dbae6aec731384c7329c2afcc0e492c 100644 (file)
@@ -54,12 +54,12 @@ if (!defined('__SECURITY')) {
 ADD_DESCR('member', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/member/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the member action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), $GLOBALS['what']));
+       addFatalMessage(__FILE__, __LINE__, getMessage('MEMBER_404_ACTION'), getWhat());
 }
 
 //
index 24c6e8e6f7b21cc2c061a9b0890f658dd3678190..2fb0d256ca31e3418015293f1cc8250234a3dc1b 100644 (file)
@@ -51,12 +51,12 @@ if (!defined('__SECURITY')) {
 ADD_DESCR('member', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/member/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the member action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), $GLOBALS['what']));
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat()));
 }
 
 //
index dbf88b3647f87e12edbfd05636a00dde69e8cbfb..6fb577f5fd5450cfe54684188d818539175f7bef 100644 (file)
@@ -54,12 +54,12 @@ if (!defined('__SECURITY')) {
 ADD_DESCR('member', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/member/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the member action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), $GLOBALS['what']));
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat()));
 }
 
 //
index aa719fd1c5174c673373995aad33b181e191f7f2..80760aee9b29e2734bff31bc8bc4202ac7ce5d97 100644 (file)
@@ -51,12 +51,12 @@ if (!defined('__SECURITY')) {
 ADD_DESCR('member', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/member/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the member action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), $GLOBALS['what']));
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat()));
 }
 
 //
index f641c9c9ffc66af1a961bfc90a176740e0f471f6..4c3ee1593394dd324ed731be08b5efdda57b3513 100644 (file)
@@ -51,12 +51,12 @@ if (!defined('__SECURITY')) {
 ADD_DESCR('member', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/member/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the member action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), $GLOBALS['what']));
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat()));
 }
 
 //
index 0bfcec04f74d8bfd25390dc83687a71e9605d0db..ad1179d4142538e272094b43ba7200b154971c0d 100644 (file)
@@ -51,12 +51,12 @@ if (!defined('__SECURITY')) {
 ADD_DESCR('member', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/member/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the member action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), $GLOBALS['what']));
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat()));
 }
 
 //
index 756a6b232e157bec0caf4e7dc352249643a593eb..71fb41b0b8a030f10cbf5af531d1a8e39e7599ec 100644 (file)
@@ -54,12 +54,12 @@ if (!defined('__SECURITY')) {
 ADD_DESCR('member', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/member/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the member action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), $GLOBALS['what']));
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat()));
 }
 
 //
index 083aa8b71e24bab198e99d01e43eb9a4da1b7cfa..3a3c1681ecb610b9039cf8764330864ac51e90b2 100644 (file)
@@ -51,12 +51,12 @@ if (!defined('__SECURITY')) {
 ADD_DESCR('member', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/member/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the member action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), $GLOBALS['what']));
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat()));
 }
 
 //
index ed3ec0f80cca63c31a6be5b8200f7e743dece3ea..3e47e7fe834bd5c8f8b415372ffb7c9e12fad63f 100644 (file)
@@ -51,12 +51,12 @@ if (!defined('__SECURITY')) {
 ADD_DESCR('member', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/member/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the member action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), $GLOBALS['what']));
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat()));
 }
 
 //
index 24945ce4f02ecb63860cb2338686705600d0e5a5..a1e5c7719b866d271b4da9b9311b71e8260ddc96 100644 (file)
@@ -54,12 +54,12 @@ if (!defined('__SECURITY')) {
 ADD_DESCR('member', __FILE__);
 
 // Load the include file
-$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/member/what-%s.php", getWhat());
 if (isIncludeReadable($INC)) {
        // Ok, we finally load the member action module
        loadInclude($INC);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), $GLOBALS['what']));
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat()));
 }
 
 //
index 2bce462e88b4339c47107886d9161953ca6cc3f1..46acae9c4ecc6fe9072605a09780f7c64b7c97a0 100644 (file)
@@ -56,13 +56,13 @@ $num_themes = SQL_NUMROWS($result_themes);
 if ($num_themes > 1) {
        // If more than 1 is installed output selection box
        $act = ''; $wht = '';
-       if (!empty($GLOBALS['action'])) $act = SQL_ESCAPE($GLOBALS['action']);
-       if (!empty($GLOBALS['what']))   $wht = SQL_ESCAPE($GLOBALS['what']);
-       $OUT = generateThemeSelectionBox("login", $act, $wht, $result_themes);
+       if (isActionSet()) $act = getAction();
+       if (isWhatSet())   $wht = getWhat();
+       $OUT = generateThemeSelectionBox('login', $act, $wht, $result_themes);
 } elseif (($num_themes == 1) || ((!IS_ADMIN()) && ($num_themes == 0))) {
        // If there's only one just print it's name
        define('__THEME_NAME', getCurrentThemeName());
-       $OUT = LOAD_TEMPLATE("theme_one", true);
+       $OUT = LOAD_TEMPLATE('theme_one', true);
 } elseif (IS_ADMIN()) {
        // If there is no theme installed and there's an admin notify him!
        $OUT = LOAD_TEMPLATE('admin_settings_saved', true, "<div class=\"admin_note\">{--ADMIN_NO_THEME_INSTALLED_WARNING--}</div>");
@@ -72,7 +72,7 @@ if ($num_themes > 1) {
 SQL_FREERESULT($result_themes);
 
 // Load final box template
-LOAD_TEMPLATE("theme_select_box", false, $OUT);
+LOAD_TEMPLATE('theme_select_box', false, $OUT);
 
 //
 ?>
index d42bcc63db35541c38d0d076e6446cfb79f4e4f7..4f88a06f9e8cf12615970ee256d8109b0a77a95f 100644 (file)
@@ -46,9 +46,9 @@ if (!defined('__SECURITY')) {
        // No sponsor!
        addFatalMessage(__FILE__, __LINE__, getMessage('SPONSOR_ONLY_AREA_ENTERED'));
        return;
-} elseif (empty($GLOBALS['what'])) {
+} elseif (!isWhatSet()) {
        // Empty what value detected!
-       $GLOBALS['what'] = "welcome";
+       setWhat('welcome');
 }
 
 // A valid sponsor login and we are allowed to enter this module so let's
@@ -56,22 +56,22 @@ if (!defined('__SECURITY')) {
 UPDATE_SPONSOR_LOGIN();
 
 // Generate menu
-define('__SPONSOR_MENU', GENERATE_SPONSOR_MENU($GLOBALS['what']));
+define('__SPONSOR_MENU', GENERATE_SPONSOR_MENU(getWhat()));
 
 // Generate right-side output
-define('__SPONSOR_CONTENT', GENERATE_SPONSOR_CONTENT($GLOBALS['what']));
+define('__SPONSOR_CONTENT', GENERATE_SPONSOR_CONTENT(getWhat()));
 
 // Load header template
-define('__SPONSOR_HEADER', LOAD_TEMPLATE("sponsor_header", true));
+define('__SPONSOR_HEADER', LOAD_TEMPLATE('sponsor_header', true));
 
 // Load footer template
-define('__SPONSOR_FOOTER', LOAD_TEMPLATE("sponsor_footer", true));
+define('__SPONSOR_FOOTER', LOAD_TEMPLATE('sponsor_footer', true));
 
-// "You are here" navigation
-define('__SPONSOR_YOURE_HERE', ADD_DESCR('sponsor', $GLOBALS['what'], false, false));
+// 'You are here' navigation
+define('__SPONSOR_YOURE_HERE', ADD_DESCR('sponsor', getWhat(), false, false));
 
 // Load main sponsor template
-LOAD_TEMPLATE("sponsor_main");
+LOAD_TEMPLATE('sponsor_main');
 
 //
 ?>
index 8c1981f1269fcb18969d0eaed14923cbe46b8e48..4b38382eec3cb7bb5eab32404871c27655fcec02 100644 (file)
@@ -46,7 +46,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($CSS == 1) || (isResetModeEnabled())) return;
+if ((getOutputMode() == 1) || (isResetModeEnabled())) return;
 
 //
 ?>
index 0b431b74287febad71201c5364d5d329f5791b48..d56d0108ba618c118695f4a0b9e840da0de05016 100644 (file)
@@ -45,14 +45,14 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled()) || (getConfig('beg_rallye') != 'Y')) return;
+if ((getOutputMode() == 1) || (!isResetModeEnabled()) || (getConfig('beg_rallye') != 'Y')) return;
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Get current month (2 digits)
 $curr = date('m', time());
 
 // Check if month is done
-if (($curr != getConfig('last_month')) && (getConfig('last_month') > 0) && (getConfig('beg_ranks') > 0) && ($GLOBALS['output_mode'] != 1)) {
+if (($curr != getConfig('last_month')) && (getConfig('last_month') > 0) && (getConfig('beg_ranks') > 0) && (getOutputMode() != 1)) {
        // Extension 'autopurge' is inactive or purging of inactive accounts is deactivated
        $whereStatement1 = '';
        $whereStatement2 = getConfig(('beg_ranks'));
index 1d6026ebb48cdc0622c03c5bb0984a10f859ea71..026bbd20a22cfb7e52e958403944f8c3102568ef 100644 (file)
@@ -45,13 +45,13 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return;
+if ((getOutputMode() == 1) || (!isResetModeEnabled())) return;
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Get current month (2 digits)
 $curr = date('m', time());
 
-if (($curr != getConfig('last_month')) && (getConfig('bonus_ranks') > 0) && ($GLOBALS['output_mode'] != 1)) {
+if (($curr != getConfig('last_month')) && (getConfig('bonus_ranks') > 0) && (getOutputMode() != 1)) {
        // Extension 'autopurge' is inactive or purging of inactive accounts is deactivated
        $whereStatement1 = "WHERE `status`='CONFIRMED'";
        $whereStatement2 = getConfig(('bonus_ranks'));
index 716079e381107931c884bd92bf828d4e81ff2e27..6f734eb2d9412e09c1e3ea1d5773975a4c7deacb 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return;
+if ((getOutputMode() == 1) || (!isResetModeEnabled())) return;
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Get current month (2 digits)
index 353bf62d3ede8b957c1f76727ec5bf3a58cbec45..842c23bd9540c61c026e953dc20eb5d98ce11eb2 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return;
+if ((getOutputMode() == 1) || (!isResetModeEnabled())) return;
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Reset surfbar counter
index 5ad12fcb5d8f163413c9f72ee902cc89cf5fe141..91dc03e9e2bd6163f8f5c75467f20daae2b39560 100644 (file)
@@ -78,8 +78,8 @@ if ((!isInstalling()) && (isInstalled())) {
        loadIncludeOnce('inc/load_config.php');
 
        // Check for write-permission for config.php and inc directory
-       if (empty($GLOBALS['module'])) $GLOBALS['module'] = REQUEST_GET('module');
-       if (empty($GLOBALS['module'])) $GLOBALS['module'] = 'index';
+       if (!isModuleSet()) setModule(REQUEST_GET('module'));
+       if (!isModuleSet()) setModule('index');
 
        // CSS array
        EXT_INIT_CSS_FILES();
@@ -125,41 +125,41 @@ if ((!isInstalling()) && (isInstalled())) {
                                //* DEBUG: */ die();
 
                                // Get all values
-                               if (($GLOBALS['output_mode'] != 1) && ($GLOBALS['output_mode'] != -1)) {
-                                       if (empty($GLOBALS['module']))  $GLOBALS['module'] = 'empty';
-                                       if (empty($GLOBALS['what']))    $GLOBALS['what']   = getWhatFromModule($GLOBALS['module']);
-                                       if (empty($GLOBALS['action']))  $GLOBALS['action'] = getModeAction($GLOBALS['module'], $GLOBALS['what']);
+                               if ((getOutputMode() != 1) && (getOutputMode() != -1)) {
+                                       if (!isModuleSet())  setModule('empty');
+                                       if (!isWhatSet())    setWhat(getWhatFromModule(getModule()));
+                                       if (!isActionSet())  setAction(getModeAction(getModule(), getWhat()));
                                } else {
                                        // Set action/what to empty
-                                       $GLOBALS['action'] = '';
-                                       $GLOBALS['what']   = '';
+                                       setAction('');
+                                       setWhat('');
                                }
 
                                // Run the init filter chain
                                runFilterChain('init');
 
                                // Set default 'what' value
-                               //* DEBUG: */ OUTPUT_HTML('-'.$GLOBALS['module'].'/'.$GLOBALS['what']."-<br />");
-                               if ((empty($GLOBALS['what'])) && (empty($GLOBALS['action'])) && ($GLOBALS['output_mode'] != 1) && ($GLOBALS['output_mode'] != -1)) {
-                                       if ($GLOBALS['module'] == 'admin') {
+                               //* DEBUG: */ OUTPUT_HTML('-'.getModule().'/'.getWhat()."-<br />");
+                               if ((!isWhatSet()) && (!isActionSet()) && (getOutputMode() != 1) && (getOutputMode() != -1)) {
+                                       if (getModule() == 'admin') {
                                                // Set 'action' value to 'login' in admin menu
-                                               $GLOBALS['action'] = getModeAction($GLOBALS['module'], $GLOBALS['what']);
-                                       } elseif (($GLOBALS['module'] == 'index') || ($GLOBALS['module'] == 'login')) {
+                                               setAction(getModeAction(getModule(), getWhat()));
+                                       } elseif ((getModule() == 'index') || (getModule() == 'login')) {
                                                // Set 'what' value to 'welcome' in guest and member menu
-                                               $GLOBALS['what'] = 'welcome';
-                                               if (getConfig('index_home') != '') $GLOBALS['what'] = getConfig('index_home');
+                                               setWhat('welcome');
+                                               if (getConfig('index_home') != '') setWhatFromConfig('index_home');
                                        } else {
                                                // Anything else like begging link
-                                               $GLOBALS['what'] = '';
+                                               setWhat('');
                                        }
                                } // END - if
 
                                // Update sending pool
-                               if (($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1')) loadIncludeOnce('inc/pool-update.php'); // Sends out mails in configureable steps
+                               if ((getOutputMode() != '1') && (getOutputMode() != '-1')) loadIncludeOnce('inc/pool-update.php'); // Sends out mails in configureable steps
 
                                // Load all active extension including language files when not upgrading.
                                // Check module for testing and count one click
-                               if (checkModulePermissions($GLOBALS['module']) == 'done') countModuleHit($GLOBALS['module']);
+                               if (checkModulePermissions(getModule()) == 'done') countModuleHit(getModule());
 
                                // Shall we activate the exchange?
                                if (getConfig('activate_xchange') > 0) activateExchange();
@@ -193,13 +193,13 @@ if ((!isInstalling()) && (isInstalled())) {
        setConfigEntry('OUTPUT_MODE', 'direct');
 
        // This hack prevents a backtrace in CSS output
-       if ($GLOBALS['output_mode'] == '1') {
+       if (getOutputMode() == '1') {
                // Problem with config so set output mode
                setConfigEntry('OUTPUT_MODE', 'render');
        } // END - if
 
        // Set other missing variables
-       if (!isset($GLOBALS['output_mode'])) $GLOBALS['output_mode'] = '0';
+       if (!isOutputModeSet()) setOutputMode('0');
 
        // Include databases.php
        loadIncludeOnce('inc/databases.php');
@@ -211,7 +211,7 @@ if ((!isInstalling()) && (isInstalled())) {
        loadIncludeOnce('inc/versions.php');
 
        // Check if we are in installation routine
-       if ((!isInstalling()) && ($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != -1)) {
+       if ((!isInstalling()) && (getOutputMode() != '1') && (getOutputMode() != -1)) {
                // Redirect to the installation system
                redirectToUrl('install.php');
        } // END - if
@@ -246,7 +246,7 @@ loadIncludeOnce('inc/session.php');
 // Load versions
 loadIncludeOnce('inc/versions.php');
 
-if ((getTotalFatalErrors() > 0) && (isInstalled()) && (!isInstalling()) && ($GLOBALS['output_mode'] != '1')) {
+if ((getTotalFatalErrors() > 0) && (isInstalled()) && (!isInstalling()) && (getOutputMode() != '1')) {
        // One or more fatal error(s) occur during connect...
        loadIncludeOnce('inc/header.php');
        loadIncludeOnce('inc/fatal_errors.php');
index 84c5fd08fc1c74fe8b5656de27f63356d148cace..4fda5f3680729d6841a1bc0afc900f38a79c3951 100644 (file)
@@ -87,12 +87,12 @@ function getModuleTitle ($mod) {
 function getModuleDescription ($mode, $wht, $column = 'what') {
        // Fix empty 'what'
        if (empty($wht)) {
-               $wht = "welcome";
+               $wht = 'welcome';
                if (getConfig('index_home') != '') $wht = getConfig('index_home');
        } // END - if
 
        // Default is not found
-       $ret = "??? (".$wht.')';
+       $ret = '??? (' . $wht . ')';
 
        // Look for title
        $result = SQL_QUERY_ESC("SELECT title FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE %s='%s' LIMIT 1",
@@ -278,7 +278,7 @@ function ADD_DESCR ($ACC_LVL, $FQFN, $return = false, $output = true) {
                        case 'sponsor':
                        case 'guest':
                        case 'member':
-                               $modCheck = $GLOBALS['module'];
+                               $modCheck = getModule();
                                break;
                }
                $AND = " AND (`what`='' OR `what` IS NULL)";
@@ -294,7 +294,7 @@ function ADD_DESCR ($ACC_LVL, $FQFN, $return = false, $output = true) {
 
                        case 'guest':
                        case 'member':
-                               $modCheck = $GLOBALS['module'];
+                               $modCheck = getModule();
                                if (!IS_ADMIN()) {
                                        $AND = " AND `visible`='Y' AND `locked`='N'";
                                }
@@ -306,20 +306,20 @@ function ADD_DESCR ($ACC_LVL, $FQFN, $return = false, $output = true) {
                // Sponsor / engine menu
                $type     = 'what';
                $search   = $file;
-               $modCheck = $GLOBALS['module'];
+               $modCheck = getModule();
                $AND      = '';
        } else {
                // Other
                $type     = "menu";
                $search   = $file;
-               $modCheck = $GLOBALS['module'];
+               $modCheck = getModule();
                $AND      = '';
        }
 
        // Begin the navigation line
        if ((!isset($GLOBALS['nav_depth'])) && (!$return)) {
                $GLOBALS['nav_depth'] = 0;
-               $prefix = "<div class=\"you_are_here\">{--YOU_ARE_HERE--}&nbsp;<strong><a class=\"you_are_here\" href=\"{!URL!}/modules.php?module=".$GLOBALS['module'].$LINK_ADD."\">Home</a></strong>";
+               $prefix = "<div class=\"you_are_here\">{--YOU_ARE_HERE--}&nbsp;<strong><a class=\"you_are_here\" href=\"{!URL!}/modules.php?module=".getModule().$LINK_ADD."\">Home</a></strong>";
        } else {
                if (!$return) $GLOBALS['nav_depth']++;
                $prefix = '';
@@ -351,8 +351,8 @@ function ADD_DESCR ($ACC_LVL, $FQFN, $return = false, $output = true) {
                        $OUT = $prefix."<strong><a class=\"you_are_here\" href=\"{!URL!}/modules.php?module=".$modCheck.'&amp;'.$type.'='.$search.$LINK_ADD."\">".$ret."</a></strong>\n";
 
                        // Can we close the you-are-here navigation?
-                       //* DEBUG: */ echo __LINE__."*".$type.'/'.$GLOBALS['what']."*<br />\n";
-                       if (($type == 'what') || (($type == 'action') && ((!isset($GLOBALS['what'])) || ($GLOBALS['what'] == "overview")))) {
+                       //* DEBUG: */ echo __LINE__."*".$type.'/'.getWhat()."*<br />\n";
+                       if (($type == 'what') || (($type == 'action') && ((!isWhatSet()) || (getWhat() == 'overview')))) {
                                //* DEBUG: */ echo __LINE__.'+'.$type."+<br />\n";
                                // Add closing div and br-tag
                                $OUT .= "</div><br />\n";
@@ -399,12 +399,12 @@ function ADD_MENU ($mode, $act, $wht) {
        // Load SQL data and add the menu to the output stream...
        $result_main = SQL_QUERY_ESC("SELECT title, action FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE (`what`='' OR `what` IS NULL)".$AND." ORDER BY `sort`",
        array($mode), __FUNCTION__, __LINE__);
-       //* DEBUG: */ echo __LINE__.'/'.$main_cnt.'/'.$main_action.'/'.$sub_what.':'.$GLOBALS['what']."*<br />\n";
+       //* DEBUG: */ echo __LINE__.'/'.$main_cnt.'/'.$main_action.'/'.$sub_what.':'.getWhat()."*<br />\n";
        if (SQL_NUMROWS($result_main) > 0) {
                OUTPUT_HTML("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"".$mode."_menu\">");
                // There are menus available, so we simply display them... :)
                while ($content = SQL_FETCHARRAY($result_main)) {
-                       //* DEBUG: */ echo __LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.$sub_what.':'.$GLOBALS['what']."*<br />\n";
+                       //* DEBUG: */ echo __LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.$sub_what.':'.getWhat()."*<br />\n";
                        // Init variables
                        $GLOBALS['block_mode'] = false;
                        $act = $content['action'];
@@ -441,7 +441,7 @@ function ADD_MENU ($mode, $act, $wht) {
                                                }
 
                                                // Navigation link
-                                               $OUT .= "<a name=\"menu\" class=\"menu_blur\" href=\"{!URL!}/modules.php?module=".$GLOBALS['module']."&amp;what=".$content['sub_what']."\" target=\"_self\">";
+                                               $OUT .= "<a name=\"menu\" class=\"menu_blur\" href=\"{!URL!}/modules.php?module=".getModule()."&amp;what=".$content['sub_what']."\" target=\"_self\">";
                                        } else {
                                                $OUT .= "<em>";
                                        }
@@ -484,16 +484,16 @@ function ADD_MENU ($mode, $act, $wht) {
                                        if ((!EXT_IS_ACTIVE($content['action'])) || ($content['action'] == 'online')) OUTPUT_HTML("<tr>
 
   <td class=\"".$mode."_menu_whats\">");
-                                       //* DEBUG: */ echo __LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.$content['sub_what'].':'.$GLOBALS['what']."*<br />\n";
+                                       //* DEBUG: */ echo __LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.$content['sub_what'].':'.getWhat()."*<br />\n";
                                        loadInclude($INC_BLOCK);
-                                       //* DEBUG: */ echo __LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.$content['sub_what'].':'.$GLOBALS['what']."*<br />\n";
+                                       //* DEBUG: */ echo __LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.$content['sub_what'].':'.getWhat()."*<br />\n";
                                        if ((!EXT_IS_ACTIVE($content['action'])) || ($content['action'] == 'online')) OUTPUT_HTML("  </td>
 </tr>");
                                }
-                               //* DEBUG: */ echo __LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.$content['sub_what'].':'.$GLOBALS['what']."*<br />\n";
+                               //* DEBUG: */ echo __LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.$content['sub_what'].':'.getWhat()."*<br />\n";
                        }
                        $main_cnt++;
-                       //* DEBUG: */ echo __LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.$content['sub_what'].':'.$GLOBALS['what']."*<br />\n";
+                       //* DEBUG: */ echo __LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.$content['sub_what'].':'.getWhat()."*<br />\n";
                        if (SQL_NUMROWS($result_main) > $main_cnt) {
                                OUTPUT_HTML("<tr><td class=\"".$mode."_menu_seperator\"></td></tr>");
                        } // END - if
@@ -503,7 +503,7 @@ function ADD_MENU ($mode, $act, $wht) {
                SQL_FREERESULT($result_main);
 
                // Close table
-               //* DEBUG: */ echo __LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.$content['sub_what'].':'.$GLOBALS['what']."*<br />\n";
+               //* DEBUG: */ echo __LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.$content['sub_what'].':'.getWhat()."*<br />\n";
                OUTPUT_HTML("</table>");
        }
 }
@@ -731,7 +731,7 @@ function isMenuActionValid ($mode, $act, $wht, $UPDATE=false) {
                // Update guest or member menu
                $sql = SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_%s_menu` SET counter=counter+1 WHERE `action`='%s' AND `what`='%s'".$add." LIMIT 1",
                array($mode, $act, $wht), __FUNCTION__, __LINE__, false);
-       } elseif (($wht != "overview") && (!empty($wht))) {
+       } elseif (($wht != 'overview') && (!empty($wht))) {
                // Other actions
                $sql = SQL_QUERY_ESC("SELECT id, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND `what`='%s'".$add." ORDER BY action DESC LIMIT 1",
                array($mode, $act, $wht), __FUNCTION__, __LINE__, false);
@@ -898,13 +898,13 @@ function countModuleHit($mod) {
 }
 
 // Get action value from mode (admin/guest/member) and what-value
-function getModeAction ($mode, &$wht) {
+function getModeAction ($mode, $wht) {
        // Init status
        $ret = '';
 
-       //* DEBUG: */ echo __LINE__.'='.$mode.'/'.$wht.'/'.$GLOBALS['action']."=<br />";
+       //* DEBUG: */ echo __LINE__.'='.$mode.'/'.$wht.'/'.getAction()."=<br />";
        if ((empty($wht)) && ($mode != 'admin')) {
-               $wht = "welcome";
+               $wht = 'welcome';
                if (getConfig('index_home') != '') $wht = getConfig('index_home');
        } // END - if
 
@@ -913,16 +913,16 @@ function getModeAction ($mode, &$wht) {
                if (REQUEST_ISSET_GET('action')) {
                        // Use from request!
                        return REQUEST_GET('action');
-               } elseif (!empty($GLOBALS['action'])) {
+               } elseif (isActionSet()) {
                        // Get it directly from URL
-                       return $GLOBALS['action'];
-               } elseif (($wht == "overview") || (empty($GLOBALS['what']))) {
+                       return getAction();
+               } elseif (($wht == 'overview') || (!isWhatSet())) {
                        // Default value for admin area
-                       $ret = "login";
+                       $ret = 'login';
                }
-       } elseif (!empty($GLOBALS['action'])) {
+       } elseif (isActionSet()) {
                // Get it directly from URL
-               return $GLOBALS['action'];
+               return getAction();
        }
        //* DEBUG: */ echo __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): ret=".$ret."<br />\n";
 
@@ -931,11 +931,11 @@ function getModeAction ($mode, &$wht) {
                // Rewriting modules to menu
                switch ($mode) {
                        case 'index': $mode = 'guest';  break;
-                       case "login": $mode = 'member'; break;
+                       case 'login': $mode = 'member'; break;
                } // END - switch
 
-               // Guest and member menu is "main" as the default
-               if (empty($ret)) $ret = "main";
+               // Guest and member menu is 'main' as the default
+               if (empty($ret)) $ret = 'main';
 
                // Load from database
                $result = SQL_QUERY_ESC("SELECT action FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `what`='%s' LIMIT 1",
@@ -1762,7 +1762,7 @@ function SUB_POINTS ($subject, $uid, $points) {
 // Update config entries
 function updateConfiguration ($entries, $values, $updateMode='') {
        // Do not update config in CSS mode
-       if (($GLOBALS['output_mode'] == '1') || ($GLOBALS['output_mode'] == -1)) {
+       if ((getOutputMode() == '1') || (getOutputMode() == -1)) {
                return;
        } // END - if
 
index b1b4384da106ab9d16c08426b196be767b3287a9..b3a9eaad84154621b6eafaea1febaf5eb411af45 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($CSS == 1) || (!isResetModeEnabled())) return;
+if ((getOutputMode() == 1) || (!isResetModeEnabled())) return;
 
 //
 ?>
index 58460c22c9e70e553e7019b2113a5cd45bddf1d7..bd04234ba5a79293ae197c4f38fbf33c03fba327 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled()) || (getConfig('beg_rallye') == 'Y')) return;
+if ((getOutputMode() == 1) || (!isResetModeEnabled()) || (getConfig('beg_rallye') == 'Y')) return;
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Reset accounts
index 449a2c1f094f163213b0cfe23be812cddd9ed5cc..03fabd84c89e52eca0433c6d216b7c079fb85308 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return;
+if ((getOutputMode() == 1) || (!isResetModeEnabled())) return;
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Purge expired entries in _bonus_turbo
index 9eabcfd2dfdc02a9ec40040de8efda9893db0426..87a9a10a63016917005d92ea1d0a65e8e9e59f2d 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return;
+if ((getOutputMode() == 1) || (!isResetModeEnabled())) return;
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Update user profiles
index ff7988b91eb84931f3f384fd0242b5e7ec8ee774..0b815c9b2044d038b61631c9cf8ef8a754849481 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return;
+if ((getOutputMode() == 1) || (!isResetModeEnabled())) return;
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 //
index c68de78391ea255a2ff13b5ba0befe0aede69141..b1fbc5d8270e47985d50d4be0da900843d5e63aa 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($GLOBALS['output_mode'] == 1) || ((!isResetModeEnabled()) && (getConfig('holiday_mode') == "RESET"))) return;
+if ((getOutputMode() == 1) || ((!isResetModeEnabled()) && (getConfig('holiday_mode') == "RESET"))) return;
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Check for holidays we need to enable and send email to user
index ae7c8df0a07c7f68b0b93f4bf865084d4d1a2582..fd5b6527abe4f7c78e794e9a4bb5fc49c54c4c49 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return;
+if ((getOutputMode() == 1) || (!isResetModeEnabled())) return;
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Reset surfbar counter
index 9dcaf9989bc43ac24245c70be7581b682bb694f7..93810c744850357e09c127a11f904511fbeda4b1 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return;
+if ((getOutputMode() == 1) || (!isResetModeEnabled())) return;
 
 // Simply reset the requests here
 updateConfiguration('yoomedia_requests_remain', getConfig('yoomedia_requests_total'));
index a2d1e8c22bc8b2f623b35ee4b26cd1f485c47c2d..495c36625f5aebd49d607012538dc3847f472a5a 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 // Unset/set session variables
 function setSession ($var, $value) {
        // Abort in CSS mode here
-       if ($GLOBALS['output_mode'] == 1) return true;
+       if (getOutputMode() == 1) return true;
 
        // Trim value and session variable
        $var = trim(SQL_ESCAPE($var)); $value = trim($value);
index 3748c130d14b6ebc7bb08875c69b5070933029a7..0e2045ae026938a12e0498acee01af40b7e8632b 100644 (file)
@@ -54,7 +54,7 @@ if ((isInstalling()) || (!isInstalled())) $STYLES[] = 'install.css';
 if (!isConfigEntrySet('css_php')) setConfigEntry('css_php', 'FILE');
 
 // Output CSS files or content or link to css.php ?
-if (($GLOBALS['output_mode'] == '1') || (getConfig('css_php') == 'DIRECT')) {
+if ((getOutputMode() == '1') || (getConfig('css_php') == 'DIRECT')) {
        // Load CSS files
        $STYLES = merge_array($STYLES, EXT_GET_CSS_FILES());
 
index 708d5075674d339a7b61bcab76b6b050cf801620..4b64b8208e2efb94e78a111f170a2643ac0913f1 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($CSS == 1) || (!isResetModeEnabled())) return;
+if ((getOutputMode() == 1) || (!isResetModeEnabled())) return;
 
 //
 ?>
index 78770742b250bbcb23c3d8ae12c1e56ba13f9a09..7527451607c17e68993f0aa7fc0d4cdee1bca312 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return;
+if ((getOutputMode() == 1) || (!isResetModeEnabled())) return;
 //* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Reset the surfbar counter
index bbe9c0c87932b3b860a92bd60da0199b6946970c..7cc9c9ec6b37bde0e5951792cd4354b8917d15e7 100644 (file)
@@ -444,5 +444,154 @@ function isNicknameUsed ($userid) {
        return $isUsed;
 }
 
+// Getter for 'what' value
+function getWhat () {
+       // Default is null
+       $what = null;
+
+       // Is the value set?
+       if (isWhatSet(true)) {
+               // Then use it
+               $what = $GLOBALS['what'];
+       } // END - if
+
+       // Return it
+       return $what;
+}
+
+// Setter for 'what' value
+function setWhat ($newWhat) {
+       $GLOBALS['what'] = SQL_ESCAPE($newWhat);
+}
+
+// Setter for 'what' from configuration
+function setWhatFromConfig ($configEntry) {
+       // Get 'what' from config
+       $what = getConfig($configEntry);
+
+       // Set it
+       setWhat($what);
+}
+
+// Checks wether what is set and optionally aborts on miss
+function isWhatSet ($abortOnMiss =  false) {
+       // Check for it
+       $isset = (!empty($GLOBALS['what']));
+
+       // Should we abort here?
+       if (($abortOnMiss === true) && ($isset === false)) {
+               // Output backtrace
+               debug_report_bug('what is empty.');
+       } // END - if
+
+       // Return it
+       return $isset;
+}
+
+// Getter for 'action' value
+function getAction () {
+       // Default is null
+       $action = null;
+
+       // Is the value set?
+       if (isActionSet(true)) {
+               // Then use it
+               $action = $GLOBALS['action'];
+       } // END - if
+
+       // Return it
+       return $action;
+}
+
+// Setter for 'action' value
+function setAction ($newAction) {
+       $GLOBALS['action'] = SQL_ESCAPE($newAction);
+}
+
+// Checks wether action is set and optionally aborts on miss
+function isActionSet ($abortOnMiss =  false) {
+       // Check for it
+       $isset = (!empty($GLOBALS['action']));
+
+       // Should we abort here?
+       if (($abortOnMiss === true) && ($isset === false)) {
+               // Output backtrace
+               debug_report_bug('action is empty.');
+       } // END - if
+
+       // Return it
+       return $isset;
+}
+
+// Getter for 'module' value
+function getModule () {
+       // Default is null
+       $module = null;
+
+       // Is the value set?
+       if (isModuleSet(true)) {
+               // Then use it
+               $module = $GLOBALS['module'];
+       } // END - if
+
+       // Return it
+       return $module;
+}
+
+// Setter for 'module' value
+function setModule ($newModule) {
+       $GLOBALS['module'] = SQL_ESCAPE($newModule);
+}
+
+// Checks wether module is set and optionally aborts on miss
+function isModuleSet ($abortOnMiss =  false) {
+       // Check for it
+       $isset = (!empty($GLOBALS['module']));
+
+       // Should we abort here?
+       if (($abortOnMiss === true) && ($isset === false)) {
+               // Output backtrace
+               debug_report_bug('module is empty.');
+       } // END - if
+
+       // Return it
+       return $isset;
+}
+
+// Getter for 'output_mode' value
+function getOutputMode () {
+       // Default is null
+       $output_mode = null;
+
+       // Is the value set?
+       if (isOutputModeSet(true)) {
+               // Then use it
+               $output_mode = $GLOBALS['output_mode'];
+       } // END - if
+
+       // Return it
+       return $output_mode;
+}
+
+// Setter for 'output_mode' value
+function setOutputMode ($newOutputMode) {
+       $GLOBALS['output_mode'] = SQL_ESCAPE($newOutputMode);
+}
+
+// Checks wether output_mode is set and optionally aborts on miss
+function isOutputModeSet ($abortOnMiss =  false) {
+       // Check for it
+       $isset = (isset($GLOBALS['output_mode']));
+
+       // Should we abort here?
+       if (($abortOnMiss === true) && ($isset === false)) {
+               // Output backtrace
+               debug_report_bug('output_mode is empty.');
+       } // END - if
+
+       // Return it
+       return $isset;
+}
+
 // [EOF]
 ?>