]> git.mxchange.org Git - mailer.git/commitdiff
Some internal TODOs fixed, rewrites to script inclusion
authorRoland Häder <roland@mxchange.org>
Sun, 8 Feb 2009 17:28:49 +0000 (17:28 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 8 Feb 2009 17:28:49 +0000 (17:28 +0000)
57 files changed:
birthday_confirm.php
css.php
doubler.php
inc/databases.php
inc/extensions.php
inc/footer.php
inc/functions.php
inc/header.php
inc/libs/doubler_functions.php
inc/libs/sponsor_functions.php
inc/libs/user_functions.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-theme_import.php
inc/modules/chk_login.php
inc/modules/guest/action-
inc/modules/guest/action-admin.php
inc/modules/guest/action-members.php
inc/modules/guest/action-sponsor.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-themes.php
inc/mysql-connect.php
show_bonus.php

index 6ec854571816472422208628fd950a71b33ade12..23c81d7c08b9605bea9df26bbbd886e16c77b20e 100644 (file)
@@ -116,7 +116,7 @@ WHERE b.userid=%s AND b.chk_value='%s' LIMIT 1",
        $GLOBALS['module'] = "birthday_confirm";
 
        // Include header
-       include(PATH."inc/header.php");
+       require(PATH."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
-       include(PATH."inc/footer.php");
+       require(PATH."inc/footer.php");
 } else {
        // You have to install first!
        LOAD_URL("install.php");
diff --git a/css.php b/css.php
index 1917cee822bc65efbcd69cad64ce5cccd5c7ea20..368716c995a2dd7eeb1ae4537c970c4c1704fede 100644 (file)
--- a/css.php
+++ b/css.php
@@ -38,18 +38,25 @@ define('_OB_CACHING', "old");
 require_once("inc/libs/security_functions.php");
 
 // Init "action" and "what"
-global $what, $action;
-$GLOBALS['what'] = ""; $GLOBALS['action'] = "";
+global $what, $action, $footer;
+
+// Footer is disabled in CSS mode
+$footer = "-1";
+
+// Init variables
+$GLOBALS['what'] = "";
+$GLOBALS['action'] = "";
 
 // This is a CSS file loader!
-$CSS = "1"; $GLOBALS['module'] = "css";
+$CSS = "1";
+$GLOBALS['module'] = "css";
+
+// Set header
+header("Content-type: text/css");
 
 // Load the required file(s)
 require("inc/config.php");
 
-// Set header
-@header("Content-type: text/css");
-
 // Load header
 require_once(PATH."inc/header.php");
 
index f328e4235afa8d36698539788d21ce1809fdbe3a..3cf72bb08ee065e67fed6741eacedaeb4798de58 100644 (file)
@@ -211,7 +211,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
        if (getConfig('doubler_send_mode') == "DIRECT") require(PATH."inc/doubler_send.php");
 
        // Output header
-       include(PATH."inc/header.php");
+       require(PATH."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
-       include(PATH."inc/footer.php");
+       require(PATH."inc/footer.php");
 } else {
        // You have to install first!
        LOAD_URL("install.php");
index 5001bc3f0d8ec1e1eb65a6e3ec62e1ca44f8f970..d8735f6ec88741e61c157644608d3705bf6f29e0 100644 (file)
@@ -97,7 +97,7 @@ define('START_TDAY', MAKE_TIME(0, 0, 0, time()));
 define('SERVER_URL', "http://www.mxchange.org");
 
 // Current SVN revision
-define('CURR_SVN_REVISION', "718");
+define('CURR_SVN_REVISION', "719");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
index a59e17b086ff61ef806d85a365349eb99dd11427..7be85ad1113daf48cde1c61eb3015b9ff3659ddc 100644 (file)
@@ -281,6 +281,7 @@ function EXTENSION_RUN_SQLS ($ext_id, $load_mode) {
 
        // Get extension's name
        $ext_name = GET_EXT_NAME($ext_id);
+       // If it is not set then maybe there is no extension for that ID number
        if (empty($ext_name)) return false;
 
        // Load extension in detected mode
index 9a7b05ffd9cf30f4762cb641013d379bbab64638..84dcbd0eed2a28add65a4f50c860a42d715af54b 100644 (file)
@@ -32,7 +32,7 @@
  ************************************************************************/
 
 // Global variable stuff
-global $link, $frame, $CSS, $header;
+global $link, $frame, $CSS, $header, $footer;
 
 // Some security stuff...
 if (!defined('__SECURITY')) {
@@ -40,9 +40,7 @@ if (!defined('__SECURITY')) {
        require($INC);
 } // END - if
 
-// @TODO Workaround for css.php
-if (!isset($footer)) $footer = 0;
-
+// Footer disabled or already sent?
 if (($footer != "1") && ($footer != "2") && ($CSS != "1")) {
        // Output the generated HTML code or do nothing in direct-mode
        if (getTotalFatalMessages() > 0) {
index de39d07278994a3e38fc4bd79703fa06b081af24..4f55bb8a07e03f4c2e8b2d4c762af5f86b846332 100644 (file)
@@ -59,43 +59,6 @@ function IS_INC_WRITEABLE($inc) {
        }
 }
 
-// Open a table (you may want to add some header stuff here)
-// @DEPRECATED
-function OPEN_TABLE ($PERCENT = "", $CLASS = "", $ALIGN="left", $VALIGN="", $td_only=false) {
-       global $table_cnt;
-
-       // Count tables so we can generate CSS classes for every table... :-)
-       if (empty($CLASS)) {
-               // Class is empty so count one up and create a class
-               $table_cnt++; $CLASS = "class".$table_cnt;
-       }
-       $OUT = "<TABLE border=\"0\" cellspacing=\"0\" cellpadding=\"0\"";
-
-       // Shall I add the classes to TABLE and TD or only to TD?
-       if (!$td_only) $OUT .= " class=\"".$CLASS."\"";
-
-       // Width is given
-       if (!empty($PERCENT)) $OUT .= " width=\"".$PERCENT."\"";
-
-       // Horizonal align
-       if (!empty($ALIGN)) $OUT .=" align=\"".$ALIGN."\"";
-
-       // Vertical align is given
-       if (!empty($VALIGN))  $OUT .= " valign=\"".$VALIGN."\"";
-       $OUT .= ">\n<TR>\n<TD";
-       if (!empty($ALIGN)) $OUT .=" align=\"".$ALIGN."\"";
-       $OUT .= " class=\"".$CLASS."\">";
-       OUTPUT_HTML($OUT);
-}
-
-// Close a table (you may want to add some footer stuff here)
-// @DEPRECATED
-function CLOSE_TABLE( $ADD="") {
-       OUTPUT_HTML("  </TD>\n</TR>");
-       if (!empty($ADD)) OUTPUT_HTML($ADD);
-       OUTPUT_HTML("</TABLE>");
-}
-
 // Output HTML code directly or "render" it. You addionally switch the new-line character off
 function OUTPUT_HTML ($HTML, $NEW_LINE = true) {
        // Some global variables
@@ -135,7 +98,7 @@ function OUTPUT_HTML ($HTML, $NEW_LINE = true) {
                default:
                        // Huh, something goes wrong or maybe you have edited config.php ???
                        DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid renderer %s detected.", OUTPUT_MODE));
-                       MXCHANGE_DIE("<strong>".FATAL_ERROR.":</strong> ".LANG_NO_RENDER_DIRECT);
+                       mxchange_die("<strong>{!FATAL_ERROR!}:</strong> {!LANG_NO_RENDER_DIRECT!}");
                        break;
                }
        } elseif ((_OB_CACHING == "on") && ($footer == 1)) {
@@ -987,9 +950,9 @@ function LOAD_URL($URL, $addUrlData=true) {
                header ("Location: ".str_replace("&amp;", "&", $URL));
        } else {
                // Output error message
-               include(PATH."inc/header.php");
+               require(PATH."inc/header.php");
                LOAD_TEMPLATE("redirect_url", false, str_replace("&amp;", "&", $URL));
-               include(PATH."inc/footer.php");
+               require(PATH."inc/footer.php");
        }
        exit();
 }
@@ -2276,13 +2239,14 @@ function FIX_DELETED_COOKIES ($cookies) {
 
 // Output error messages in a fasioned way and die...
 function mxchange_die ($msg) {
-       global $footer;
+       // Load header
+       require_once(PATH."inc/header.php");
 
        // Load the message template
        LOAD_TEMPLATE("admin_settings_saved", false, $msg);
 
        // Load footer
-       include(PATH."inc/footer.php");
+       require(PATH."inc/footer.php");
 
        // Exit explicitly
        exit;
@@ -2901,7 +2865,7 @@ function getConfig ($entry) {
        return $value;
 }
 
-// @TODO Rewrite all language constants to the function getLanguage().
+// @TODO Rewrite all language constants to this function.
 // "Getter" for language strings
 function getMessage ($messageId) {
        // Default is not found!
index 40a3a80863329727550f8a8dc56402082baa9a66..e262bfa16e9395b46e9b6fc3cedf369979eabef6 100644 (file)
@@ -39,9 +39,9 @@ if (!defined('__SECURITY')) {
        require($INC);
 }
 
-// Initialize variables
-if (!isset($header)) $header = 0;
+global $header;
 
+// Is the header already sent?
 if (($header != "1") && ($header != "2")) {
        // If not in CSS mode generate the header
        if (($CSS != "1")) {
index a5379614c2c39ebaec4b69ac0a8b0107a7a05767..c04dd24be74287b9486ea09a7614f2ac6693b303 100644 (file)
@@ -37,8 +37,8 @@ if (!defined('__SECURITY')) {
        require($INC);
 }
 
-// Generates a HTML table baded on given data
-// @TODO Lame description!
+// Generates a HTML table based on given data
+// @TODO Lame description
 function DOUBLER_GENERATE_TABLE ($uid="0", $done='N', $ref='N', $sort="ASC") {
        global $_CONFIG;
        if (empty($cnt)) $cnt = 0;
index 1b8056b99e39a22a68d0ea05eeeadb22560be9b8..f5774c69e541f6f765e4c2d02416402b2f816928 100644 (file)
@@ -103,32 +103,7 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $MSGs=array(), $RET_S
 
                        default:
                                // Test if there is are time selections
-                               $TEST = substr($k, -3);
-                               if ((($TEST == "_ye") || ($TEST == "_mo") || ($TEST == "_we") || ($TEST == "_da") || ($TEST == "_ho") || ($TEST == "_mi") || ($TEST == "_se")) && (!empty($v))) {
-                                       // Found a multi-selection for timings?
-                                       $TEST = substr($k, 0, -3);
-                                       if ((!empty($POST[$TEST."_ye"])) && (!empty($POST[$TEST."_mo"])) && (!empty($POST[$TEST."_we"])) && (!empty($POST[$TEST."_da"])) && (!empty($POST[$TEST."_ho"])) && (!empty($POST[$TEST."_mi"])) && (!empty($POST[$TEST."_se"])) && ($TEST != $TEST2)) {
-                                               // Generate timestamp
-                                               $POST[$TEST] = CREATE_TIMESTAMP_FROM_SELECTIONS($TEST, $POST);
-                                               $DATA['keys'][] = $TEST;
-                                               $DATA['values'][] = $POST[$TEST];
-
-                                               // Remove data from array
-                                               // @TODO Do we still need this all?
-                                               unset($POST[$TEST."_ye"]);
-                                               unset($POST[$TEST."_mo"]);
-                                               unset($POST[$TEST."_we"]);
-                                               unset($POST[$TEST."_da"]);
-                                               unset($POST[$TEST."_ho"]);
-                                               unset($POST[$TEST."_mi"]);
-                                               unset($POST[$TEST."_se"]);
-
-                                               // Skip adding
-                                               $k = ""; $skip = true; $TEST2 = $TEST;
-                                       }
-                               } else {
-                                       $skip = false; $TEST2 = "";
-                               }
+                               CONVERT_SELECTIONS_TO_TIMESTAMP($POST, $DATA, $k, $skip);
                                break;
                        }
 
index 38b9cc52c3a35706ff4e4b1658905da7606800f4..7592bbc554e3d36044818900f8a673569be2a206 100644 (file)
@@ -365,7 +365,7 @@ function USER_DO_LOGIN ($uid, $passwd) {
                }
        } elseif ((($probe_nickname) && (!empty($uid2))) || ($uid2 == $uid)) {
                // Other account status?
-               // @TODO Can this query be saved???
+               // @TODO Can this query be merged with above query?
                $result = SQL_QUERY_ESC("SELECT status FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
                        array($uid), __FILE__, __LINE__);
 
index df0c9bf5a7ba3c923b0e09521735312e61f5fb4f..4991768fdd727273061da042fc9d9d1d605775ed 100644 (file)
@@ -44,7 +44,7 @@ ADD_DESCR("admin", __FILE__);
 $INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) { 
        // Ok, we finally load the admin action module
-       include($INC);
+       require($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 37a2dbe46caa1f107ec65741ac88c315d74e6886..584cea7a8e28d3a28ad1b3d86ed243a676fc00ca 100644 (file)
@@ -44,7 +44,7 @@ ADD_DESCR("admin", __FILE__);
 $INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       include($INC);
+       require($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index cef20946e473d62fdc629c3322333b78e5cc3e4f..ff6fd6a25432b78b8d1927637deae4581a237307 100644 (file)
@@ -44,7 +44,7 @@ ADD_DESCR("admin", __FILE__);
 $INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       include($INC);
+       require($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 6c50163bf8f143fd44e455fd60f1d00330121704..6407fa2fcea909b4253d1ee5d82cdcbb5bc47f57 100644 (file)
@@ -44,7 +44,7 @@ ADD_DESCR("admin", __FILE__);
 $INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       include($INC);
+       require($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 85af60e46015bc8917bea52062bf64d243e7e6d5..c289625a17c78f1d7626074244acfba05989a0ea 100644 (file)
@@ -44,7 +44,7 @@ ADD_DESCR("admin", __FILE__);
 $INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       include($INC);
+       require($INC);
 } else {
        // "what file" not found
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
index e14a825f3240f732e49ac5b7826628469b4887e3..fa176d7b9169ce3c70273fa80b922ad46c7b33ab 100644 (file)
@@ -44,7 +44,7 @@ ADD_DESCR("admin", __FILE__);
 $INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       include($INC);
+       require($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 184d74005d882b86aea704bf2b5dac65d2af5875..10855781274cb6f2257df48fc537aa0865636185 100644 (file)
@@ -44,7 +44,7 @@ ADD_DESCR("admin", __FILE__);
 $INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       include($INC);
+       require($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index ff9a9ec376717da7e1ce9586510c2484cc9cb2b0..9fad8a10795ef7b02a633afa85c34316dc02089c 100644 (file)
@@ -44,7 +44,7 @@ ADD_DESCR("admin", __FILE__);
 $INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) { 
        // Ok, we finally load the admin action module
-       include($INC);
+       require($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index c327a28d3b3a873650f0ddd92acfa632838c0ff8..0377e5def5ae126216d7e4ff44cf2b85a2ce41e3 100644 (file)
@@ -44,7 +44,7 @@ ADD_DESCR("admin", __FILE__);
 $INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       include($INC);
+       require($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index b4aa437f93d45f421cf331c7eb2aa17353a6493b..2f261a638200969f2bbad91ec5ed80732f89e2a2 100644 (file)
@@ -44,7 +44,7 @@ ADD_DESCR("admin", __FILE__);
 $INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       include($INC);
+       require($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index fe175182451c0fe6e0dbf46ff9a56b8779440214..609fda6601257684bb36907f50b1e2333f7532ec 100644 (file)
@@ -44,7 +44,7 @@ ADD_DESCR("admin", __FILE__);
 $INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       include($INC);
+       require($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 27a2b8b4f97e0c1b36ebf83703038696c2a1ad25..438d613c70e27dc54426aa09bd90ca90728352aa 100644 (file)
@@ -44,7 +44,7 @@ ADD_DESCR("admin", __FILE__);
 $INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       include($INC);
+       require($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 8431860fe7d203e6e239adacce6ca89b18c3cdc2..b4b15bfb2f5253f6f2c680fd1a0c8965adf9eed5 100644 (file)
@@ -44,7 +44,7 @@ ADD_DESCR("admin", __FILE__);
 $INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       include($INC);
+       require($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 7f4fa85b577e165eb0fdef013d5792b6d51899da..f2549d14219732b55645c7ddf6850c0489d047d6 100644 (file)
@@ -44,7 +44,7 @@ ADD_DESCR("admin", __FILE__);
 $INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       include($INC);
+       require($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index c1b230cd9079496386cb75b1f90ad603bcce6c1c..b6f3046ae6e0abb7601a9bc00d96ea4836984472 100644 (file)
@@ -44,7 +44,7 @@ ADD_DESCR("admin", __FILE__);
 $INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       include($INC);
+       require($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index c6565fd0ede5b58655f3fb5ee19dce64e16cb911..0add6351e0d4567e51fbc6c4361dad1e00ed033a 100644 (file)
@@ -44,7 +44,7 @@ ADD_DESCR("admin", __FILE__);
 $INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       include($INC);
+       require($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 048bee24ef784c2c1258dde5ba6649e2b08b5e68..560c878404e23bd63773c77772dff0c82985fd1b 100644 (file)
@@ -44,7 +44,7 @@ ADD_DESCR("admin", __FILE__);
 $INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       include($INC);
+       require($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index f840cf94f4a9da7f580dee883fc458c4f3fee96b..fb1c52700d1969b0938d0164a9434edb78d34d63 100644 (file)
@@ -44,7 +44,7 @@ ADD_DESCR("admin", __FILE__);
 $INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       include($INC);
+       require($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 6926bd275525c73fbeafa0296cb7d535f5806e44..86ff0f2843c4180981c228e886156b2438b0fa22 100644 (file)
@@ -44,7 +44,7 @@ ADD_DESCR("admin", __FILE__);
 $INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       include($INC);
+       require($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index da666b587a76bbe1eab4e477f383efbeb8c4115e..ff29f1784cb2ea660f38512ac50a88853c3bbb5d 100644 (file)
@@ -44,7 +44,7 @@ ADD_DESCR("admin", __FILE__);
 $INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       include($INC);
+       require($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index f143558e1f4bf69df4ba3a6be69bf06a56cc8727..06b0b88efe446c5cb4868d3b663ff2e6b4f5cbf0 100644 (file)
@@ -47,7 +47,7 @@ ADD_DESCR("admin", __FILE__);
 $INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       include($INC);
+       require($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index b832d39e2a70ac34cdf2b67bc625ff22110c1870..494674dd3c13aee5776837f3b16b352593d11169 100644 (file)
@@ -44,7 +44,7 @@ ADD_DESCR("admin", __FILE__);
 $INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       include($INC);
+       require($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 08a6d3e150fdf1e3ceace9423002e8b350d4fbaf..5aaa6fdc5a784cbc2540f049a016aefd13d2c6d1 100644 (file)
@@ -44,7 +44,7 @@ ADD_DESCR("admin", __FILE__);
 $INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       include($INC);
+       require($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 3971d4304db4f04a4859ea24739106a656e1ae21..b2a3e9e1ac048784dc06e591b619a7ebb3ae605b 100644 (file)
@@ -44,7 +44,7 @@ ADD_DESCR("admin", __FILE__);
 $INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       include($INC);
+       require($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index c38971934b7010a978dca9a3e6f2180d66bcf676..46a97dfeeffe92ed6db6767e95b9811174f31022 100644 (file)
@@ -44,7 +44,7 @@ ADD_DESCR("admin", __FILE__);
 $INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
-       include($INC);
+       require($INC);
 } else {
        addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
index 95e56d6bd083f22aca29255c7a28f8a10ad9d3d1..6ee8681097e407eb937c048234186fc0ef7a2904 100644 (file)
@@ -352,7 +352,7 @@ LIMIT 1", array($act, $wht, $wht), __FILE__, __LINE__);
                $INC = sprintf("%sinc/modules/admin/action-%s.php", PATH, $act);
                if ((FILE_READABLE($INC)) && (VALIDATE_MENU_ACTION("admin", $act, $wht)) && (__ACL_ALLOW == true)) {
                        // Ok, we finally load the admin action module
-                       include($INC);
+                       require($INC);
                } elseif (__ACL_ALLOW == false) {
                        // Access denied
                        LOAD_TEMPLATE("admin_menu_failed", false, ADMIN_ACCESS_DENIED);
index a26c4d3059a64303ba732b75a4256d58a2cee260..aea6083994e492ec4d636c36cb18a8d00b84fe69 100644 (file)
@@ -75,7 +75,7 @@ function OUTPUT_STANDARD_OVERVIEW(&$result_tasks) {
                                } // END - if
                        } else {
                                // Test-drive extension in update mode
-                               include(sprintf("%sinc/extensions/ext-%s.php", PATH, $ext_name));
+                               require(sprintf("%sinc/extensions/ext-%s.php", PATH, $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 c56245e4ee4f731c51e71212d86dce776f3f9864..96c03f3e72e2abc64aaaf506101644557e6f582c 100644 (file)
@@ -54,7 +54,7 @@ if (!empty($_POST['theme'])) {
                $file = sprintf("%stheme/%s/theme.php", PATH, SQL_ESCAPE($_POST['theme']));
                if (FILE_READABLE($file)) {
                        // Load the theme header file
-                       include($file);
+                       require($file);
 
                        // Register it ith the exchange
                        SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_themes` (`theme_path`, `theme_active`, `theme_ver`, `theme_name`)
@@ -99,7 +99,7 @@ while ($dir = readdir($handle)) {
        // Test it...
        if (($dir != ".") && ($dir != "..") && (FILE_READABLE($theme))) {
                // Found a valid directory so let's load it's theme.php file
-               include($theme);
+               require($theme);
 
                // Add found theme to array
                $THEMES['theme_unix'][]   = $dir;
index bcdddce43cd21005d4500044e69e580c09ad79d0..635deeee7626959b924f66b89c13e91babc8babd 100644 (file)
@@ -37,9 +37,8 @@ if (!defined('__SECURITY')) {
        require($INC);
 }
 
-// @TODO Replace with own template!
-OPEN_TABLE("500", "guest_login_header dashed", "center");
-OUTPUT_HTML("<br /><strong>".VALIDATING_LOGIN."</strong><br />");
+// Initial message part
+$MSG = "<strong>{!VALIDATING_LOGIN!}</strong>";
 
 if (!empty($GLOBALS['userid']) && (isSessionVariableSet('u_hash'))) {
        // Login failtures are supported since 0.4.7
@@ -95,25 +94,25 @@ LIMIT 1",
 
        if (($bonus) && ($_GET['mode'] == "bonus") && (EXT_IS_ACTIVE("bonus"))) {
                // Output message with added points
-               OUTPUT_HTML("<font class=\"tiny\">
-  ".BONUS_LOGIN_BONUS_ADDED_1."
-  <strong>".TRANSLATE_COMMA(getConfig('login_bonus'))." ".POINTS."</strong>
-  ".BONUS_LOGIN_BONUS_ADDED_2."
-</font>");
+               $MSG .= "<div class=\"tiny\">
+  {!BONUS_LOGIN_BONUS_ADDED_1!}
+  <strong>".TRANSLATE_COMMA(getConfig('login_bonus'))." {!POINTS!}</strong>
+  {!BONUS_LOGIN_BONUS_ADDED_2!}
+</div>";
        } elseif (EXT_IS_ACTIVE("bonus")) {
                // No login bonus added!
-               OUTPUT_HTML("<font class=\"member_failed\">".BONUS_LOGIN_BONUS_NOT_ADDED."</font>");
+               $MSG .= "<div class=\"member_failed\">{!BONUS_LOGIN_BONUS_NOT_ADDED!}</div>";
        }
 
        // Redirect to member area
-       LOAD_TEMPLATE("member_login_js");
+       $MSG .= LOAD_TEMPLATE("member_login_js", true);
 } else {
        // Login failed!
-       LOAD_TEMPLATE("login_failed_js");
+       $MSG .= LOAD_TEMPLATE("login_failed_js", true);
 }
 
-// Close table
-CLOSE_TABLE();
+// Output final message
+LOAD_TEMPLATE("admin_settings_saved", false, $MSG);
 
 //
 ?>
index a1eb5eb9e4e5480769298ec5bed094bf13521a57..064128799cde85876a331788236810aaeb3e4102 100644 (file)
@@ -50,7 +50,7 @@ ADD_DESCR("guest", __FILE__);
 $INC = sprintf(PATH."inc/modules/guest/what-%s.php", $GLOBALS['what']);
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the guest action module
-       include($INC);
+       require($INC);
 } elseif ($IS_VALID) {
        addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
 } else {
index 5d3416a663a1b3f7c7f6bf06abf0e66bfaf0ab09..39c8bbb899d9a4bfc470a7ffbab4986787ef63c4 100644 (file)
@@ -44,7 +44,7 @@ if (!defined('__SECURITY')) {
 $INC = sprintf("%sinc/modules/guest/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the guest action module
-       include($INC);
+       require($INC);
 } elseif ($IS_VALID) {
        addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
 } else {
index c24c213ab93f9ed0a52954719f5caa2a3bd63417..214fadddc68a2cc379911d4382d380cc12b6c547 100644 (file)
@@ -47,7 +47,7 @@ ADD_DESCR("guest", __FILE__);
 $INC = sprintf("%sinc/modules/guest/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the guest action module
-       include($INC);
+       require($INC);
 } elseif ($IS_VALID) {
        addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
 } else {
index 323eea8bf1aa0bdefc053dcc51996c20a902cbee..30b6a5230965d694a1bb9a752506221b786084f4 100644 (file)
@@ -49,7 +49,7 @@ ADD_DESCR("guest", __FILE__);
 $INC = sprintf("%sinc/modules/guest/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the guest action module
-       include($INC);
+       require($INC);
 } elseif ($IS_VALID) {
        addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
 } else {
index fdb3590d3447f9fae5983e5cc858bab739fbbbf4..7fcb665657897a4e9dcea8737a76602251da7105 100644 (file)
@@ -52,7 +52,7 @@ ADD_DESCR("member", __FILE__);
 $INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC_WHAT)) {
        // Ok, we finally load the member action module
-       include_once($INC_WHAT);
+       require($INC_WHAT);
 } else {
        addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
 }
index 8f169ece400f85e0256114fa2c9f9aa5019dc1d2..538709a7cbd77e9ac603904e48729e0202fcb0d0 100644 (file)
@@ -49,7 +49,7 @@ ADD_DESCR("member", __FILE__);
 $INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC_WHAT)) {
        // Ok, we finally load the member action module
-       include_once($INC_WHAT);
+       require($INC_WHAT);
 } else {
        addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
 }
index b3fd7f4e0ca945031cbfd6de0968662b9ebd2511..b641a2cf45e650f2a2bb8f76e0c6573d293c3526 100644 (file)
@@ -52,7 +52,7 @@ ADD_DESCR("member", __FILE__);
 $INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC_WHAT)) {
        // Ok, we finally load the member action module
-       include_once($INC_WHAT);
+       require($INC_WHAT);
 } else {
        addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
 }
index 0badee216ad7c943884335b060be47a3f883d75b..ffef8c9ffe60861a879b1ff027c660236bc9a7a7 100644 (file)
@@ -49,7 +49,7 @@ ADD_DESCR("member", __FILE__);
 $INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC_WHAT)) {
        // Ok, we finally load the member action module
-       include_once($INC_WHAT);
+       require($INC_WHAT);
 } else {
        addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
 }
index 74945d10ee16cd1b6996a266dcb1c269412dd5d0..557c54c2bfb09e2eb10dbde1cfb20af247c85f4b 100644 (file)
@@ -49,7 +49,7 @@ ADD_DESCR("member", __FILE__);
 $INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC_WHAT)) {
        // Ok, we finally load the member action module
-       include_once($INC_WHAT);
+       require($INC_WHAT);
 } else {
        addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
 }
index e280b75340b9a9ead4f23345cd2854fb94dd99f0..27bd965b3c08fe9e539fc7974403516cc1da15e3 100644 (file)
@@ -49,7 +49,7 @@ ADD_DESCR("member", __FILE__);
 $INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC_WHAT)) {
        // Ok, we finally load the member action module
-       include_once($INC_WHAT);
+       require($INC_WHAT);
 } else {
        addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
 }
index 6c327f2568a7775ee91377aeb37cae1f84c6b89f..d8455dc7ad65af639eb794ad67b6706b47b31d24 100644 (file)
@@ -52,7 +52,7 @@ ADD_DESCR("member", __FILE__);
 $INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC_WHAT)) {
        // Ok, we finally load the member action module
-       include_once($INC_WHAT);
+       require($INC_WHAT);
 } else {
        addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
 }
index b562617d6ed5749a491615dca62f8cf05166c954..df0838f2059e34c5b954eee73b06bc43f62f197e 100644 (file)
@@ -49,7 +49,7 @@ ADD_DESCR("member", __FILE__);
 $INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC_WHAT)) {
        // Ok, we finally load the member action module
-       include_once($INC_WHAT);
+       require($INC_WHAT);
 } else {
        addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
 }
index bd22b44803fed60dff75a7f63377115c8e12f995..284de3b7c38b31d0911f68c937efa8d1e3603750 100644 (file)
@@ -49,7 +49,7 @@ ADD_DESCR("member", __FILE__);
 $INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC_WHAT)) {
        // Ok, we finally load the member action module
-       include_once($INC_WHAT);
+       require($INC_WHAT);
 } else {
        addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
 }
index 4cfdee58118e763976c6a29e40d291f9930065b6..c2090cdf441cb5dd74a79bed312b92d183754594 100644 (file)
@@ -52,7 +52,7 @@ ADD_DESCR("member", __FILE__);
 $INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC_WHAT)) {
        // Ok, we finally load the member action module
-       include_once($INC_WHAT);
+       require($INC_WHAT);
 } else {
        addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
 }
index 0fbc6c94c67330dda9c56ebeba87e252c4927331..7d027cb34ccc284f360a1b23c352cd8353b6c7db 100644 (file)
@@ -78,7 +78,7 @@ while ($entry = readdir($handle)) {
 
        if (($entry != ".") && ($entry != "..") && (FILE_READABLE($theme)) && (THEME_IS_ACTIVE($entry))) {
                // Found a valid directory so let's load it's theme.php file
-               include($theme);
+               require($theme);
 
                // Add found theme to array
                $THEMES['theme_unix'][]   = $entry;
index 2caef50a738ec7f305d413af27360f33f14bdac3..ef247614edc166e47acd83f2935969433e190deb 100644 (file)
@@ -70,9 +70,8 @@ function __errorHandler ($errno, $errstr, $errfile, $errline) {
 
        // Output message to user and die
        if (EXT_IS_ACTIVE("debug")) {
-               // Debug extension found! :-)
-               // @TODO Can this be rewritten to mxchange_die() ?
-               die("Error message written to debug.log. Please try to call <a href=\"".URL."\">the main page</a> to continue.");
+               // Debug extension found! So Output a small message
+               mxchange_die("Error message written to debug.log. Please try to call <a href=\"".URL."\">the main page</a> to continue.");
        } else {
                // No debug extension found
                // @TODO Find a way to rewrite debug_print_backtrace() so we can maybe
@@ -128,6 +127,10 @@ $_CONFIG = array(
        'last_update' => time()
 );
 
+// Init important $header variable
+global $header;
+$header = 0;
+
 // Init fatal messages
 global $FATAL;
 $FATAL = array();
index 7ef2fa027e34d4425e28c6221c01ca19982d9cb9..06a0dd7139e9a62f9f474d154f083c8e1cb6c7c9 100644 (file)
@@ -55,7 +55,7 @@ if (!EXT_IS_ACTIVE("bonus")) {
 // List only rankings when script is installed
 if (isBooleanConstantAndTrue('mxchange_installed')) {
        // Include header
-       include(PATH."inc/header.php");
+       require(PATH."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
-       include(PATH."inc/footer.php");
+       require(PATH."inc/footer.php");
 } else {
        // You have to install first!
        LOAD_URL("install.php");