]> git.mxchange.org Git - mailer.git/commitdiff
All, except security block, include()/require() rewritten to own LOAD_INC()/LOAD_INC_...
authorRoland Häder <roland@mxchange.org>
Thu, 19 Feb 2009 23:48:16 +0000 (23:48 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 19 Feb 2009 23:48:16 +0000 (23:48 +0000)
124 files changed:
.gitattributes
admin.php
agb.php
beg.php
birthday_confirm.php
click.php
confirm.php
css.php
debug.php
doubler.php
img.php
inc/config.php
inc/db/lib.php
inc/extensions.php
inc/extensions/ext-autopurge.php
inc/extensions/ext-beg.php
inc/extensions/ext-birthday.php
inc/extensions/ext-bonus.php
inc/extensions/ext-cache.php
inc/extensions/ext-doubler.php
inc/extensions/ext-mediadata.php
inc/extensions/ext-newsletter.php
inc/extensions/ext-profile.php
inc/extensions/ext-refback.php
inc/extensions/ext-sql_patches.php
inc/filters.php
inc/footer.php
inc/functions.php
inc/gen_mediadata.php
inc/gen_refback.php
inc/gen_sql_patches.php
inc/header.php
inc/install-inc.php
inc/language.php
inc/libs/cache_functions.php
inc/libs/rallye_functions.php
inc/libs/security_functions.php
inc/libs/sponsor_functions.php
inc/libs/theme_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-them.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-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/overview-inc.php
inc/modules/admin/what-config_secure.php
inc/modules/admin/what-edit_sponsor.php
inc/modules/admin/what-list_task.php
inc/modules/admin/what-lock_user.php
inc/modules/admin/what-logs.php
inc/modules/admin/what-overview.php
inc/modules/admin/what-theme_check.php
inc/modules/admin/what-theme_edit.php
inc/modules/admin/what-theme_import.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/what-login.php
inc/modules/guest/what-wernis_portal.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/what-reflinks.php
inc/modules/member/what-themes.php
inc/mysql-connect.php
inc/mysql-manager.php
inc/session.php
inc/stylesheet.php
index.php
install.php
js.php
lead-confirm.php
login.php
mailid.php
mailid_top.php
modules.php
ref.php
show_bonus.php
sponsor_confirm.php
sponsor_ref.php
surfbar.php
templates/de/html/install/install_fatal_errors.tpl [new file with mode: 0644]
view.php

index c4281ff5929fe3b7e79b65b82b728c1b595783c4..3056141d0c0a8ccbaa45a13ed908f93a3ad52717 100644 (file)
@@ -1326,6 +1326,7 @@ templates/de/html/index.tpl -text
 templates/de/html/index_forward.tpl -text
 templates/de/html/infos.tpl -text
 templates/de/html/install/.htaccess -text
+templates/de/html/install/install_fatal_errors.tpl -text
 templates/de/html/install/install_fatal_row.tpl -text
 templates/de/html/install/install_fatal_table.tpl -text
 templates/de/html/install/install_finished.tpl -text
index 3a173f4d9e9dfd8a87478e5c7339035144d21b8b..ef2153f0086467c10a2428ebfa66de16b14ed4d1 100644 (file)
--- a/admin.php
+++ b/admin.php
@@ -44,7 +44,7 @@ $GLOBALS['module'] = "admin";
 $CSS = -1;
 
 // Load the required file(s)
-require("inc/config.php");
+require_once("inc/config.php");
 
 // Is the script installed?
 if (isBooleanConstantAndTrue('mxchange_installed')) {
diff --git a/agb.php b/agb.php
index be4e7dca8cdeeb66d291b382f810a2d68c5356ad..9e82d2d8b65da0bc7a402b2fa1da67e5ec210309 100644 (file)
--- a/agb.php
+++ b/agb.php
@@ -42,7 +42,7 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = "";
 $GLOBALS['module'] = "agb"; $CSS = -1;
 
 // Load the required file(s)
-require("inc/config.php");
+require_once("inc/config.php");
 
 // Is the script installed?
 if (isBooleanConstantAndTrue('mxchange_installed')) {
diff --git a/beg.php b/beg.php
index 077e3cdcc55bc2d7d689fc2d0b5a87c137b071b0..e1e41d1e34cb93a2f866a05a7f87899b77e91c9e 100644 (file)
--- a/beg.php
+++ b/beg.php
@@ -46,7 +46,7 @@ $CSS = -1;
 $msg = null;
 
 // Load the required file(s)
-require("inc/config.php");
+require_once("inc/config.php");
 
 // Is the "beg" extension active?
 if (!EXT_IS_ACTIVE("beg")) {
@@ -186,7 +186,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
                        SQL_FREERESULT($result);
 
                        // Include header
-                       require_once(PATH."inc/header.php");
+                       LOAD_INC_ONCE("inc/header.php");
 
                        // Load final template
                        LOAD_TEMPLATE("beg_link");
@@ -205,7 +205,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
                        }
 
                        // Include footer
-                       require_once(PATH."inc/footer.php");
+                       LOAD_INC_ONCE("inc/footer.php");
                } elseif (($status != "CONFIRMED") && ($status != "failed")) {
                        // Maybe locked/unconfirmed account?
                        $msg = GEN_ERROR_CODE_FROM_ACCOUNT_STATUS($status);
index a40adc6cef05c95476e4d6a0ef3c026d2071390a..d33f8dc73b0bbdebfb092e905b679e370dffa4e5 100644 (file)
@@ -42,7 +42,7 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = "";
 $GLOBALS['module'] = "birthday_confirm"; $CSS = -1;
 
 // Load the required file(s)
-require("inc/config.php");
+require_once("inc/config.php");
 
 // Is the "birthday" extension active?
 if (!EXT_IS_ACTIVE("birthday")) {
@@ -116,7 +116,7 @@ WHERE b.userid=%s AND b.chk_value='%s' LIMIT 1",
        $GLOBALS['module'] = "birthday_confirm";
 
        // Include header
-       require(PATH."inc/header.php");
+       LOAD_INC("inc/header.php");
 
        // Load birthday header template (for your banners, e.g.?)
        define('__BIRTHDAY_HEADER', LOAD_TEMPLATE("birthday_header", true));
@@ -128,7 +128,7 @@ WHERE b.userid=%s AND b.chk_value='%s' LIMIT 1",
        LOAD_TEMPLATE("birthday_confirm");
 
        // Include footer
-       require(PATH."inc/footer.php");
+       LOAD_INC("inc/footer.php");
 } else {
        // You have to install first!
        LOAD_URL("install.php");
index ee59e6f82511faf8d6c7812e75b5da6827a77617..1f7398fba15b92a14e8c75f11fed0a5cefb599d0 100644 (file)
--- a/click.php
+++ b/click.php
@@ -42,7 +42,7 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = "";
 $GLOBALS['module'] = "click"; $CSS = -1;
 
 // Load the required file(s)
-require("inc/config.php");
+require_once("inc/config.php");
 
 if (((!empty($_GET['user'])) || (!empty($_GET['reseller']))) && (!empty($_GET['banner']))) {
        // Update clicks counter...
index 612d3480fd066daf3c14c5183cb42ef39bee4953..a86970d13f82799d535b75f573bbaf9028185890 100644 (file)
@@ -42,7 +42,7 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = "";
 $GLOBALS['module'] = "confirm"; $CSS = -1;
 
 // Load the required file(s)
-require("inc/config.php");
+require_once("inc/config.php");
 
 // Is the script installed?
 if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('admin_registered'))) {
diff --git a/css.php b/css.php
index 368716c995a2dd7eeb1ae4537c970c4c1704fede..1496f788b10b41e00fd157a750704000b80dd5f1 100644 (file)
--- a/css.php
+++ b/css.php
@@ -55,16 +55,16 @@ $GLOBALS['module'] = "css";
 header("Content-type: text/css");
 
 // Load the required file(s)
-require("inc/config.php");
+require_once("inc/config.php");
 
 // Load header
-require_once(PATH."inc/header.php");
+LOAD_INC_ONCE("inc/header.php");
 
 // Load CSS code
-require_once(PATH."inc/stylesheet.php");
+LOAD_INC_ONCE("inc/stylesheet.php");
 
 // Load footer
-require_once(PATH."inc/footer.php");
+LOAD_INC_ONCE("inc/footer.php");
 
 //
 ?>
index 025ec75cfdec9369ec9576a890057c38bd71a26f..f08058f0d9b0508380728717029c910b23bf15c5 100644 (file)
--- a/debug.php
+++ b/debug.php
@@ -43,7 +43,7 @@ $GLOBALS['action'] = "";
 $GLOBALS['module'] = "debug"; $CSS = -1;
 
 // Load the required file(s)
-require("inc/config.php");
+require_once("inc/config.php");
 
 // Redirect only to registration page when this script is installed
 if ((isBooleanConstantAndTrue('mxchange_installed')) && (getTotalFatalErrors() == 0)) {
@@ -58,16 +58,15 @@ if ((isBooleanConstantAndTrue('mxchange_installed')) && (getTotalFatalErrors() =
                // Handle the request
                if (DEBUG_HANDLE_REQUEST($_POST['request'])) {
                        // Construct FQFN for the module
-                       $fqfn = sprintf("%sinc/debug/%s/request_%s",
-                               PATH,
+                       $INC = sprintf("inc/debug/%s/request_%s",
                                getConfig('debug_mode'),
                                SQL_ESCAPE($_POST['request'])
                        );
 
                        // Is the module there? Else we log it!
-                       if (FILE_READABLE($fqfn)) {
+                       if (FILE_READABLE($INC)) {
                                // Load the request module
-                               require($fqfn);
+                               LOAD_INC($INC);
                        } else {
                                // Missing request file, may happen while development
                                DEBUG_ABUSE_LOG(__FILE__, __LINE__, "request_404", $_POST['request']);
index 182b473cbb838430740923d87086f7b4f7491682..2b0d5c6dd7f262e0ca038f3cdc805fc155d9cc52 100644 (file)
@@ -46,7 +46,7 @@ $GLOBALS['refid'] = 0;
 $CSS = 0;
 
 // Load the required file(s)
-require("inc/config.php");
+require_once("inc/config.php");
 
 // Is the "doubler" extension active?
 if (!EXT_IS_ACTIVE("doubler")) {
@@ -208,10 +208,10 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
        if (!defined('__ERROR_MSG'))   define('__ERROR_MSG'  , "");
 
        // Shall I check for points immediately?
-       if (getConfig('doubler_send_mode') == "DIRECT") require(PATH."inc/doubler_send.php");
+       if (getConfig('doubler_send_mode') == "DIRECT") LOAD_INC("inc/doubler_send.php");
 
        // Output header
-       require(PATH."inc/header.php");
+       LOAD_INC("inc/header.php");
 
        // Banner in text
        define('__DOUBLER_BANNER', LOAD_TEMPLATE("doubler_banner", true));
@@ -272,7 +272,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
        LOAD_TEMPLATE("doubler_index");
 
        // Output footer
-       require(PATH."inc/footer.php");
+       LOAD_INC("inc/footer.php");
 } else {
        // You have to install first!
        LOAD_URL("install.php");
diff --git a/img.php b/img.php
index 15fb090ac9e17093263964bd3753af22ed47e5ee..b6e1636eeece57e07885b755f4b1c50f28cb727c 100644 (file)
--- a/img.php
+++ b/img.php
@@ -42,33 +42,32 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = "";
 $GLOBALS['module'] = "img"; $CSS = -1;
 
 // Load the required file(s)
-require("inc/config.php");
+require_once("inc/config.php");
 
 // Script installed?
 if (isBooleanConstantAndTrue('mxchange_installed')) {
        // Load header
-       require_once(PATH."inc/header.php");
+       LOAD_INC_ONCE("inc/header.php");
 
        // Code set?
        if (!empty($_GET['code'])) {
                // Generate image
                GENERATE_IMAGE(bigintval($_GET['code']));
        } elseif (!empty($_GET['tag'])) {
-               // Tag set so create FQFN
-               $fqfn = sprintf("%sinc/img/tag-%s.php",
-                       PATH,
+               // Tag set so create the IFN (Include-FileName)
+               $INC = sprintf("inc/img/tag-%s.php",
                        SQL_ESCAPE($_GET['tag'])
                );
 
                // Include is readable?
-               if (FILE_READABLE($fqfn)) {
+               if (FILE_READABLE($INC)) {
                        // Include it
-                       require($fqfn);
+                       LOAD_INC($INC);
                } // END - if
        }
 
        // Finish generation here
-       require_once(PATH."inc/footer.php");
+       LOAD_INC_ONCE("inc/footer.php");
 } else {
        // You have to install first!
        LOAD_URL("install.php");
index 536cae8378f270cbbf68cbc011ebff999c7ccba8..c645e2e263cf3a6d8935606b22bd1980f5097f87 100644 (file)
@@ -162,7 +162,7 @@ define('SSL_COOKIES', false);
 define('ENABLE_BACKLINK', true);
 
 // Connect to the MySQL database...
-require_once(PATH."inc/mysql-connect.php");
+LOAD_INC_ONCE("inc/mysql-connect.php");
 
 //
 ?>
index 083e5f240de0d6ae6009a044735348028f593267..645721deacf8e89ed840af587d29ee61939ca7e1 100644 (file)
@@ -38,21 +38,18 @@ if (!defined('__SECURITY')) {
 }
 
 // Select MySQL 3 as default database type
-if (_DB_TYPE == "_DB_TYPE") define('_DB_TYPE', "mysql3");
+if (!defined('_DB_TYPE')) define('_DB_TYPE', "mysql3");
 
 // Create include file name
-$FQFN = sprintf("%sinc/db/lib-%s.php", PATH, _DB_TYPE);
+$INC = sprintf("inc/db/lib-%s.php", constant('_DB_TYPE'));
 
-if (FILE_READABLE($FQFN)) {
+if (FILE_READABLE($INC)) {
        // Include abstraction layer
-       require_once($FQFN);
+       LOAD_INC_ONCE($INC);
 } else {
        // Bye, bye...
-       die("Cannot load database abstraction layer "._DB_TYPE." -&gt; R.I.P.");
+       die("Cannot load database abstraction layer ".constant('_DB_TYPE')." -&gt; R.I.P.");
 }
 
-// Remove this globally used variable
-unset($FQFN);
-
 //
 ?>
index 91646a16cc79a8a65afc9976cacc9e67042c16b5..c299557333522e4501d84249867f5bc6c7af3ff1 100644 (file)
@@ -55,7 +55,7 @@ function LOAD_EXTENSION ($ext_name, $EXT_LOAD_MODE = "", $EXT_VER = "", $dry_run
        } // END - if
 
        // Construct FQFN for extension file
-       $extInclude = sprintf("%sinc/extensions/ext-%s.php", PATH, $ext_name);
+       $extInclude = sprintf("inc/extensions/ext-%s.php", $ext_name);
 
        // Is the extension file NOT there?
        if (!FILE_READABLE($extInclude)) {
@@ -67,25 +67,25 @@ function LOAD_EXTENSION ($ext_name, $EXT_LOAD_MODE = "", $EXT_VER = "", $dry_run
        } // END - if
 
        // Construct FQFN for language file
-       $langInclude = sprintf("%sinc/language/%s_%s.php", PATH, $ext_name, GET_LANGUAGE());
+       $langInclude = sprintf("inc/language/%s_%s.php", $ext_name, GET_LANGUAGE());
 
        // Is this include there?
        if ((FILE_READABLE($langInclude)) && (!isset($EXT_LOADED['lang'][$ext_name]))) {
                // Then load it
                //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "--- Language loaded.");
                $EXT_LOADED['lang'][$ext_name] = true;
-               require($langInclude);
+               LOAD_INC_ONCE($langInclude);
        } // END - if
 
        // Construct FQFN for functions file
-       $funcsInclude = sprintf("%sinc/libs/%s_functions.php", PATH, $ext_name);
+       $funcsInclude = sprintf("inc/libs/%s_functions.php", $ext_name);
 
        // Is this include there?
        if ((FILE_READABLE($funcsInclude)) && (!isset($EXT_LOADED['funcs'][$ext_name]))) {
                // Then load it
                //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "--- Functions loaded.");
                $EXT_LOADED['funcs'][$ext_name] = true;
-               require($funcsInclude);
+               LOAD_INC_ONCE($funcsInclude);
        } // END - if
 
        // Extensions are not deprecated by default
@@ -102,7 +102,7 @@ function LOAD_EXTENSION ($ext_name, $EXT_LOAD_MODE = "", $EXT_VER = "", $dry_run
 
        // Include the extension file
        //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "Extension loaded.");
-       require($extInclude);
+       LOAD_INC($extInclude);
 
        // Is this extension deprecated?
        if ($EXT_DEPRECATED == "Y") {
@@ -667,7 +667,7 @@ function CREATE_NEW_EXTENSION_TASK ($admin_id, $subject, $ext) {
        if ((DETERMINE_TASK_ID_BY_SUBJECT($subject) == 0) && (GET_EXT_VERSION($ext) == "")) {
                // Template file
                $tpl = sprintf("%stemplates/%s/html/ext/ext_%s.tpl",
-                       PATH,
+                       constant('PATH'),
                        GET_LANGUAGE(),
                        $ext
                );
index ff66f2cb1f5059f6173072ad6cf7e52dd9061139..9c46b91e5a1bc0bc4042d96ba76a4f8f642fa0a4 100644 (file)
@@ -257,7 +257,7 @@ default: // Do stuff when extension is loaded
        if (isBooleanConstantAndTrue('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1))
        {
                // Yes, we have. So let's auto-purge some campaigns, inactive users and unconfirmed accounts
-               $INC_POOL[] = sprintf("%sinc/autopurge.php", PATH);
+               $INC_POOL[] = sprintf("%sinc/autopurge.php", constant('PATH'));
        }
        break;
 }
index 846ad3177f35cb08465625f50969f4da101bc3f7..8d392d64730e46c25f20d97fa1ea95ff368e4711 100644 (file)
@@ -271,7 +271,7 @@ default: // Do stuff when extension is loaded
        // Check for beg rallye is active and send mails out
        if ((getConfig('beg_rallye') == "Y") && (getConfig('beg_new_mem_notify') == "Y")) {
                // Include file for sending out mails
-               $INC_POOL[] = sprintf("%sinc/mails/beg_mails.php", PATH);
+               $INC_POOL[] = sprintf("%sinc/mails/beg_mails.php", constant('PATH'));
        } // END - if
        break;
 }
index 15664c8d132ce927f1a03f18e9adeed9cf804769..07cdfd488f8eff5ad8f8444195c8ee08be6c5bb8 100644 (file)
@@ -196,7 +196,7 @@ default: // Do stuff when extension is loaded
        if ((isBooleanConstantAndTrue('__DAILY_RESET')) && (getConfig('birthday_points') > 0)) {
                // Daily reset was run and we shall pay points so we start checking for members who
                // has a birthday for today
-               $INC_POOL[] = sprintf("%sinc/mails/birthday_mails.php", PATH);
+               $INC_POOL[] = sprintf("%sinc/mails/birthday_mails.php", constant('PATH'));
        }
        break;
 }
index 70e8151cd8751136fb9a3396412f3a1e87d73983..0bcddc787e04ff58d7ff334f8e91f535fe2ab86b 100644 (file)
@@ -550,18 +550,18 @@ default: // Do stuff when extension is loaded
                // Daily reset was run so let's check if active rallye is activated
                if (getConfig('bonus_active') == "Y") {
                        // Run active rallye
-                       if (getConfig('bonus_stats') > 0) $INC_POOL[] = sprintf("%sinc/stats_bonus.php", PATH);
-                       $INC_POOL[] = sprintf("%sinc/monthly/monthly_bonus.php", PATH);
+                       if (getConfig('bonus_stats') > 0) $INC_POOL[] = sprintf("%sinc/stats_bonus.php", constant('PATH'));
+                       $INC_POOL[] = sprintf("%sinc/monthly/monthly_bonus.php", constant('PATH'));
                } else {
                        // Reset points
-                       $INC_POOL[] = sprintf("%sinc/reset/reset_bonus.php", PATH);
+                       $INC_POOL[] = sprintf("%sinc/reset/reset_bonus.php", constant('PATH'));
                }
        }
 
        // Check for bonus rallye is active and send mails out
        if ((getConfig('bonus_active') == "Y") && (getConfig('bonus_new_mem_notify') == "Y")) {
                // Include file for sending out mails
-               $INC_POOL[] = sprintf("%sinc/mails/bonus_mails.php", PATH);
+               $INC_POOL[] = sprintf("%sinc/mails/bonus_mails.php", constant('PATH'));
        }
        break;
 }
index 5a0dc15e6d0fd2bfa1b96329a607096d06b1454c..3a7f56e5b1a18393c4b3c9f3929a47326053c349 100644 (file)
@@ -248,7 +248,7 @@ default: // Do stuff when extension is loaded
                global $cacheInstance;
 
                // Initialize cache system only when it's needed
-               $cacheInstance = new CacheSystem(getConfig('cache_update'), PATH."inc/".getConfig('cache_path'), getConfig('cache_tested'));
+               $cacheInstance = new CacheSystem(getConfig('cache_update'), constant('PATH')."inc/".getConfig('cache_path'), getConfig('cache_tested'));
                if ($cacheInstance->getStatus() != "done") {
                        // Failed to initialize cache sustem
                        addFatalMessage(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_CANNOT_INITIALIZE);
index 2a9dac417f79c421a992c6ae37a9deb5201304fb..e8c82f76156d5ff8955b47cb169584ab69ce011c 100644 (file)
@@ -240,7 +240,7 @@ case "test": // For testing purposes. For details see file inc/modules/admin/wha
 default: // Do stuff when extension is loaded
        if ((isBooleanConstantAndTrue('__DAILY_RESET')) && (getConfig('doubler_send_mode') == "RESET")) {
                // So let's check for points
-               $INC_POOL[] = sprintf("%sinc/doubler_send.php", PATH);
+               $INC_POOL[] = sprintf("%sinc/doubler_send.php", constant('PATH'));
        }
        break;
 }
index bc23dc9c41021db51a334dbad3411fddaa7bd384..23eb6ec06a0d80001ae88122b21916e17d96e69e 100644 (file)
@@ -145,7 +145,7 @@ default: // Do stuff when extension is loaded
 if ((isset($dry_run)) && (isset($EXT_LOAD_MODE))) {
        if ((!$dry_run) && ($EXT_LOAD_MODE == "update") && ($EXT_VER == "0.0.4")) {
                // Add auto-check file
-               $INC_POOL[] = sprintf("%sinc/gen_mediadata.php", PATH);
+               $INC_POOL[] = sprintf("%sinc/gen_mediadata.php", constant('PATH'));
        } // END - if
 } // END - if
 
index fd5f2f560efe3b4a854e2f54ff556fb9db39d480..5810b4e1f0f9ffcf738721e041602149a7803d2c 100644 (file)
@@ -170,7 +170,7 @@ default: // Do stuff when extension is loaded
 
        if (isBooleanConstantAndTrue('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1)) {
                // Daily reset was run so let's check out for expired newsletter orders
-               $INC_POOL[] = sprintf("%sinc/monthly/monthly_newsletter.php", PATH);
+               $INC_POOL[] = sprintf("%sinc/monthly/monthly_newsletter.php", constant('PATH'));
        }
        break;
 }
index e0f5c584129fe01432e049f6d3ccf41e6e6d1c03..ae60910112dc968bfd19d175678c30d4828993e4 100644 (file)
@@ -125,7 +125,7 @@ default: // Do stuff when extension is loaded
        // Do we have a daily-reset-run?
        if (isBooleanConstantAndTrue('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1)) {
                // So let's check for profiles which needs an update
-               $INC_POOL[] = sprintf("%sinc/profile-updte.php", PATH);
+               $INC_POOL[] = sprintf("%sinc/profile-updte.php", constant('PATH'));
        }
        break;
 }
index e1e165ce7d576f31e22401787d3190ebf25c7a57..8edb325efd47970cefd4815a503c112fdd8e493a 100644 (file)
@@ -111,7 +111,9 @@ default: // Do stuff when extension is loaded
 // Shall we include special files?
 if ($EXT_LOAD_MODE == "register") {
        // Execute this special file on this update
-       $INC_POOL[] = PATH."inc/gen_refback.php";
+       $INC_POOL[] = sprintf("%sinc/gen_refback.php",
+               constant('PATH')
+       );
 } // END - if
 
 // Keep this extension always active!
index 8da3cde53aa679453f82e5455cd28920c27341cf..2c3ef53d4f9f0bda50a308c44bdff3c6332b5a0f 100644 (file)
@@ -735,13 +735,13 @@ default: // Do stuff when extension is loaded
                        global $cacheInstance;
 
                        // Maybe need setup of secret key!
-                       require_once(PATH."inc/gen_sql_patches.php");
+                       LOAD_INC_ONCE("inc/gen_sql_patches.php");
 
                        // @TODO Rewrite this to a filter!
                        if ((GET_EXT_VERSION("cache") >= "0.1.2") && (isset($cacheInstance)) && (is_object($cacheInstance))) {
                                // Remove extensions and mod_reg cache file
-                               require_once(PATH."inc/libs/cache_functions.php");
-                               require_once(PATH."inc/extensions/ext-cache.php");
+                               LOAD_INC_ONCE("inc/libs/cache_functions.php");
+                               LOAD_INC_ONCE("inc/extensions/ext-cache.php");
                                if ($cacheInstance->loadCacheFile("extensions", true)) $cacheInstance->destroyCacheFile();
                                if ($cacheInstance->loadCacheFile("mod_reg"))          $cacheInstance->destroyCacheFile();
                        } // END - if
@@ -750,7 +750,7 @@ default: // Do stuff when extension is loaded
                // Test again
                if ((getConfig('file_hash') != "") && (getConfig('master_salt') != "") && (getConfig('pass_scramble') != "")) {
                        // File hash fas generated so we can also file the secret file... hopefully.
-                       $hashFile = sprintf("%sinc/.secret/.%s", PATH, getConfig('file_hash'));
+                       $hashFile = sprintf("%sinc/.secret/.%s", constant('PATH'), getConfig('file_hash'));
                        if (FILE_READABLE($hashFile)) {
                                // Read file
                                $_CONFIG['secret_key'] = READ_FILE($hashFile);
index 3ef321ce3234673aef4bbefeb043c8c86e51c0e2..846668aa081dc65bc0457b484ba7fe8132bd84c4 100644 (file)
@@ -407,7 +407,7 @@ function FILTER_LOAD_INCLUDES ($data) {
        if (count($INC_POOL) > 0) {
                // Loads every include file
                foreach ($INC_POOL as $FQFN) {
-                       require_once($FQFN);
+                       LOAD_INC_ONCE($FQFN);
                } // END - foreach
 
                // Reset array
index c32e5cdbde0ddffcf0f740394787a26d8744d89f..e2d31c6e6d9d3f2c32375c71ea804043cf53b0c1 100644 (file)
@@ -45,7 +45,7 @@ if (($footer != "1") && ($footer != "2") && ($CSS != "1")) {
        // Output the generated HTML code or do nothing in direct-mode
        if (getTotalFatalErrors() > 0) {
                // Output fatal error messages
-               require_once(PATH."inc/fatal_errors.php");
+               LOAD_INC_ONCE("inc/fatal_errors.php");
        } // END - if
 
        // Shall we display the copyright notice?
index e545aa0d6e731f2e2007ac7927149bf1059aad45..f071322d043c171fd85417d3dd4f23f0885ee8b3 100644 (file)
@@ -40,7 +40,7 @@ if (!defined('__SECURITY')) {
 // Check if our config file is writeable or not
 function IS_INC_WRITEABLE($inc) {
        // Generate FQFN
-       $fqfn = sprintf("%sinc/%s.php", PATH, $inc);
+       $fqfn = sprintf("%sinc/%s.php", constant('PATH'), $inc);
 
        // Abort by simple test
        if ((FILE_READABLE($fqfn)) && (!is_writeable($fqfn))) {
@@ -265,7 +265,7 @@ function LOAD_TEMPLATE ($template, $return=false, $content=array()) {
        $date_time = MAKE_DATETIME(time(), "1");
 
        // Base directory
-       $BASE = sprintf("%stemplates/%s/html/", PATH, GET_LANGUAGE());
+       $BASE = sprintf("%stemplates/%s/html/", constant('PATH'), GET_LANGUAGE());
        $MODE = "";
 
        // Check for admin/guest/member templates
@@ -476,12 +476,12 @@ function SEND_RAW_EMAIL ($to, $subject, $msg, $from) {
        // Shall we use PHPMailer class or legacy mode?
        if (CHECK_PHPMAILER_USAGE()) {
                // Use PHPMailer class with SMTP enabled
-               require_once(PATH."inc/phpmailer/class.phpmailer.php");
-               require_once(PATH."inc/phpmailer/class.smtp.php");
+               LOAD_INC_ONCE("inc/phpmailer/class.phpmailer.php");
+               LOAD_INC_ONCE("inc/phpmailer/class.smtp.php");
 
                // get new instance
                $mail = new PHPMailer();
-               $mail->PluginDir  = sprintf("%sinc/phpmailer/", PATH);
+               $mail->PluginDir  = sprintf("%sinc/phpmailer/", constant('PATH'));
 
                $mail->IsSMTP();
                $mail->SMTPAuth   = true;
@@ -701,7 +701,7 @@ function GET_LANGUAGE() {
        global $cacheArray;
 
        // Set default return value to default language from config
-       $ret = DEFAULT_LANG;
+       $ret = constant('DEFAULT_LANG');
 
        // Init variable
        $lang = "";
@@ -724,7 +724,7 @@ function GET_LANGUAGE() {
                $ret = get_session('mx_lang');
 
                // Fixes a warning before the session has the mx_lang constant
-               if (empty($ret)) $ret = DEFAULT_LANG;
+               if (empty($ret)) $ret = constant('DEFAULT_LANG');
        }
 
        // Cache entry
@@ -823,7 +823,7 @@ function LOAD_EMAIL_TEMPLATE($template, $content=array(), $UID="0") {
        $DATA['email'] = $email;
 
        // Base directory
-       $BASE = sprintf("%stemplates/%s/emails/", PATH, GET_LANGUAGE());
+       $BASE = sprintf("%stemplates/%s/emails/", constant('PATH'), GET_LANGUAGE());
 
        // Check for admin/guest/member templates
        if (strpos($template, "admin_") > -1) {
@@ -950,9 +950,9 @@ function LOAD_URL($URL, $addUrlData=true) {
                header ("Location: ".str_replace("&amp;", "&", $URL));
        } else {
                // Output error message
-               require(PATH."inc/header.php");
+               LOAD_INC("inc/header.php");
                LOAD_TEMPLATE("redirect_url", false, str_replace("&amp;", "&", $URL));
-               require(PATH."inc/footer.php");
+               LOAD_INC("inc/footer.php");
        }
        exit();
 }
@@ -1319,7 +1319,7 @@ function GENERATE_IMAGE($img_code, $header=true) {
        }
 
        // Load image
-       $img = sprintf("%s/theme/%s/images/code_bg.%s", PATH, GET_CURR_THEME(), getConfig('img_type'));
+       $img = sprintf("%s/theme/%s/images/code_bg.%s", constant('PATH'), GET_CURR_THEME(), getConfig('img_type'));
        if (FILE_READABLE($img)) {
                // Switch image type
                switch (getConfig('img_type'))
@@ -2240,13 +2240,13 @@ function FIX_DELETED_COOKIES ($cookies) {
 // Output error messages in a fasioned way and die...
 function mxchange_die ($msg) {
        // Load header
-       require_once(PATH."inc/header.php");
+       LOAD_INC_ONCE("inc/header.php");
 
        // Load the message template
        LOAD_TEMPLATE("admin_settings_saved", false, $msg);
 
        // Load footer
-       require(PATH."inc/footer.php");
+       LOAD_INC("inc/footer.php");
 
        // Exit explicitly
        exit;
@@ -2639,13 +2639,13 @@ function REBUILD_CACHE ($cache, $inc="") {
                // Include file given?
                if (!empty($inc)) {
                        // Construct FQFN
-                       $fqfn = sprintf("%sinc/loader/load_cache-%s.php", PATH, $inc);
+                       $INC = sprintf("inc/loader/load_cache-%s.php", $inc);
 
                        // Is the include there?
-                       if (FILE_READABLE($fqfn)) {
+                       if (FILE_READABLE($INC)) {
                                // And rebuild it from scratch
                                //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): inc={$inc} - LOADED!<br />\n";
-                               require($fqfn);
+                               LOAD_INC($INC);
                        } else {
                                // Include not found!
                                DEBUG_LOG(__FUNCTION__, __LINE__, "Include {$inc} not found. cache={$cache}");
@@ -2915,13 +2915,13 @@ function GET_CURR_THEME() {
                } // END - if
        } elseif ((!isBooleanConstantAndTrue('mxchange_installed')) && ((isBooleanConstantAndTrue('mxchange_installing')) || ($CSS == true)) && ((!empty($_GET['theme'])) || (!empty($_POST['theme'])))) {
                // Prepare FQFN for checking
-               $theme = sprintf("%stheme/%s/theme.php", PATH, SQL_ESCAPE($_GET['theme']));
+               $theme = sprintf("%stheme/%s/theme.php", constant('PATH'), SQL_ESCAPE($_GET['theme']));
 
                // Installation mode active
                if ((!empty($_GET['theme'])) && (FILE_READABLE($theme))) {
                        // Set cookie from URL data
                        set_session('mxchange_theme', SQL_ESCAPE($_GET['theme']));
-               } elseif (FILE_READABLE(sprintf("%stheme/%s/theme.php", PATH, SQL_ESCAPE($_POST['theme'])))) {
+               } elseif (FILE_READABLE(sprintf("%stheme/%s/theme.php", constant('PATH'), SQL_ESCAPE($_POST['theme'])))) {
                        // Set cookie from posted data
                        set_session('mxchange_theme', SQL_ESCAPE($_POST['theme']));
                }
@@ -2934,7 +2934,7 @@ function GET_CURR_THEME() {
        }
 
        // Add (maybe) found theme.php file to inclusion list
-       $theme = sprintf("%stheme/%s/theme.php", PATH, SQL_ESCAPE($ret));
+       $theme = sprintf("%stheme/%s/theme.php", constant('PATH'), SQL_ESCAPE($ret));
 
        // Try to load the requested include file
        if (FILE_READABLE($theme)) $INC_POOL[] = $theme;
@@ -3069,7 +3069,7 @@ function getActualVersion ($type = 0) {
        $new = false;
 
        // FQFN of revision file
-       $FQFN = sprintf("%sinc/cache/.revision", PATH);
+       $FQFN = sprintf("%sinc/cache/.revision", constant('PATH'));
 
        // Check for revision file
        if (!FILE_READABLE($FQFN)) {
@@ -3105,6 +3105,48 @@ function getActualVersion ($type = 0) {
                return trim($akt_vers[$type]);
        }
 }
+
+// Loads an include file and logs any missing files for debug purposes
+function LOAD_INC ($INC) {
+       // Get constant path
+       $PATH = constant('PATH');
+
+       // Use the include file name directly
+       // @TODO Try to find all locations where an FQFN is given to these two
+       // @TODO functions and avoid it.
+       $FQFN = $INC;
+
+       // Check if PATH is in $INC
+       if (substr($INC, 0, $PATH) != $PATH) {
+               // Add it. This is why we need a trailing slash in config.php
+               $FQFN = $PATH . $INC;
+       } // END - if
+
+       // Is the include file there?
+       if (!FILE_READABLE($FQFN)) {
+               // Not there so log it
+               DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Include file %s not found.", basename($INC)));
+               return false;
+       } // END - if
+
+       // Try to load it
+       require($FQFN);
+}
+
+// Loads an include file once
+function LOAD_INC_ONCE ($INC) {
+       global $cacheArray;
+
+       // Is it not loaded?
+       if (!isset($cacheArray['load_once'][$INC])) {
+               // Then try to load it
+               LOAD_INC($INC);
+
+               // And mark it as loaded
+               $cacheArray['load_once'][$INC] = true;
+       } // END - if
+}
+
 //////////////////////////////////////////////////
 // AUTOMATICALLY RE-GENERATED MISSING FUNCTIONS //
 //////////////////////////////////////////////////
index bdf11b032080ee1ca2e172b9f66176796160c8e7..eae47eab4f537ac2b1ba9aa685f7d2592285859e 100644 (file)
@@ -71,7 +71,7 @@ FROM `{!_MYSQL_PREFIX!}_bonus`", __FILE__, __LINE__);
 } // END - if
 
 // Load (maybe) missing file
-require_once(PATH."inc/libs/mediadata_functions.php");
+LOAD_INC_ONCE("inc/libs/mediadata_functions.php");
 
 // Insert info to database
 MEDIA_UPDATE_ENTRY(array("total_send"  , "normal_send")  , "init", $nsent);
index 6aa3729e891b7e4b1d23b565ad9805e94c8a92ff..596aa5b916929d127b172e460d2299809cc260f3 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Make sure our functions are there
-require_once(PATH."inc/libs/refback_functions.php");
+LOAD_INC_ONCE("inc/libs/refback_functions.php");
 
 // Sanity-check: Do we have ref level 0?
 $result = SQL_QUERY("SELECT id FROM `{!_MYSQL_PREFIX!}_refsystem` WHERE level=0", __FILE__, __LINE__);
index efa794120113073c89f18c3ce3ff78c718046348..0c9afaab5c6131cac397fb96c565a5354e42e06c 100644 (file)
@@ -72,7 +72,10 @@ if (getConfig('master_salt') == "") {
 if (getConfig('file_hash') == "") {
        // Create filename from hashed random string
        $file_hash = sha1(GEN_PASS(mt_rand(128, 256)));
-       $file = PATH."inc/.secret/.".$file_hash;
+       $file = sprintf("%sinc/.secret/.%s",
+               constant('PATH'),
+               $file_hash
+       );
 
        // Count of chars to be taken from back of the string
        $nums = mt_rand(40, 45);
@@ -95,7 +98,9 @@ if (getConfig('file_hash') == "") {
                        array($file_hash), __FILE__, __LINE__);
 
                // Generate FQFN for .htaccess file
-               $FQFN = PATH."inc/.secret/.htaccess";
+               $FQFN = sprintf("%sinc/.secret/.htaccess",
+                       constant('PATH')
+               );
 
                // Is the .htaccess file there?
                if (!FILE_READABLE($FQFN)) {
index 6c85f0bfaf70fb095a381cc5dabc69d53aa65c4a..b04464c288b41d04cecd8a1d69f84c2685bae5d1 100644 (file)
@@ -80,10 +80,10 @@ if (($header != "1") && ($header != "2")) {
                                define('__PAGE_TITLE', html_entity_decode($TITLE));
                        } elseif ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndTrue('admin_registered'))) {
                                // Load language file because it was missing in installation finalizer step... *sigh*
-                               require_once(sprintf("%sinc/language/install_%s.php",
-                                       PATH,
+                               $FQFN = sprintf("inc/language/install_%s.php",
                                        GET_LANGUAGE()
-                               ));
+                               );
+                               LOAD_INC_ONCE($FQFN);
 
                                // Installation mode
                                define('__PAGE_TITLE', getMessage('INSTALLATION_OF_MXCHANGE'));
@@ -118,7 +118,7 @@ if (($header != "1") && ($header != "2")) {
                LOAD_TEMPLATE("header");
 
                // Include stylesheet
-               require_once(PATH."inc/stylesheet.php");
+               LOAD_INC_ONCE("inc/stylesheet.php");
        } // END - if
 
        // Closing HEAD tag
index 3a7422e0ae73377bea5edebe449e60abf01b870b..c33ac6ed94b2433ad67d26278504529587ef77f3 100644 (file)
@@ -419,33 +419,8 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT
                                define('__SMTP_USER'    , $_POST['smtp_user']);
                                define('__SMTP_PASS'    , $_POST['smtp_pass']);
 
-                               OUTPUT_HTML("<form action=\"".__BURL_ACTION."/install.php?page=2\" method=\"POST\">
-<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"install_content\">
-<tr>
-  <td align=\"center\">
-    <div class=\"install\">".HEADER_MYSQL_ERRORS."</strong>
-  </td>
-</tr>
-<tr><td colspan=\"2\" height=\"21\" class=\"seperator\">&nbsp;</td></tr>
-<tr>
-  <td><span class=\"install_intro\">
-    ".TEXT_MYSQL_ERRORS."
-  </span></td>
-</tr>
-<tr>
-  <td align=\"center\"><strong>
-    <ol>
-".__FATAL_ERROR_LI."
-    </ol>
-".__MYSQL_DATA."
-    <input type=\"hidden\" name=\"spath\" value=\"".__SPATH_VALUE."\">
-    <input type=\"hidden\" name=\"burl\" value=\"".__BURL_VALUE."\">
-    <input type=\"hidden\" name=\"title\" value=\"".__TITLE_VALUE."\">
-    <input type=\"submit\" class=\"admin_submit\" name=\"ok\" value=\"".RETURN_MYSQL_PAGE."\">
-  </strong></td>
-</tr>
-</table>
-</form>");
+                               // Load template
+                               LOAD_TEMPLATE("install_fatal_errors");
                        } else {
                                // Installation is done!
                                LOAD_URL($burl."/install.php?page=finalize");
@@ -456,13 +431,13 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT
                } else {
                        // Something goes wrong during installation! :-(
                        addFatalMessage(INSTALL_FINALIZER_FAILED);
-                       include ("inc/fatal_errors.php");
+                       LOAD_INC("inc/fatal_errors.php");
                }
                break;
 
        default:
-               DEBUG_LOG(__FILE__, __LINE__, sprintf("Wrong page %s detected.", $_GET['page']));
-               OUTPUT_HTML("    <div class=\"install_error\">".WRONG_PAGE."</strong>");
+               DEBUG_LOG(__FILE__, __LINE__, sprintf("Wrong page %s detected!}, $_GET['page']));
+               OUTPUT_HTML("    <div class=\"install_error\">{!WRONG_PAGE!}</strong>");
                break;
        }
 } else {
index 1f8275c4cc6d9ba3a55703e2e75b8c8710ca0bd8..6399eca657ea102efb351787ee8208affe16448b 100644 (file)
@@ -38,27 +38,26 @@ if (!defined('__SECURITY')) {
 }
 
 // Set default language
-if (empty($mx_lang)) $mx_lang = DEFAULT_LANG;
+if (empty($mx_lang)) $mx_lang = constant('DEFAULT_LANG');
 
 // Generate FQFN
-$FQFN = sprintf("%sinc/language/%s.php", PATH, $mx_lang);
+$FQFN = sprintf("%sinc/language/%s.php", constant('PATH'), $mx_lang);
 
 // Look for file
 if (!FILE_READABLE($FQFN)) {
        // Switch to default (DO NOT CHANGE!!!)
-       set_session('mx_lang', 'de');
+       set_session('mx_lang', constant('DEFAULT_LANG'));
        $mx_lang = "de";
-       $FQFN = sprintf("%sinc/language/%s.php", PATH, "de");
+       $INC = sprintf("inc/language/%s.php", constant('DEFAULT_LANG'));
 } // END - if
 
 // Load language file
-require($FQFN);
-unset($FQFN);
+LOAD_INC($INC);
 
 // Check for installation mode
 if (isBooleanConstantAndTrue('mxchange_installing')) {
        // Load matching language file
-       require(PATH."inc/language/install_".$mx_lang.".php");
+       LOAD_INC("inc/language/install_".$mx_lang.".php");
 }
 
 //
index bb5db58000437a062c22366339b8590ab85638f6..4e12fb90c3e20968167f84a2b39df891baf23128 100644 (file)
@@ -178,7 +178,7 @@ class CacheSystem {
                        $cache_version = null;
 
                        // Load cache file
-                       require_once($this->inc);
+                       LOAD_INC_ONCE($this->inc);
 
                        // Is there an array?
                        if (is_array($data)) {
index 4389864886a7960d21cee430ff6d6e713bb377d1..fb4fa4a8a52d3e76189db83dbd50a156b8e595b7 100644 (file)
@@ -695,7 +695,7 @@ function RALLYE_TEMPLATE_SELECTION($name="template", $default="")
 {
        // Check templates directory
        $OUT = ""; $ral = array();
-       $BASE = sprintf("%stemplates/%s/html/rallye/", PATH, GET_LANGUAGE());
+       $BASE = sprintf("%stemplates/%s/html/rallye/", constant('PATH'), GET_LANGUAGE());
        $dir = opendir($BASE);
        while ($read = readdir($dir))
        {
index 02b5132855095765d3d3774993e246b41ca2c5ee..1f08065de4695decd07ae7f2413e15ded8c5bbf0 100644 (file)
@@ -93,7 +93,7 @@ $SEC_CHARS = array(
                "{CLOSE_ANCHOR2}",
                "{SLASH}",
                "{DOT}",
-               '{QUOT}',
+               "{QUOT}",
                "{DOLLAR}",
                "{OPEN_ANCHOR}",
                "{CLOSE_ANCHOR}",
index 1bc1c7ed7f589048c1932df62c4f9c763ae72ffc..48300f1b1d772e12af40d6a5594530d51b634df9 100644 (file)
@@ -354,10 +354,10 @@ function GENERATE_SPONSOR_CONTENT($what)
 {
        global $_CONFIG;
        $OUT = "";
-       $FILE = sprintf("%sinc/modules/sponsor/%s.php", PATH, $what);
-       if (FILE_READABLE($FILE)) {
+       $INC = sprintf("inc/modules/sponsor/%s.php", $what);
+       if (FILE_READABLE($INC)) {
                // Every sponsor action will output nothing directly. It will be written into $OUT!
-               require_once($FILE);
+               LOAD_INC_ONCE($INC);
        } else {
                // File not found!
                $OUT .= LOAD_TEMPLATE("admin_settings_saved", true, SPONSOR_CONTENT_404_1.$what.SPONSOR_CONTENT_404_2);
index 61b32431eb70db851ccbce21dd3ed178810e5b67..6289a3d5611ba6383827760dce749a1ca250e4b5 100644 (file)
@@ -53,10 +53,10 @@ function THEME_SELECTION_BOX($mod, $act, $wht, $result) {
        // Load all themes
        while (list($theme) = SQL_FETCHROW($result)) {
                // Load it's theme.php file
-               $INC = sprintf("%stheme/%s/theme.php", PATH, SQL_ESCAPE($theme));
+               $INC = sprintf("theme/%s/theme.php", SQL_ESCAPE($theme));
                if (FILE_READABLE($INC)) {
                        // And save all data in array
-                       require($INC);
+                       LOAD_INC($INC);
                        $THEMES['theme_unix'][] = $theme;
                        $THEMES['theme_name'][] = $THEME_NAME;
                } // END - if
@@ -208,9 +208,9 @@ if ((!empty($_POST['new_theme'])) && ($_POST['new_theme'] != $currTheme)) {
        set_session('mxchange_theme', $newTheme);
 
        // Remove current from array and set new
-       $theme = sprintf("%stheme/%s/theme.php", PATH, $currTheme);
+       $theme = sprintf("%stheme/%s/theme.php", constant('PATH'), $currTheme);
        unset($INC_POOL[array_search($theme, $INC_POOL)]);
-       $INC_POOL[] = sprintf("%stheme/%s/theme.php", PATH, $newTheme);
+       $INC_POOL[] = sprintf("%stheme/%s/theme.php", constant('PATH'), $newTheme);
 } // END - if
 
 //
index c033051562e8d1ea0cdbf7136c0cb7143599f676..f77b7c7242f2b590674393d20b435db4c8eea32d 100644 (file)
@@ -95,7 +95,7 @@ if ($cacheMode == "load") {
                $cacheInstance->destroyCacheFile();
 
                // Retry it
-               require(__FILE__);
+               LOAD_INC(__FILE__);
                return;
        } // END -  if
 
@@ -163,7 +163,7 @@ if ($cacheMode == "load") {
        INIT_FILTER_SYSTEM();
 
        // Load more cache files (like admins)
-       require_once(PATH."inc/load_cache.php");
+       LOAD_INC_ONCE("inc/load_cache.php");
 
        // Remove array
        unset($EXT_POOL);
@@ -192,7 +192,7 @@ $DEL = array();
 // At least one found?
 if ((SQL_NUMROWS($res_ext_crt) > 0) && ((($cacheMode == "init") && ($CSS != "1") && ($CSS != "-1")) || ($cacheMode == "no"))) {
        // Load session management
-       require_once(PATH."inc/session.php");
+       LOAD_INC_ONCE("inc/session.php");
 
        // Extensions are registered so we load them
        while ($content = SQL_FETCHARRAY($res_ext_crt)) {
@@ -203,7 +203,7 @@ if ((SQL_NUMROWS($res_ext_crt) > 0) && ((($cacheMode == "init") && ($CSS != "1")
                } // END - if
 
                // Load extensions
-               $file1 = sprintf("%sinc/extensions/ext-%s.php", PATH, $content['ext_name']);
+               $file1 = sprintf("%sinc/extensions/ext-%s.php", constant('PATH'), $content['ext_name']);
 
                // Does the extension file exists?
                if (FILE_READABLE($file1)) {
@@ -225,7 +225,7 @@ if ((SQL_NUMROWS($res_ext_crt) > 0) && ((($cacheMode == "init") && ($CSS != "1")
                        // CSS file handling:
                        if ((!isset($content['ext_css'])) || ($content['ext_css'] == "Y")) {
                                // Create FQFN for the CSS file
-                               $CSS_FILE = sprintf("%stheme/%s/css/%s.css", PATH, GET_CURR_THEME(), $content['ext_name']);
+                               $CSS_FILE = sprintf("%stheme/%s/css/%s.css", constant('PATH'), GET_CURR_THEME(), $content['ext_name']);
 
                                // Is the file there?
                                if (FILE_READABLE($CSS_FILE)) {
@@ -260,7 +260,7 @@ if ((SQL_NUMROWS($res_ext_crt) > 0) && ((($cacheMode == "init") && ($CSS != "1")
                $cacheInstance->finalize();
 
                // Load more cache files (like admins)
-               require_once(PATH."inc/load_cache.php");
+               LOAD_INC_ONCE("inc/load_cache.php");
        } // END - if
 
        // Free memory
index 5f240f552632a7ca7b4d2065ec024cba0657c0f9..eef5335ccb7f86516cbe88661b01582b58048834 100644 (file)
@@ -107,7 +107,7 @@ ORDER BY login", __FILE__, __LINE__);
        $cacheInstance->finalize();
 
        // Reload the cache
-       require(__FILE__);
+       LOAD_INC(__FILE__);
 }
 
 // Next cached table are the admins_acls...
@@ -138,7 +138,7 @@ if (GET_EXT_VERSION("admins") >= "0.3") {
                $cacheInstance->finalize();
 
                // Reload the cache
-               require(__FILE__);
+               LOAD_INC(__FILE__);
        }
 } // END - if
 
index 133a6dcbefdc0d41170646af8d5d4d800315c416..72853a24f68552b65ce91ac42b925985d754df6f 100644 (file)
@@ -66,7 +66,7 @@ if (($cacheInstance->loadCacheFile("config", true)) && ($cacheInstance->extensio
        $cacheInstance->finalize();
 
        // Reload the cache
-       require(__FILE__);
+       LOAD_INC(__FILE__);
 }
 
 //
index b6eb02a2da1e333de70c742ccdbec0f5166d025f..7e6411ae5b1c20293b97ffe13d73bb0502b883f0 100644 (file)
@@ -96,7 +96,7 @@ FROM `{!_MYSQL_PREFIX!}_mod_reg` ORDER BY `id`", __FILE__, __LINE__);
        $cacheInstance->finalize();
 
        // Reload the cache
-       require(__FILE__);
+       LOAD_INC(__FILE__);
 }
 
 //
index 208d8825ad0c69ea33ca00369c15410d54820512..7c5bf3ff554fa672cecb27afdf13050f6e724bb4 100644 (file)
@@ -64,7 +64,7 @@ if (($cacheInstance->loadCacheFile("refdepths")) && ($cacheInstance->extensionVe
        $cacheInstance->finalize();
 
        // Reload the cache
-       require(__FILE__);
+       LOAD_INC(__FILE__);
 }
 
 //
index 87dce53986d84d01e9070d0fd802957f7914b853..b65764680e50f8af4a8ac584e6f35d22c412c398 100644 (file)
@@ -64,7 +64,7 @@ if (($cacheInstance->loadCacheFile("refsystem")) && ($cacheInstance->extensionVe
        $cacheInstance->finalize();
 
        // Reload the cache
-       require(__FILE__);
+       LOAD_INC(__FILE__);
 }
 
 //
index c516fe9c9dcf1da30351b8028d0a8c8a3ac44374..0b453f1b4bfa16b697f7e2c42ef028ca48b6a10c 100644 (file)
@@ -91,7 +91,7 @@ if (($cacheInstance->loadCacheFile("themes")) && ($cacheInstance->extensionVersi
        $cacheInstance->finalize();
 
        // Reload the cache
-       require(__FILE__);
+       LOAD_INC(__FILE__);
 }
 
 //
index fec5cc9fc509d9f6748aa08f012c61600bb5014d..2d11145709e5a936fbfa73896d31cd8e6d51674a 100644 (file)
@@ -44,7 +44,7 @@ if ((empty($GLOBALS['action'])) && ($check == "admin_only")) {
 } // END - if
 
 // Load include file
-require_once(PATH."inc/modules/admin/admin-inc.php");
+LOAD_INC_ONCE("inc/modules/admin/admin-inc.php");
 
 // Fix "deleted" cookies in PHP4 (PHP5 does remove them, PHP4 sets them to deleted!)
 FIX_DELETED_COOKIES(array('admin_login', 'admin_md5', 'admin_last', 'admin_to'));
@@ -355,7 +355,7 @@ if (!isBooleanConstantAndTrue('admin_registered')) {
                        if (!empty($_GET['area'])) $area = SQL_ESCAPE($_GET['area']);
 
                        // Load "logical-area menu-system" file
-                       require_once(PATH."inc/modules/admin/lasys-inc.php");
+                       LOAD_INC_ONCE("inc/modules/admin/lasys-inc.php");
 
                        // Create new-style menu system will "logical areas"
                        ADMIN_LOGICAL_AREA_SYSTEM($area, $act, $GLOBALS['what']);
index 4991768fdd727273061da042fc9d9d1d605775ed..cdaccba72d4e5c13ceaf2321a21166246ba01f6a 100644 (file)
@@ -41,10 +41,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) { 
        // Ok, we finally load the admin action module
-       require($INC);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 584cea7a8e28d3a28ad1b3d86ed243a676fc00ca..69eaf11bc28055a3cce13c9d1ea1dc34d7b4333d 100644 (file)
@@ -41,10 +41,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       require($INC);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index ff6fd6a25432b78b8d1927637deae4581a237307..2247dfdb83f54476012010b6f4868f2ef11eeede 100644 (file)
@@ -41,10 +41,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       require($INC);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 6407fa2fcea909b4253d1ee5d82cdcbb5bc47f57..572b5a83db154626b98aecedd87910ab8bf73d5e 100644 (file)
@@ -41,10 +41,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       require($INC);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index c289625a17c78f1d7626074244acfba05989a0ea..ec9c8cf303f92bca1bd3446aae058f847d06aa2f 100644 (file)
@@ -41,10 +41,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       require($INC);
+       LOAD_INC($INC);
 } else {
        // "what file" not found
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
index fa176d7b9169ce3c70273fa80b922ad46c7b33ab..303a8583932644e4825188fd031e180ec2317e50 100644 (file)
@@ -41,10 +41,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       require($INC);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 10855781274cb6f2257df48fc537aa0865636185..dcdc7e38dfe0adfc75d83c3304ca7b44455cd2ff 100644 (file)
@@ -41,10 +41,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       require($INC);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 9fad8a10795ef7b02a633afa85c34316dc02089c..cc980cf9b74e81d37c7f747e3cfb608e106f3e20 100644 (file)
@@ -41,10 +41,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) { 
        // Ok, we finally load the admin action module
-       require($INC);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 0377e5def5ae126216d7e4ff44cf2b85a2ce41e3..eec930c8ea834e50c1a1ad4eb3588653234eeaef 100644 (file)
@@ -41,10 +41,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       require($INC);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 2f261a638200969f2bbad91ec5ed80732f89e2a2..6f6b74abfc20af03da4b967078415c760c9d8404 100644 (file)
@@ -41,10 +41,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       require($INC);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 609fda6601257684bb36907f50b1e2333f7532ec..a0ecec34ec7b67dde2cf93a8d337248e00cc3e08 100644 (file)
@@ -41,10 +41,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       require($INC);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 438d613c70e27dc54426aa09bd90ca90728352aa..eae1d188f896f37fe2c5bdbeab72767bf3372b28 100644 (file)
@@ -41,10 +41,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       require($INC);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index b4b15bfb2f5253f6f2c680fd1a0c8965adf9eed5..29af4346679def7250f27377d2e9354b6e8918f5 100644 (file)
@@ -41,10 +41,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       require($INC);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index f2549d14219732b55645c7ddf6850c0489d047d6..48bc6cc5fcf27f2464fffa00c6e2ad9bfbfaf5d8 100644 (file)
@@ -41,10 +41,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       require($INC);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index b6f3046ae6e0abb7601a9bc00d96ea4836984472..9b7df7e7d149c6f049669257cb1cbf99adac8ac8 100644 (file)
@@ -41,10 +41,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       require($INC);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 0add6351e0d4567e51fbc6c4361dad1e00ed033a..f94fd846efe74faefe89e2dfce6f32960a0dcfb3 100644 (file)
@@ -41,10 +41,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       require($INC);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 560c878404e23bd63773c77772dff0c82985fd1b..d2cb9c50c94f91d3310a8607946c3095b42a07d3 100644 (file)
@@ -41,10 +41,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       require($INC);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index fb1c52700d1969b0938d0164a9434edb78d34d63..b9452b79586a9b73c3aa1fac8b0842860532c505 100644 (file)
@@ -41,10 +41,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       require($INC);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 86ff0f2843c4180981c228e886156b2438b0fa22..4100288347a46fd5441b29da335635cbedab4903 100644 (file)
@@ -41,10 +41,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       require($INC);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index ff29f1784cb2ea660f38512ac50a88853c3bbb5d..9b721fe3963846ac979865d98ef4946e417424d7 100644 (file)
@@ -41,10 +41,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       require($INC);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 06b0b88efe446c5cb4868d3b663ff2e6b4f5cbf0..20274b9c2dea1d36765d4de1bfd3eb97cffcdc16 100644 (file)
@@ -44,10 +44,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       require($INC);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 494674dd3c13aee5776837f3b16b352593d11169..d1e14ad33be7826e8c6e098cc141ed49cf920e02 100644 (file)
@@ -41,10 +41,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       require($INC);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 5aaa6fdc5a784cbc2540f049a016aefd13d2c6d1..8175c2f86eddd3754a58f1b9632f52fa6f7983c4 100644 (file)
@@ -41,10 +41,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       require($INC);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index b2a3e9e1ac048784dc06e591b619a7ebb3ae605b..cdc524036e89412c770109488f1d3750c5a7026d 100644 (file)
@@ -41,10 +41,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       require($INC);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 46a97dfeeffe92ed6db6767e95b9811174f31022..4957c8f847b084d7f5dfd1fa48d673a5a5047a0c 100644 (file)
@@ -41,10 +41,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       require($INC);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 75f66ff5b26bf0958b128a3c6fffe0e38f0768c7..f729b1da8f2be747a38177661b185ff2fb4f0ef7 100644 (file)
@@ -349,10 +349,10 @@ LIMIT 1", array($act, $wht, $wht), __FILE__, __LINE__);
        if (SQL_NUMROWS($result_action) == 1) {
 
                // Is valid but does the inlcude file exists?
-               $INC = sprintf("%sinc/modules/admin/action-%s.php", PATH, $act);
+               $INC = sprintf("inc/modules/admin/action-%s.php", $act);
                if ((FILE_READABLE($INC)) && (VALIDATE_MENU_ACTION("admin", $act, $wht)) && (__ACL_ALLOW == true)) {
                        // Ok, we finally load the admin action module
-                       require($INC);
+                       LOAD_INC($INC);
                } elseif (__ACL_ALLOW == false) {
                        // Access denied
                        LOAD_TEMPLATE("admin_menu_failed", false, getMessage('ADMIN_ACCESS_DENIED'));
@@ -469,7 +469,7 @@ function ADD_ADMIN_MENU($act, $wht, $return=false) {
                <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"admin_menu_sub\">\n";
                                        while (list($wht_sub, $title_what, $desc_what) = SQL_FETCHROW($result_what)) {
                                                // Filename
-                                               $INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $wht_sub);
+                                               $INC = sprintf("%sinc/modules/admin/what-%s.php", constant('PATH'), $wht_sub);
                                                if ((EXT_IS_ACTIVE("admins")) && (GET_EXT_VERSION("admins") > "0.2")) {
                                                        $ACL = ADMINS_CHECK_ACL("", $wht_sub);
                                                } else {
@@ -729,7 +729,7 @@ function ADMIN_SAVE_SETTINGS (&$POST, $tableName="_config", $whereStatement="con
 // Generate a selection box
 function ADMIN_MAKE_MENU_SELECTION ($menu, $type, $name, $default="") {
        // Open the requested menu directory
-       $handle = opendir(sprintf("%sinc/modules/%s/", PATH, $menu)) or mxchange_die("Cannot load menu ".$menu."!");
+       $handle = opendir(sprintf("%sinc/modules/%s/", constant('PATH'), $menu)) or mxchange_die("Cannot load menu ".$menu."!");
 
        // Init the selection box
        $OUT = "<select name=\"".$name."\" class=\"admin_select\" size=\"1\">\n <option value=\"\">".IS_TOP_MENU."</option>\n";
@@ -739,7 +739,7 @@ function ADMIN_MAKE_MENU_SELECTION ($menu, $type, $name, $default="") {
                // Is this a PHP script?
                if (($file != ".") && ($file != "..") && ($file != "lost+found") && (strpos($file, "".$type."-") > -1) && (strpos($file, ".php") > 0)) {
                        // Then test if the file is readable
-                       $test = sprintf("%sinc/modules/%s/%s", PATH, $menu, $file);
+                       $test = sprintf("%sinc/modules/%s/%s", constant('PATH'), $menu, $file);
 
                        // Is the file there?
                        if (FILE_READABLE($test)) {
index 188f07abe2d1b4e8f7736cad9a20dee8546c2362..f9e89a7031a072e63e3823193ac90b89ed495d71 100644 (file)
@@ -75,7 +75,7 @@ function OUTPUT_STANDARD_OVERVIEW(&$result_tasks) {
                                } // END - if
                        } else {
                                // Test-drive extension in update mode
-                               require(sprintf("%sinc/extensions/ext-%s.php", PATH, $ext_name));
+                               LOAD_INC(sprintf("inc/extensions/ext-%s.php", $ext_name));
 
                                // Update extension if extension is installed and outdated
                                //* DEBUG: */ print "ext={$ext_name},ver={$EXT_VERSION}/".GET_EXT_VERSION($ext_name)."<br />\n";
index e241ce7d65c420b7437019b8025e803f5dfc3e5f..b717f17bcca13b19e9bfdf7573b4b95a8bbe5687 100644 (file)
@@ -43,7 +43,7 @@ if (isset($_POST['ok'])) {
        // If salt length is empty or null then we shall generate new passwords
        if (empty($_POST['salt_length']) || ($_POST['salt_length'] == "0")) {
                // Generate new passwords for all!
-               require(PATH."/inc/gen_sql_patches.php");
+               LOAD_INC("inc/gen_sql_patches.php");
 
                // Forget the wrong number!
                unset($_POST['salt_length']);
index 73b5ab035f42d6f366b92c0c537cee303d395487..dd3d722dba92e52683a0c031c615f61f873a5fbb 100644 (file)
@@ -185,7 +185,7 @@ if ((!empty($_GET['id'])) && (!empty($_GET['mode']))) {
                                // Output message
                                LOAD_TEMPLATE("admin_settings_saved", false, $MSG);
                        } // END - if
-               } elseif (FILE_READABLE(sprintf("%stemplates/%s/html/admin/%s.tpl", PATH, GET_LANGUAGE(), $TPL))) {
+               } elseif (FILE_READABLE(sprintf("%stemplates/%s/html/admin/%s.tpl", constant('PATH'), GET_LANGUAGE(), $TPL))) {
                        // Create mailto link
                        define('__SPONSOR_VALUE', "<a href=\"mailto:{!__EMAIL!}\">{!__SURNAME!} {!__FAMILY!}</a>");
 
index d30d5072ec84628631b76163cd86a314ebd8bf42..3e8f80cb75850b641e5f55852cdf813129e7d4c6 100644 (file)
@@ -84,7 +84,7 @@ if (!empty($whereStatement))
        if (isset($_POST['task'])) $SEL = SELECTION_COUNT($_POST['task']);
        if ((isset($_POST['assign'])) && ($SEL > 0)) {
                // Assign / do tasks
-               require_once(PATH."inc/modules/admin/overview-inc.php");
+               LOAD_INC_ONCE("inc/modules/admin/overview-inc.php");
                if (empty($dmy)) $dmy = "";
                OUTPUT_SELECTED_TASKS($_POST, $dmy);
        } else {
index 435ab833435081418fbe8ad9d65c89bdb542b702..1a4c705d50f58b3e2d258cd6896202aea0195046 100644 (file)
@@ -108,7 +108,7 @@ if (!empty($_GET['u_id'])) {
                } elseif (isset($_POST['del'])) {
                        // Delete the account
                        $ACT = true;
-                       require_once(PATH."inc/modules/admin/what-del_user.php");
+                       LOAD_INC_ONCE("inc/modules/admin/what-del_user.php");
                } elseif (!empty($_POST['no'])) {
                        // Do not lock him...
                        $URL = "modules.php?module=admin&amp;what=list_user&amp;u_id=".bigintval($_GET['u_id']);
index a4ab2a11677a368f0f2deb8cc697a4eec34217b8..648fa3a67b52b484c136c63202df1deb40a9dd50 100644 (file)
@@ -43,7 +43,7 @@ ADD_DESCR("admin", __FILE__);
 if (!empty($_GET['access'])) {
        // Secure input and construct FQFN
        $access = SQL_ESCAPE(strip_tags($_GET['access']));
-       $target = sprintf("%slogs/%s", PATH, $access);
+       $target = sprintf("%slogs/%s", constant('PATH'), $access);
 
        // Is the file valid and readable?
        if (FILE_READABLE($target)) {
index 208c3773da15594f890d41a5f7f382e6379d8d17..20a10573a7c09796d65262a32dd325975ddba598 100644 (file)
@@ -41,7 +41,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 // In Opera browsers the menu is being displayed double: ADD_DESCR("admin", __FILE__);
 
 // Otherwise load include file 'overview-inc' (old standard overview page)
-require_once(PATH."inc/modules/admin/overview-inc.php");
+LOAD_INC_ONCE("inc/modules/admin/overview-inc.php");
 
 $JOBS_DONE = true;
 $taskExt = false; // Default is that "task" is not installed
index 9cff81bebef0cdcabed9858d75f960f9972ac0be..04a93543836571900ed1cbfa87193cadaac62332 100644 (file)
@@ -69,7 +69,7 @@ if (($response[sizeof($response) - 1] == "[EOF]") && ($response[0] != "[EOF]"))
                // Leave loop when data is invalid or EOF?
                if ((substr($value, 0, 6) == "theme-") && (substr($value, -4) == ".zip")) {
                        $name = substr($value, 6, -4);
-                       $file = sprintf("%sthemes/%s/theme.php", PATH, $name);
+                       $file = sprintf("%sthemes/%s/theme.php", constant('PATH'), $name);
                        $ver  = trim(substr($response[$idx + 3], 4));
 
                        // Load version
index 5eff513dc6484302b448c3c749cba54fdcbc229d..806610456c1fddd36016dc13deeb8c1f08becb4c 100644 (file)
@@ -101,8 +101,13 @@ $OUT = ""; $SW = 2;
 $result = SQL_QUERY("SELECT id, theme_path, theme_active, theme_ver, theme_name FROM `{!_MYSQL_PREFIX!}_themes` ORDER BY theme_path", __FILE__, __LINE__);
 if (SQL_NUMROWS($result) > 0) {
        while (list($id, $unix, $active, $ver, $name) = SQL_FETCHROW($result)) {
+               // Construct IFN
+               $INC = sprintf("theme/%s/theme.php",
+                       $unix
+               );
+
                // Load theme in test mode
-               require(PATH."theme/".$unix."/theme.php");
+               LOAD_INC($INC);
 
                // Is the loaded theme name != current theme name?
                $LINK = $unix;
index d8ab90b5c82cd0871ac3e16754cf609c56638bb9..9dbff1f165fde7e3f9d150e033bb13dbb5858844 100644 (file)
@@ -51,10 +51,10 @@ if (!empty($_POST['theme'])) {
        // Check if theme is there
        if (!THEME_CHECK_EXIST($_POST['theme'])) {
                // Import theme
-               $file = sprintf("%stheme/%s/theme.php", PATH, SQL_ESCAPE($_POST['theme']));
-               if (FILE_READABLE($file)) {
+               $INC = sprintf("theme/%s/theme.php", SQL_ESCAPE($_POST['theme']));
+               if (FILE_READABLE($INC)) {
                        // Load the theme header file
-                       require($file);
+                       LOAD_INC($INC);
 
                        // Register it ith the exchange
                        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_themes` (`theme_path`, `theme_active`, `theme_ver`, `theme_name`)
@@ -94,12 +94,12 @@ $THEMES = array(
 $handle = opendir(PATH."theme/") or mxchange_die("Cannot read themes dir!");
 while ($dir = readdir($handle)) {
        // Construct absolute theme.php file name
-       $theme = sprintf("%stheme/%s/theme.php", PATH, $dir);
+       $INC = sprintf("theme/%s/theme.php", $dir);
 
        // Test it...
-       if (($dir != ".") && ($dir != "..") && (FILE_READABLE($theme))) {
+       if (($dir != ".") && ($dir != "..") && (FILE_READABLE($INC))) {
                // Found a valid directory so let's load it's theme.php file
-               require($theme);
+               LOAD_INC($INC);
 
                // Add found theme to array
                $THEMES['theme_unix'][]   = $dir;
index e9d28dfe4efba08f16bc71253f0a423350915309..fa5f7747a01e1fbf60ef2a0ffc6ffcfd51fd1167 100644 (file)
@@ -45,37 +45,43 @@ $usage = getConfig('usage_base')."/";
 
 if (!empty($_GET['image'])) {
        if ($_GET['type'] == "usage") {
-               $file = sprintf("%s%s/usage.png", PATH, getConfig('usage_base'));
+               $FQFN = sprintf("%s%s/usage.png",
+                       constant('PATH'),
+                       getConfig('usage_base')
+               );
        } else {
                if (strpos($_GET['image'], "\\") > 0) $_GET['image'] = substr($_GET['image'], 0, strpos($_GET['image'], "\\"));
-               $file = sprintf("%s%s/%s_usage_%s.png",
-                       PATH,
+               $FQFN = sprintf("%s%s/%s_usage_%s.png",
+                       constant('PATH'),
                        getConfig('usage_base'),
                        SQL_ESCAPE($_GET['type']),
                        SQL_ESCAPE($_GET['image'])
                );
        }
 
-       if (FILE_READABLE($file)) {
-               $image = imagecreatefrompng($file);
+       if (FILE_READABLE($FQFN)) {
+               $image = imagecreatefrompng($FQFN);
                header("Content-type: image/png");
                imagepng($image);
                imagedestroy($image);
        }
        exit();
 } elseif (empty($_GET['usage'])) {
-       $file = sprintf("%s%s/index.html", PATH, getConfig('usage_base'));
+       $FQFN = sprintf("%s%s/index.html",
+               constant('PATH'),
+               getConfig('usage_base')
+       );
 } else {
-       $file = sprintf("%s%s/usage_%s.html",
-               PATH,
+       $FQFN = sprintf("%s%s/usage_%s.html",
+               constant('PATH'),
                getConfig('usage_base'),
                SQL_ESCAPE($_GET['usage'])
        );
 }
 
-if ((!empty($file)) && (FILE_READABLE($file) {
+if ((!empty($FQFN)) && (FILE_READABLE($FQFN) {
        // @TODO This code is double, see LOAD_TEMPLATE and LOAD_EMAIL_TEMPLATE in functions.php
-       $tmpl_file = READ_FILE($file);
+       $tmpl_file = READ_FILE($FQFN);
        $tmpl_file = addslashes($tmpl_file);
        $tmpl_file = "\$content=\"".$tmpl_file."\";";
        eval($tmpl_file);
index 064128799cde85876a331788236810aaeb3e4102..84177b62368cc03a82f25a329a3217728dd4da44 100644 (file)
@@ -47,10 +47,10 @@ if (!defined('__SECURITY')) {
 ADD_DESCR("guest", __FILE__);
 
 // Load the include file
-$INC = sprintf(PATH."inc/modules/guest/what-%s.php", $GLOBALS['what']);
+$INC = sprintf("inc/modules/guest/what-%s.php", $GLOBALS['what']);
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the guest action module
-       require($INC);
+       LOAD_INC($INC);
 } elseif ($IS_VALID) {
        addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
 } else {
index 39c8bbb899d9a4bfc470a7ffbab4986787ef63c4..eb04fed853a909b8e7de5172d185b7c086a4e8b1 100644 (file)
@@ -41,10 +41,10 @@ if (!defined('__SECURITY')) {
 }
 
 // Only when one admin link is clicked...
-$INC = sprintf("%sinc/modules/guest/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/guest/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the guest action module
-       require($INC);
+       LOAD_INC($INC);
 } elseif ($IS_VALID) {
        addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
 } else {
index 87d77a9846cd66425669643fd42e62ed458730fb..4a1528f74153a590a9efd9a33e7cb101ecce9ffa 100644 (file)
@@ -44,12 +44,12 @@ if (!defined('__SECURITY')) {
 ADD_DESCR("guest", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/guest/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/guest/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 $IS_VALID = WHAT_IS_VALID($GLOBALS['action'], $GLOBALS['what'], "guest");
 
 if ((FILE_READABLE($INC)) && ($IS_VALID)) {
        // Ok, we finally load the guest action module
-       require_once($INC);
+       LOAD_INC($INC);
 } elseif ($IS_VALID) {
        addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
 } else {
index 214fadddc68a2cc379911d4382d380cc12b6c547..39edeefbffce6d03f83600a11754508a60794226 100644 (file)
@@ -44,10 +44,10 @@ if (!defined('__SECURITY')) {
 ADD_DESCR("guest", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/guest/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/guest/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the guest action module
-       require($INC);
+       LOAD_INC($INC);
 } elseif ($IS_VALID) {
        addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
 } else {
index 30b6a5230965d694a1bb9a752506221b786084f4..d2a0a9c9eb912cb946f93273ef110dc5a79010ae 100644 (file)
@@ -46,10 +46,10 @@ if (!defined('__SECURITY')) {
 ADD_DESCR("guest", __FILE__);
 
 // Load the include file
-$INC = sprintf("%sinc/modules/guest/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
+$INC = sprintf("inc/modules/guest/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the guest action module
-       require($INC);
+       LOAD_INC($INC);
 } elseif ($IS_VALID) {
        addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
 } else {
index b3693ca25742f5027ab636df43917ed3937a2c9b..9b7ffe5dfc1e357def652d1ba75d1542b436b50d 100644 (file)
@@ -164,7 +164,7 @@ if (!empty($URL)) {
        // URL was constructed
        if (getTotalFatalErrors()) {
                // Fatal errors!
-               require_once(PATH."inc/fatal_errors.php");
+               LOAD_INC_ONCE("inc/fatal_errors.php");
        } else {
                // Load URL
                LOAD_URL($URL);
index 51a2efa60658cf13e431947d993c3edca908a92e..8a32c4c5fb832a12ea7264c45df62e6192e117f2 100644 (file)
@@ -41,7 +41,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Special file
-require_once(PATH."inc/rdf.class.php");
+LOAD_INC_ONCE("inc/rdf.class.php");
 
 // Add description as navigation point
 ADD_DESCR("guest", __FILE__);
index dee82df00ad1f9ad9a5578e08c539bd0624cd698..686da74754c1ffd8b86c28e1e24bb542ec548978 100644 (file)
@@ -108,12 +108,12 @@ LOAD_TEMPLATE("guest_menu_content");
 $BLOCK_MODE = false;
 
 // Construct FQFN
-$INC_ACTION = sprintf("%sinc/modules/guest/action-%s.php", PATH, $GLOBALS['action']);
+$INC = sprintf("inc/modules/guest/action-%s.php", $GLOBALS['action']);
 
 // Is the file there?
-if ((FILE_READABLE($INC_ACTION)) && (VALIDATE_MENU_ACTION("guest", $GLOBALS['action'], $GLOBALS['what']))) {
+if ((FILE_READABLE($INC)) && (VALIDATE_MENU_ACTION("guest", $GLOBALS['action'], $GLOBALS['what']))) {
        // Requested module is available so we load it
-       require_once($INC_ACTION);
+       LOAD_INC_ONCE($INC);
 } else {
        // Invalid module specified or not found...
        LOAD_URL("modules.php?module=index");
index 89756f98c89ab4307e26d4422b63fea22aa067f0..50d7d98f42d0fb969d0e2f454b34ea260e106d04 100644 (file)
@@ -78,10 +78,10 @@ if ((getConfig('member_menu') == "Y") || (!EXT_IS_ACTIVE("sql_patches", true)))
 OUTPUT_HTML("   </td>
   <td valign=\"top\" align=\"center\" rowspan=\"3\" class=\"member_content\">");
 
-$INC_ACTION = sprintf("%sinc/modules/member/action-%s.php", PATH, $act);
+$INC_ACTION = sprintf("inc/modules/member/action-%s.php", $act);
 if ((FILE_READABLE($INC_ACTION)) && (VALIDATE_MENU_ACTION("member", GET_ACTION("member", $GLOBALS['what']), $GLOBALS['what']))) {
        // Requested module is available so we load it
-       include ($INC_ACTION);
+       LOAD_INC($INC_ACTION);
 } else {
        // Invalid module specified or not found...
        LOAD_URL("modules.php?module=login");
index 7fcb665657897a4e9dcea8737a76602251da7105..91e6a066ab0f6dd1d1575a48b05b25ea888a2a87 100644 (file)
@@ -49,10 +49,10 @@ if (!defined('__SECURITY')) {
 ADD_DESCR("member", __FILE__);
 
 // Load the include file
-$INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
-if (FILE_READABLE($INC_WHAT)) {
+$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+if (FILE_READABLE($INC)) {
        // Ok, we finally load the member action module
-       require($INC_WHAT);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
 }
index 538709a7cbd77e9ac603904e48729e0202fcb0d0..9f1967493989a1514110d562d222506852221896 100644 (file)
@@ -46,10 +46,10 @@ if (!defined('__SECURITY')) {
 ADD_DESCR("member", __FILE__);
 
 // Load the include file
-$INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
-if (FILE_READABLE($INC_WHAT)) {
+$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+if (FILE_READABLE($INC)) {
        // Ok, we finally load the member action module
-       require($INC_WHAT);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
 }
index b641a2cf45e650f2a2bb8f76e0c6573d293c3526..8aad93494685c344ab9f847e09e4c3cee88bc088 100644 (file)
@@ -49,10 +49,10 @@ if (!defined('__SECURITY')) {
 ADD_DESCR("member", __FILE__);
 
 // Load the include file
-$INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
-if (FILE_READABLE($INC_WHAT)) {
+$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+if (FILE_READABLE($INC)) {
        // Ok, we finally load the member action module
-       require($INC_WHAT);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
 }
index ffef8c9ffe60861a879b1ff027c660236bc9a7a7..6aae2a04974f6b5d0914c817ef80dff5899a191a 100644 (file)
@@ -46,10 +46,10 @@ if (!defined('__SECURITY')) {
 ADD_DESCR("member", __FILE__);
 
 // Load the include file
-$INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
-if (FILE_READABLE($INC_WHAT)) {
+$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+if (FILE_READABLE($INC)) {
        // Ok, we finally load the member action module
-       require($INC_WHAT);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
 }
index 557c54c2bfb09e2eb10dbde1cfb20af247c85f4b..e3f4de5bbabb088fa8388b83c8155bc781412836 100644 (file)
@@ -46,10 +46,10 @@ if (!defined('__SECURITY')) {
 ADD_DESCR("member", __FILE__);
 
 // Load the include file
-$INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
-if (FILE_READABLE($INC_WHAT)) {
+$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+if (FILE_READABLE($INC)) {
        // Ok, we finally load the member action module
-       require($INC_WHAT);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
 }
index 27bd965b3c08fe9e539fc7974403516cc1da15e3..7158a4cffbe73d33ef09679d9bcbd4defb77a6fc 100644 (file)
@@ -46,10 +46,10 @@ if (!defined('__SECURITY')) {
 ADD_DESCR("member", __FILE__);
 
 // Load the include file
-$INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
-if (FILE_READABLE($INC_WHAT)) {
+$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+if (FILE_READABLE($INC)) {
        // Ok, we finally load the member action module
-       require($INC_WHAT);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
 }
index d8455dc7ad65af639eb794ad67b6706b47b31d24..5248f12891848bcb37a9ad89bcb9d807e727bf5e 100644 (file)
@@ -49,10 +49,10 @@ if (!defined('__SECURITY')) {
 ADD_DESCR("member", __FILE__);
 
 // Load the include file
-$INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
-if (FILE_READABLE($INC_WHAT)) {
+$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+if (FILE_READABLE($INC)) {
        // Ok, we finally load the member action module
-       require($INC_WHAT);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
 }
index df0838f2059e34c5b954eee73b06bc43f62f197e..5815abf4aadcbf7d8f4eead8967286993b9d9ff1 100644 (file)
@@ -46,10 +46,10 @@ if (!defined('__SECURITY')) {
 ADD_DESCR("member", __FILE__);
 
 // Load the include file
-$INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
-if (FILE_READABLE($INC_WHAT)) {
+$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+if (FILE_READABLE($INC)) {
        // Ok, we finally load the member action module
-       require($INC_WHAT);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
 }
index 284de3b7c38b31d0911f68c937efa8d1e3603750..c7e9111a816d9aaa8d0e6449158de7acb0d34c44 100644 (file)
@@ -46,10 +46,10 @@ if (!defined('__SECURITY')) {
 ADD_DESCR("member", __FILE__);
 
 // Load the include file
-$INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
-if (FILE_READABLE($INC_WHAT)) {
+$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+if (FILE_READABLE($INC)) {
        // Ok, we finally load the member action module
-       require($INC_WHAT);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
 }
index c2090cdf441cb5dd74a79bed312b92d183754594..214a66bbf39b7544f124a0f17d12ba063fc4dede 100644 (file)
@@ -49,10 +49,10 @@ if (!defined('__SECURITY')) {
 ADD_DESCR("member", __FILE__);
 
 // Load the include file
-$INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
-if (FILE_READABLE($INC_WHAT)) {
+$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
+if (FILE_READABLE($INC)) {
        // Ok, we finally load the member action module
-       require($INC_WHAT);
+       LOAD_INC($INC);
 } else {
        addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
 }
index 8b400c254c3efcd9c36ce6d99a1c1b59e1d7cdfa..4a88da8c96099c45b4ee9d5bee809ac65b96d2df 100644 (file)
@@ -78,7 +78,7 @@ if (SQL_NUMROWS($result) > 0) {
        // List available ref banners
        $SW = 2; $OUT = "";
        while (list($id, $url, $alt, $count, $clks) = SQL_FETCHROW($result)) {
-               $test = str_replace(URL, PATH, $url); $size = 0;
+               $test = str_replace(URL, constant('PATH'), $url); $size = 0;
                if ($test == $url) {
                        // Download banner (I hope you keep the banner on same server???)
                        $fp = GET_URL($url); $file = "";
index 2034e6e63bd77765b192c3d8ad80b79a4e820715..e260fae8b0ae6fe17754216201e7b4fd42e636c8 100644 (file)
@@ -74,11 +74,11 @@ $THEMES = array(
 $handle = opendir(PATH."theme/") or mxchange_die("Cannot read themes dir!");
 while ($entry = readdir($handle)) {
        // Construct absolute theme.php file name
-       $theme = sprintf("%stheme/%s/theme.php", PATH, $entry);
+       $INC = sprintf("theme/%s/theme.php", $entry);
 
-       if (($entry != ".") && ($entry != "..") && (FILE_READABLE($theme)) && (THEME_IS_ACTIVE($entry))) {
+       if (($entry != ".") && ($entry != "..") && (FILE_READABLE($INC)) && (THEME_IS_ACTIVE($entry))) {
                // Found a valid directory so let's load it's theme.php file
-               require($theme);
+               LOAD_INC($INC);
 
                // Add found theme to array
                $THEMES['theme_unix'][]   = $entry;
index c9e95630ec82e0f7b68ea34c882fa7fcae3862de..697481ec2e48674f0d6af19a757eb61591047296 100644 (file)
@@ -41,19 +41,19 @@ if (!defined('__SECURITY')) {
 define('DEBUG_SQL', false);
 
 // Non-database functions
-require_once(PATH."inc/functions.php");
+LOAD_INC_ONCE("inc/functions.php");
 
 // Filter functions
-require_once(PATH."inc/filters.php");  
+LOAD_INC_ONCE("inc/filters.php");  
 
 // Functions which interact with the database
-require_once(PATH."inc/mysql-manager.php");
+LOAD_INC_ONCE("inc/mysql-manager.php");
 
 // Load extensions and language
-require_once(PATH."inc/extensions.php");
+LOAD_INC_ONCE("inc/extensions.php");
 
 // Load database library
-require_once(PATH."inc/db/lib.php");
+LOAD_INC_ONCE("inc/db/lib.php");
 
 // Error handler function
 function __errorHandler ($errno, $errstr, $errfile, $errline) {
@@ -166,21 +166,21 @@ if ((!isBooleanConstantAndTrue('mxchange_installing')) && (isBooleanConstantAndT
                                $_CONFIG = merge_array($_CONFIG, LOAD_CONFIG());
 
                                // Load "databases" aka static arrays
-                               require_once(PATH."inc/databases.php");
+                               LOAD_INC_ONCE("inc/databases.php");
 
                                // Loading patching system is required here...
-                               require_once(PATH."inc/patch-system.php"); // Initialize patch system
+                               LOAD_INC_ONCE("inc/patch-system.php"); // Initialize patch system
 
                                // Session management
-                               require_once(PATH."inc/session.php");
+                               LOAD_INC_ONCE("inc/session.php");
 
                                // Run daily reset
-                               require_once(PATH."inc/check-reset.php");
+                               LOAD_INC_ONCE("inc/check-reset.php");
 
                                // Load admin include file if he is admin
                                if (IS_ADMIN()) {
                                        // Administrative functions
-                                       require_once(PATH."inc/modules/admin/admin-inc.php");
+                                       LOAD_INC_ONCE("inc/modules/admin/admin-inc.php");
                                } // END - if
                                //* DEBUG: */ ADD_POINTS_REFSYSTEM("test", 36, 1000);
                                //* DEBUG: */ die();
@@ -216,7 +216,7 @@ if ((!isBooleanConstantAndTrue('mxchange_installing')) && (isBooleanConstantAndT
                                } // END - if
 
                                // Update sending pool
-                               if (($CSS != "1") && ($CSS != "-1")) require_once(PATH."inc/pool-update.php"); // Sends out mails in configureable steps
+                               if (($CSS != "1") && ($CSS != "-1")) LOAD_INC_ONCE("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
@@ -241,14 +241,14 @@ if ((!isBooleanConstantAndTrue('mxchange_installing')) && (isBooleanConstantAndT
                                }
                        } else {
                                // Add language system
-                               require_once(PATH."inc/language.php");
+                               LOAD_INC_ONCE("inc/language.php");
 
                                // Wrong database?
                                addFatalMessage(getMessage('WRONG_DB_SELECTED'));
                        }
                } else {
                        // Add language system
-                       require_once(PATH."inc/language.php");
+                       LOAD_INC_ONCE("inc/language.php");
 
                        // No link to database!
                        addFatalMessage(getMessage('NO_DB_LINK'));
@@ -256,7 +256,7 @@ if ((!isBooleanConstantAndTrue('mxchange_installing')) && (isBooleanConstantAndT
                }
        } else {
                // Add language system
-               require_once(PATH."inc/language.php");
+               LOAD_INC_ONCE("inc/language.php");
 
                // Maybe you forgot to enter your MySQL data?
                addFatalMessage(getMessage('MYSQL_DATA_MISSING'));
@@ -271,8 +271,8 @@ if ((!isBooleanConstantAndTrue('mxchange_installing')) && (isBooleanConstantAndT
        $link = false; // No database link by default
 
        // Include required files
-       require_once(PATH."inc/databases.php");
-       require_once(PATH."inc/session.php");
+       LOAD_INC_ONCE("inc/databases.php");
+       LOAD_INC_ONCE("inc/session.php");
 
        // Check if we are in installation routine
        if ((basename($_SERVER['PHP_SELF']) != "install.php") && ($CSS != "1") && ($CSS != -1)) {
@@ -297,9 +297,9 @@ if ((!isBooleanConstantAndTrue('mxchange_installing')) && (isBooleanConstantAndT
 
 if ((getTotalFatalErrors() > 0) && (isBooleanConstantAndTrue('mxchange_installed')) && (!defined('mxchange_installing')) && ($CSS != "1")) {
        // One or more fatal error(s) occur during connect...
-       require_once(PATH."inc/header.php");
-       require_once(PATH."inc/fatal_errors.php");
-       require_once(PATH."inc/footer.php");
+       LOAD_INC_ONCE("inc/header.php");
+       LOAD_INC_ONCE("inc/fatal_errors.php");
+       LOAD_INC_ONCE("inc/footer.php");
 } // END - if
 
 //
index 9e82899320d6fc47a5ed41c1364f7b03d1a9006b..7afa45ddfe290674249104cfc6bbb967d42c746e 100644 (file)
@@ -155,7 +155,7 @@ function CHECK_MODULE ($mod) {
        // Still no luck or not found?
        if (($ret == "cache_miss") || (!$found)) {
                //              ----- Legacy module -----                                   ---- Module in base folder  ----                       --- Module with extension's name ---
-               if ((FILE_READABLE(sprintf("%sinc/modules/%s.php", PATH, $mod))) || (FILE_READABLE(sprintf("%s%s.php", PATH, $mod))) || (FILE_READABLE(sprintf("%s%s/%s.php", PATH, $extension, $mod)))) {
+               if ((FILE_READABLE(sprintf("%sinc/modules/%s.php", constant('PATH'), $mod))) || (FILE_READABLE(sprintf("%s%s.php", constant('PATH'), $mod))) || (FILE_READABLE(sprintf("%s%s/%s.php", constant('PATH'), $extension, $mod)))) {
                        // Data is missing so we add it
                        if (GET_EXT_VERSION("sql_patches") >= "0.3.6") {
                                // Since 0.3.6 we have a has_menu column, this took me a half hour
@@ -369,9 +369,8 @@ function ADD_MENU ($MODE, $act, $wht) {
 
                                        // Full file name for checking menu
                                        //* DEBUG: */ echo __LINE__.":!!!!".$sub_what."!!!<br />\n";
-                                       $test_inc = sprintf("%sinc/modules/%s/what-%s.php", PATH, $MODE, $sub_what);
-                                       $test = (FILE_READABLE($test_inc));
-                                       if ($test) {
+                                       $FQFN = sprintf("%sinc/modules/%s/what-%s.php", constant('PATH'), $MODE, $sub_what);
+                                       if (FILE_READABLE($FQFN)) {
                                                if ((!empty($wht)) && (($wht == $sub_what))) {
                                                        $content = "<strong>";
                                                }
@@ -385,7 +384,7 @@ function ADD_MENU ($MODE, $act, $wht) {
                                        // Menu title
                                        $content .= getConfig('menu_blur_spacer') . $sub_title;
 
-                                       if ($test) {
+                                       if (FILE_READABLE($FQFN)) {
                                                $content .= "</a>";
                                        } else {
                                                $content .= "</em>";
@@ -411,14 +410,14 @@ function ADD_MENU ($MODE, $act, $wht) {
                        } else {
                                // This is a menu block... ;-)
                                $BLOCK_MODE = true;
-                               $INC_BLOCK = sprintf("%sinc/modules/%s/action-%s.php", PATH, $MODE, $main_action);
+                               $INC_BLOCK = sprintf("inc/modules/%s/action-%s.php", $MODE, $main_action);
                                if (FILE_READABLE($INC_BLOCK)) {
                                        // Load include file
                                        if ((!EXT_IS_ACTIVE($main_action)) || ($main_action == "online")) OUTPUT_HTML("<tr>
 
   <td class=\"".$MODE."_menu_whats\">");
                                        //* DEBUG: */ echo __LINE__."/".$main_cnt."/".$main_action."/".$sub_what.":".$GLOBALS['what']."*<br />\n";
-                                       include ($INC_BLOCK);
+                                       LOAD_INC($INC_BLOCK);
                                        //* DEBUG: */ echo __LINE__."/".$main_cnt."/".$main_action."/".$sub_what.":".$GLOBALS['what']."*<br />\n";
                                        if ((!EXT_IS_ACTIVE($main_action)) || ($main_action == "online")) OUTPUT_HTML("  </td>
 </tr>");
index 89f370509a5f096617172ac9b74247dd037bd69f..37f988dd229cc3ed7f8639f868645aa8b09a30b5 100644 (file)
@@ -57,10 +57,10 @@ global $PHPSESSID;
 $PHPSESSID = @session_id();
 
 // Load language system
-require_once(PATH."inc/language.php");
+LOAD_INC_ONCE("inc/language.php");
 
 // Load extensions here
-require_once(PATH."inc/load_extensions.php");
+LOAD_INC_ONCE("inc/load_extensions.php");
 
 // Determine and set referal id
 DETERMINE_REFID();
index c93b50b02cd6f3b1195aa455de879d467b749a21..4840655c2645ff9e6bb4bfa46ffaedf4b8ed67b9 100644 (file)
@@ -59,7 +59,7 @@ if (($CSS == "1") || (getConfig('css_php') == "DIRECT")) {
        // Output inclusion lines
        foreach ($STYLES as $value) {
                // Only include found CSS files (to reduce 404 requests)
-               $BASE = sprintf("%stheme/%s/css/", PATH, GET_CURR_THEME());
+               $BASE = sprintf("%stheme/%s/css/", constant('PATH'), GET_CURR_THEME());
                $file = $BASE.$value;
 
                // Do include only existing files and whose are not empty
index d5ee879dcd5e69862a39dacf9cc35f2c82978537..fc1220d82995f79ef09d1c2f335d9ee7e41dc342 100644 (file)
--- a/index.php
+++ b/index.php
@@ -43,12 +43,12 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = "";
 $GLOBALS['module'] = "index";
 
 // Load config.php
-require("inc/config.php");
+require_once("inc/config.php");
 
 // Is the script installed?
 if (isBooleanConstantAndTrue('mxchange_installed')) {
        // Header
-       require(PATH."inc/header.php");
+       LOAD_INC("inc/header.php");
 
        // Fix missing array elements here
        if (getConfig('index_delay') == null)  $_CONFIG['index_delay']  = 0;
@@ -81,7 +81,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
        }
 
        // Footer
-       require(PATH."inc/footer.php");
+       LOAD_INC("inc/footer.php");
 } else {
        // You have to install first!
        LOAD_URL("install.php");
index a700f22dab2d17f1202c36405d92c6c43482a112..b6f2416d36315c62db112e7984b0c574303ea633 100644 (file)
@@ -45,7 +45,7 @@
 define('mxchange_installing', true);
 
 // Load security system
-require("inc/libs/security_functions.php");
+require_once("inc/libs/security_functions.php");
 
 // Init "action" and "what"
 global $what, $action;
@@ -59,10 +59,10 @@ $CSS = 0;
 $GLOBALS['module'] = "install";
 
 // Load config file
-require("inc/config.php");
+require_once("inc/config.php");
 
 // Header
-require(PATH."inc/header.php");
+LOAD_INC("inc/header.php");
 
 // Reload page to page=welcome when it is not specified
 if (!isset($_GET['page'])) {
@@ -81,14 +81,14 @@ if (getTotalFatalErrors() == 0) {
        LOAD_TEMPLATE("install_header");
 
        // Here start's our installtion stuff
-       require_once(PATH."inc/install-inc.php");
+       LOAD_INC_ONCE("inc/install-inc.php");
 
        // Close main installation table
        LOAD_TEMPLATE("install_footer");
 }
 
 // Footer
-require(PATH."inc/footer.php");
+LOAD_INC("inc/footer.php");
 
 //
 ?>
diff --git a/js.php b/js.php
index 0ced4dccaf11e6bda308c25d8683d0c20a7b768a..d5598fb1a7e404a4cfe4ee462b0872e09451c513 100644 (file)
--- a/js.php
+++ b/js.php
@@ -51,7 +51,7 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = "";
 $CSS = "1"; $GLOBALS['module'] = "js";
 
 // Load the required file(s)
-require("inc/config.php");
+require_once("inc/config.php");
 
 // Is this script installed and a JavaScript tag is provied?
 if ((isBooleanConstantAndTrue('mxchange_installed')) && (isset($_GET['tag']))) {
@@ -59,22 +59,21 @@ if ((isBooleanConstantAndTrue('mxchange_installed')) && (isset($_GET['tag']))) {
        @header("Content-type: text/javascript");
 
        // Load header
-       require_once(PATH."inc/header.php");
+       LOAD_INC_ONCE("inc/header.php");
 
        // Prepare include file for looking
-       $fqfn = sprintf("%sinc/js/tag-%s.php",
-               PATH,
+       $INC = sprintf("inc/js/tag-%s.php",
                SQL_ESCAPE($_GET['tag'])
        );
 
        // Is that file readable?
-       if (FILE_READABLE($fqfn)) {
+       if (FILE_READABLE($INC)) {
                // Include it
-               require_once($fqfn);
+               LOAD_INC_ONCE($INC);
        } // END - if 
 
        // Load footer
-       require_once(PATH."inc/footer.php");
+       LOAD_INC_ONCE("inc/footer.php");
 } // END - if
 
 //
index f014f2d754de3bfc861b9195d000508a91be729c..793814e68382f62ea568a8974c826097144d3e1b 100644 (file)
@@ -43,12 +43,12 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = "";
 $GLOBALS['module'] = "lead-confirm";
 
 // Load config.php
-require("inc/config.php");
+require_once("inc/config.php");
 
 // Is the script installed?
 if (isBooleanConstantAndTrue('mxchange_installed')) {
        // Header
-       require(PATH."inc/header.php");
+       LOAD_INC("inc/header.php");
 
        // Initialize the array for the template
        $content = array(
@@ -83,7 +83,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
        LOAD_TEMPLATE("lead_code", false, $content);
 
        // Footer
-       require(PATH."inc/footer.php");
+       LOAD_INC("inc/footer.php");
 } else {
        // You have to install first!
        LOAD_URL("install.php");
index 27537535c73151ea252ba2906d4315449c02bb52..3d9dab567bc267788eefe9b48b0bd308c10d3278 100644 (file)
--- a/login.php
+++ b/login.php
@@ -42,7 +42,7 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = "";
 $GLOBALS['module'] = "login";
 
 // Load the required file(s)
-require("inc/config.php");
+require_once("inc/config.php");
 
 // Is the script installed?
 if (isBooleanConstantAndTrue('mxchange_installed')) {
index 4778ba91301b7975b4b28e092ed4bf2b5a5c74ba..d1bae743d07eda8393ac191dcb1d2ff5581e6847 100644 (file)
@@ -42,7 +42,7 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = "";
 $GLOBALS['module'] = "mailid"; $CSS = -1;
 
 // Load the required file(s)
-require("inc/config.php");
+require_once("inc/config.php");
 
 if (isBooleanConstantAndTrue('mxchange_installed')) {
        // Is the extension active
@@ -156,7 +156,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
                                                }
 
                                                // Add header
-                                               require_once(PATH."inc/header.php");
+                                               LOAD_INC_ONCE("inc/header.php");
 
                                                // Was that mail a valid one?
                                                if ($VALID) {
@@ -216,7 +216,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
                }
        } else {
                // Include footer
-               require_once(PATH."inc/footer.php");
+               LOAD_INC_ONCE("inc/footer.php");
        }
 } else {
        // You have to install first!
index 1c9405aa35e33954a29f2f39ba1002091c8cabf8..513b898ab6c9d7540d0ac2d2047cb7f36cf70d54 100644 (file)
@@ -42,7 +42,7 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = "";
 $GLOBALS['module'] = "mailid";  $CSS = 0;
 
 // Load the required file(s)
-require("inc/config.php");
+require_once("inc/config.php");
 
 if (isBooleanConstantAndTrue('mxchange_installed')) {
        // Is the extension active
@@ -62,7 +62,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
        // 01        1        12            2    2            21    1                   22     10
        if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == 0)) {
                // No image? Then output header
-               if ($mode != "img") require_once(PATH."inc/header.php");
+               if ($mode != "img") LOAD_INC_ONCE("inc/header.php");
 
                // Maybe he wants to confirm an email?
                if ($url_mid > 0) {
@@ -348,7 +348,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
                // Insert footer if no image
                if ($mode != "img") {
                        // Write footer
-                       require_once(PATH."inc/footer.php");
+                       LOAD_INC_ONCE("inc/footer.php");
                } // END - if
        }
 } elseif ($mode != "img") {
index 4215f5c97c175d4d0b288aaf0730e0a2baac330d..f1b619b29e731126af0f8c9e5b2162841501933f 100644 (file)
@@ -55,7 +55,7 @@ if (!empty($_GET['what'])) $GLOBALS['what'] = secureString($_GET['what']);
 $GLOBALS['module'] = secureString($_GET['module']);
 
 // Needed include files
-require("inc/config.php");
+require_once("inc/config.php");
 
 // Check if logged in
 if (IS_MEMBER()) {
@@ -94,7 +94,7 @@ if (IS_MEMBER()) {
 }
 
 // The header file
-require_once(PATH."inc/header.php");
+LOAD_INC_ONCE("inc/header.php");
 
 // Modules are by default not valid!
 $MOD_VALID = false; $check = "failed";
@@ -102,6 +102,9 @@ if ((getConfig('maintenance') == "Y") && (!IS_ADMIN()) && ($GLOBALS['module'] !=
        // Maintain mode is active and you are no admin
        addFatalMessage(getMessage('LANG_DOWN_MAINTAINCE'));
 } elseif (($link) && ($db) && (getTotalFatalErrors() == 0)) {
+       // Construct module name
+       define('__MODULE', sprintf("inc/modules/%s.php", SQL_ESCAPE($GLOBALS['module'])));
+
        // Did we found the module listed in allowed modules and are we successfully connected?
        $check = CHECK_MODULE($GLOBALS['module']);
        switch ($check)
@@ -109,9 +112,6 @@ if ((getConfig('maintenance') == "Y") && (!IS_ADMIN()) && ($GLOBALS['module'] !=
        case "admin_only":
        case "mem_only":
        case "done":
-               // Construct module name
-               define('__MODULE', sprintf("%sinc/modules/%s.php", PATH, SQL_ESCAPE($GLOBALS['module'])));
-
                // Does the module exists on local file system?
                if ((FILE_READABLE(__MODULE)) && (getTotalFatalErrors() == 0)) {
                        // Module is valid, active and located on the local disc...
@@ -129,7 +129,7 @@ if ((getConfig('maintenance') == "Y") && (!IS_ADMIN()) && ($GLOBALS['module'] !=
                break;
 
        case "locked":
-               if (!FILE_READABLE(PATH."inc/modules/".$GLOBALS['module'].".php")) {
+               if (!FILE_READABLE(__MODULE)) {
                        // Module does addionally not exists
                        addFatalMessage(LANG_MOD_REG_404_1.$GLOBALS['module'].LANG_MOD_REG_404_2);
                } // END - if
@@ -154,11 +154,11 @@ if (($MOD_VALID) && (defined('__MODULE'))) {
        /////////////////////////////////////////////
        //
        // Everything is okay so we can load the module
-       include (__MODULE);
+       LOAD_INC_ONCE(__MODULE);
 } // END - if
 
 // Next-to-end add the footer
-require_once(PATH."inc/footer.php");
+LOAD_INC_ONCE("inc/footer.php");
 
 //
 ?>
diff --git a/ref.php b/ref.php
index 604a86d189cedafd1f07750b50f0f20bd5bdfb3d..ef79784df3ed57ca756e500a41f97606d3b51cfe 100644 (file)
--- a/ref.php
+++ b/ref.php
@@ -42,7 +42,7 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = "";
 $GLOBALS['module'] = "ref"; $CSS = -1;
 
 // Load the required file(s)
-require("inc/config.php");
+require_once("inc/config.php");
 
 // Redirect only to registration page when this script is installed
 if (isBooleanConstantAndTrue('mxchange_installed')) {
index ddff568683de07c84eee4200f642eac11961bd8e..d86e5fedbfb78840407c400fffe3b7e7825ac69b 100644 (file)
@@ -44,7 +44,7 @@ $GLOBALS['action'] = "";
 $GLOBALS['module'] = "show_bonus"; $CSS = 0;
 
 // Load the required file(s)
-require("inc/config.php");
+require_once("inc/config.php");
 
 // Is the "bonus" extension active?
 if (!EXT_IS_ACTIVE("bonus")) {
@@ -55,7 +55,7 @@ if (!EXT_IS_ACTIVE("bonus")) {
 // List only rankings when script is installed
 if (isBooleanConstantAndTrue('mxchange_installed')) {
        // Include header
-       require(PATH."inc/header.php");
+       LOAD_INC("inc/header.php");
 
        if (($_GET['uid'] > 0) && ($_GET['d'] > 0) && (!empty($_GET['t']))) {
                // Set row name
@@ -133,7 +133,7 @@ LIMIT 1",
        LOAD_TEMPLATE("show_bonus");
 
        // Include footer
-       require(PATH."inc/footer.php");
+       LOAD_INC("inc/footer.php");
 } else {
        // You have to install first!
        LOAD_URL("install.php");
index 5b601d88cad27cefbec0b8aceaa336267d738051..d849c935c257997d09dc8283800f8bd1e985cb06 100644 (file)
@@ -34,7 +34,7 @@
 require_once("inc/libs/security_functions.php");
 
 // Load the required file(s)
-require("inc/config.php");
+require_once("inc/config.php");
 
 // Is the script installed?
 if (isBooleanConstantAndTrue('mxchange_installed')) {
index 065aef68686dd7f7fa04808821f62196cffb82a4..e6326473af6798e87ae9030851126d786cd47b7b 100644 (file)
@@ -34,7 +34,7 @@
 require_once("inc/libs/security_functions.php");
 
 // Load the required file(s)
-require("inc/config.php");
+require_once("inc/config.php");
 
 // Redirect only to registration page when this script is installed
 if (defined('mxchange_installed') && (isBooleanConstantAndTrue(mxchange_installed))) {
index a640ea603a2eae2c289d4214633073f917358e5d..07d22fb273a4f31c1e175fcd13d128d1963a49af 100644 (file)
@@ -47,7 +47,7 @@ $CSS = 0;
 $msg = null;
 
 // Load the required file(s)
-require("inc/config.php");
+require_once("inc/config.php");
 
 // Is the script installed?
 if (isBooleanConstantAndTrue('mxchange_installed')) {
@@ -67,7 +67,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
        if ((SURFBAR_CHECK_RELOAD_FULL()) || ((isset($_GET['frame'])) && (in_array($_GET['frame'], array("stop", "stop2", "stats", "textlinks"))))) {
                // Reload-lock is full, surfbar stopped so...
                // Load header
-               require_once(PATH."inc/header.php");
+               LOAD_INC_ONCE("inc/header.php");
 
                // Load template
                if (((isset($_GET['frame'])) && ($_GET['frame'] == "stop")) || (!isset($_GET['frame']))) {
@@ -183,7 +183,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
                }
 
                // Load header
-               require_once(PATH."inc/header.php");
+               LOAD_INC_ONCE("inc/header.php");
 
                // Load that template
                //* DEBUG: */ die("templateName={$templateName}<br />\n<strong>content</strong>=<pre>".print_r($content, true)."</pre>");
@@ -191,7 +191,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
        }
 
        // Load footer
-       require_once(PATH."inc/footer.php");
+       LOAD_INC_ONCE("inc/footer.php");
 } else {
        // You have to install first!
        LOAD_URL("install.php");
diff --git a/templates/de/html/install/install_fatal_errors.tpl b/templates/de/html/install/install_fatal_errors.tpl
new file mode 100644 (file)
index 0000000..c68e2e9
--- /dev/null
@@ -0,0 +1,27 @@
+<form action="{!__BURL_ACTION!}/install.php?page=2" method="POST">
+<table border="0" cellspacing="0" cellpadding="0" class="install_content">
+<tr>
+  <td align="center">
+    <div class="install">{!HEADER_MYSQL_ERRORS!}</div>
+  </td>
+</tr>
+<tr><td colspan="2" height="21" class="seperator">&nbsp;</td></tr>
+<tr>
+  <td><div class="install_intro">
+    {!TEXT_MYSQL_ERRORS!}
+  </div></td>
+</tr>
+<tr>
+  <td align="center"><strong>
+    <ol>
+{!__FATAL_ERROR_LI!}
+    </ol>
+{!__MYSQL_DATA!}
+    <input type="hidden" name="spath" value="{!__SPATH_VALUE!}" />
+    <input type="hidden" name="burl" value="{!__BURL_VALUE!}" />
+    <input type="hidden" name="title" value="{!__TITLE_VALUE!}" />
+    <input type="submit" class="admin_submit" name="ok" value="{!RETURN_MYSQL_PAGE!}" />
+  </strong></td>
+</tr>
+</table>
+</form>
index a22e83582c555b0b8226fc406004e3133b41da0a..034483213f71cc2b1f64f12ee3babe9650026651 100644 (file)
--- a/view.php
+++ b/view.php
@@ -42,7 +42,7 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = "";
 $GLOBALS['module'] = "view"; $CSS = -1;
 
 // Load the required file(s)
-require("inc/config.php");
+require_once("inc/config.php");
 
 if (((!empty($_GET['user'])) || (!empty($_GET['reseller']))) && (!empty($_GET['banner']))) {
        // Count banner view... we currently don't need the user's id but maybe