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 6ec8545..23c81d7 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 1917cee..368716c 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 f328e42..3cf72bb 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 5001bc3..d8735f6 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 a59e17b..7be85ad 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 9a7b05f..84dcbd0 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 de39d07..4f55bb8 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 40a3a80..e262bfa 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 a537961..c04dd24 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 1b8056b..f5774c6 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 38b9cc5..7592bbc 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 df0c9bf..4991768 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 37a2dbe..584cea7 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 cef2094..ff6fd6a 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 6c50163..6407fa2 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 85af60e..c289625 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 e14a825..fa176d7 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 184d740..1085578 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 ff9a9ec..9fad8a1 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 c327a28..0377e5d 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 b4aa437..2f261a6 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 fe17518..609fda6 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 27a2b8b..438d613 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 8431860..b4b15bf 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 7f4fa85..f2549d1 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 c1b230c..b6f3046 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 c6565fd..0add635 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 048bee2..560c878 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 f840cf9..fb1c527 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 6926bd2..86ff0f2 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 da666b5..ff29f17 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 f143558..06b0b88 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 b832d39..494674d 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 08a6d3e..5aaa6fd 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 3971d43..b2a3e9e 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 c389719..46a97df 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 95e56d6..6ee8681 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 a26c4d3..aea6083 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 c56245e..96c03f3 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 bcdddce..635deee 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 a1eb5eb..0641287 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 5d3416a..39c8bbb 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 c24c213..214fadd 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 323eea8..30b6a52 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 fdb3590..7fcb665 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 8f169ec..538709a 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 b3fd7f4..b641a2c 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 0badee2..ffef8c9 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 74945d1..557c54c 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 e280b75..27bd965 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 6c327f2..d8455dc 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 b562617..df0838f 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 bd22b44..284de3b 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 4cfdee5..c2090cd 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 0fbc6c9..7d027cb 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 2caef50..ef24761 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 7ef2fa0..06a0dd7 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");