- Concept of a safe for collected points added
authorRoland Häder <roland@mxchange.org>
Sun, 14 Sep 2008 21:34:38 +0000 (21:34 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 14 Sep 2008 21:34:38 +0000 (21:34 +0000)
- Loading of configuration (see function LOAD_CONFIG()) rewritten

31 files changed:
.gitattributes
inc/databases.php
inc/extensions/ext-
inc/extensions/ext-active.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-holiday.php
inc/extensions/ext-maintenance.php
inc/extensions/ext-mediadata.php
inc/extensions/ext-newsletter.php
inc/extensions/ext-nickname.php
inc/extensions/ext-order.php
inc/extensions/ext-other.php
inc/extensions/ext-primera.php
inc/extensions/ext-register.php
inc/extensions/ext-rewrite.php
inc/extensions/ext-safe.php [new file with mode: 0644]
inc/extensions/ext-sponsor.php
inc/extensions/ext-sql_patches.php
inc/extensions/ext-surfbar.php
inc/extensions/ext-top10.php
inc/extensions/ext-transfer.php
inc/extensions/ext-user.php
inc/extensions/ext-wernis.php
inc/extensions/ext-yoomedia.php
inc/mysql-connect.php
templates/de/html/ext/ext_safe.tpl [new file with mode: 0644]

index 05e0196..e73e21b 100644 (file)
@@ -129,6 +129,7 @@ inc/extensions/ext-rallye.php -text
 inc/extensions/ext-register.php -text
 inc/extensions/ext-repair.php -text
 inc/extensions/ext-rewrite.php -text
+inc/extensions/ext-safe.php -text
 inc/extensions/ext-sponsor.php -text
 inc/extensions/ext-sql_patches.php -text
 inc/extensions/ext-support.php -text
@@ -1133,6 +1134,7 @@ templates/de/html/ext/ext_rallye.tpl -text
 templates/de/html/ext/ext_register.tpl -text
 templates/de/html/ext/ext_repair.tpl -text
 templates/de/html/ext/ext_rewrite.tpl -text
+templates/de/html/ext/ext_safe.tpl -text
 templates/de/html/ext/ext_sponsor.tpl -text
 templates/de/html/ext/ext_sql_patches.tpl -text
 templates/de/html/ext/ext_support.tpl -text
index 5eeb978..66cd2d0 100644 (file)
@@ -114,7 +114,7 @@ define('USAGE_BASE', "usage");
 define('SERVER_URL', "http://www.mxchange.org");
 
 // This current patch level
-define('CURR_SVN_REVISION', "327");
+define('CURR_SVN_REVISION', "328");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
index 3b7509a..ebada93 100644 (file)
@@ -81,8 +81,6 @@ case "update": // Update an extension
        break;
 
 default: // Do stuff when extension is loaded
-       $dummy = LOAD_CONFIG();
-       unset($dummy);
        break;
 }
 
index 4784944..7ede8af 100644 (file)
@@ -122,11 +122,9 @@ case "update": // Update an extension
        break;
 
 default: // Do stuff when extension is loaded
-       $dummy = LOAD_CONFIG();
-       $_CONFIG = merge_array($_CONFIG, $dummy);
-       unset($dummy);
        break;
 }
+
 // Language file prefix
 $EXT_LANG_PREFIX = "active";
 
index d029ba5..6a8ee9d 100644 (file)
@@ -252,10 +252,6 @@ case "update": // Update an extension
        break;
 
 default: // Do stuff when extension is loaded
-       $dummy = LOAD_CONFIG();
-       $_CONFIG = merge_array($_CONFIG, $dummy);
-       unset($dummy);
-
        // Do we have a daily-reset-run?
        if (isBooleanConstantAndTrue('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1))
        {
@@ -264,6 +260,7 @@ default: // Do stuff when extension is loaded
        }
        break;
 }
+
 // Language file prefix
 $EXT_LANG_PREFIX = "autopurge";
 
index 310d5cf..d9d4a9a 100644 (file)
@@ -253,10 +253,6 @@ case "update": // Update an extension
        break;
 
 default: // Do stuff when extension is loaded
-       $dummy = LOAD_CONFIG();
-       $_CONFIG = merge_array($_CONFIG, $dummy);
-       unset($dummy);
-
        // Remove old entries
        $OLD = $_CONFIG['beg_timeout'];
        if ($_CONFIG['beg_uid_timeout'] > $OLD) $OLD = $_CONFIG['beg_uid_timeout'];
index 48008a6..8cbf2b9 100644 (file)
@@ -192,14 +192,6 @@ CHANGE `birth_year` `birth_year` SMALLINT(4) UNSIGNED ZEROFILL NOT NULL DEFAULT
        break;
 
 default: // Do stuff when extension is loaded
-       $dummy = LOAD_CONFIG();
-
-       // Copy config to main array
-       $_CONFIG = merge_array($_CONFIG, $dummy);
-
-       // Save some RAM...
-       unset($dummy);
-
        if ((isBooleanConstantAndTrue('__DAILY_RESET')) && ($_CONFIG['birthday_points'] > 0)) {
                // Daily reset was run and we shall pay points so we start checking for members who
                // has a birthday for today
index c3db49d..7adaf2f 100644 (file)
@@ -531,10 +531,6 @@ WHERE last_online < ".$mark." ORDER BY userid";
        break;
 
 default: // Do stuff when extension is loaded
-       $dummy = LOAD_CONFIG();
-       $_CONFIG = merge_array($_CONFIG, $dummy);
-       unset($dummy);
-
        if (isBooleanConstantAndTrue('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1))
        {
                // Daily reset was run so let's check if active rallye is activated
index 6ce6c3f..4df414f 100644 (file)
@@ -184,13 +184,8 @@ case "update": // Update an extension
        break;
 
 default: // Do stuff when extension is loaded
-       $dummy = LOAD_CONFIG();
-       $_CONFIG = merge_array($_CONFIG, $dummy);
-       unset($dummy);
-
        // Create instance on class
-       if ($cacheMode != "init")
-       {
+       if ($cacheMode != "init") {
                // Initialize cache system only when it's needed
                $cacheInstance = new mxchange_cache($_CONFIG['cache_update'], PATH."inc/".$_CONFIG['cache_path'], $_CONFIG['cache_tested']);
                if ($cacheInstance->ret != "done")
@@ -201,6 +196,7 @@ default: // Do stuff when extension is loaded
        }
        break;
 }
+
 // Language file prefix
 $EXT_LANG_PREFIX = "cache";
 
index afb8f39..2a4f261 100644 (file)
@@ -236,10 +236,6 @@ case "update": // Update an extension
        break;
 
 default: // Do stuff when extension is loaded
-       $dummy = LOAD_CONFIG();
-       $_CONFIG = merge_array($_CONFIG, $dummy);
-       unset($dummy);
-
        if ((isBooleanConstantAndTrue('__DAILY_RESET')) && ($_CONFIG['doubler_send_mode'] == "RESET")) {
                // So let's check for points
                $INC_POOL[] = sprintf("%sinc/doubler_send.php", PATH);
index 9387596..30c04ad 100644 (file)
@@ -224,9 +224,6 @@ case "update": // Update an extension
        break;
 
 default: // Do stuff when extension is loaded
-       $dummy = LOAD_CONFIG();
-       $_CONFIG = merge_array($_CONFIG, $dummy);
-       unset($dummy);
        break;
 }
 
index c03dc6e..6609192 100644 (file)
@@ -106,11 +106,9 @@ case "update": // Update an extension
        break;
 
 default: // Do stuff when extension is loaded
-       $dummy = LOAD_CONFIG();
-       $_CONFIG = merge_array($_CONFIG, $dummy);
-       unset($dummy);
        break;
 }
+
 // Language file prefix
 $EXT_LANG_PREFIX = "maintenance";
 
index 7c0aebd..d28a087 100644 (file)
@@ -129,9 +129,6 @@ Bitte stellen Sie diesen derzeit manuell unter <A href=\"".URL."/modules.php?mod
        break;
 
 default: // Do stuff when extension is loaded
-       $dummy = LOAD_CONFIG();
-       $_CONFIG = merge_array($_CONFIG, $dummy);
-       unset($dummy);
        break;
 }
 
index f82a498..04ab4c2 100644 (file)
@@ -148,10 +148,6 @@ case "update": // Update an extension
        break;
 
 default: // Do stuff when extension is loaded
-       $dummy = LOAD_CONFIG();
-       $_CONFIG = merge_array($_CONFIG, $dummy);
-       unset($dummy);
-
        // URL ends which are used to indentify the end of an URL or email link
        // Don't use these chars in links... ;-)
        //
index ce6a707..a174948 100644 (file)
@@ -199,6 +199,7 @@ PRIMARY KEY(id)
        break;
 
 default: // Do stuff when extension is loaded
+       // DEPRECATED WAY - PLEASE REWRITE IT
        $dummy = LOAD_CONFIG();
        define('__NICKNAME_LANG_CHARS', $dummy['nickname_chars']);
        define('__NICKNAME_LENGTH'    , $dummy['nickname_len']);
@@ -206,6 +207,7 @@ default: // Do stuff when extension is loaded
        unset($dummy);
        break;
 }
+
 // Language file prefix
 $EXT_LANG_PREFIX = "nickname";
 
index 077e192..8c72e86 100644 (file)
@@ -303,10 +303,6 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us
        break;
 
 default: // Do stuff when extension is loaded
-       $dummy = LOAD_CONFIG();
-       $_CONFIG = merge_array($_CONFIG, $dummy);
-       unset($dummy);
-
        // Do daily reset only when installed and extension version is at least 0.1.1
        if ((isBooleanConstantAndTrue('__DAILY_RESET')) && (isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('admin_registered')) && (GET_EXT_VERSION("order") >= "0.1.1"))
        {
@@ -315,6 +311,7 @@ default: // Do stuff when extension is loaded
        }
        break;
 }
+
 // Language file prefix
 $EXT_LANG_PREFIX = "order";
 
index 2b65819..1c7fc2b 100644 (file)
@@ -192,14 +192,9 @@ case "update": // Update an extension
        break;
 
 default: // Do stuff when extension is loaded
-       $dummy = LOAD_CONFIG();
-       $_CONFIG['max_comma']                           = $dummy['max_comma'];  // Maximum numbers behind commata
-       $_CONFIG['reject_url']                          = $dummy['reject_url']; // Default rejection URL
-       $_CONFIG['mailid_error_redirect']       = $dummy['mailid_error_redirect']; // Default rejection URL
-       define('__CURRENCY', $dummy['currency']);     // This is the currency for fees! They shall normally remain in real money currencies...
-       unset($dummy);
        break;
 }
+
 // Language file prefix
 $EXT_LANG_PREFIX = "other";
 
index 4995184..631f96e 100644 (file)
@@ -111,11 +111,9 @@ case "update": // Update an extension
        break;
 
 default: // Do stuff when extension is loaded
-       $dummy = LOAD_CONFIG();
-       $_CONFIG = merge_array($_CONFIG, $dummy);
-       unset($dummy);
        break;
 }
+
 // Language file prefix
 $EXT_LANG_PREFIX = "primera";
 
index 7bcce2a..1d510b7 100644 (file)
@@ -323,9 +323,6 @@ PRIMARY KEY(id)
        break;
 
 default: // Do stuff when extension is loaded
-       $dummy = LOAD_CONFIG();
-       $_CONFIG = merge_array($_CONFIG, $dummy);
-       unset($dummy);
        break;
 }
 
index 5328c1d..28c623a 100644 (file)
@@ -136,11 +136,9 @@ case "update": // Update an extension
        break;
 
 default: // Do stuff when extension is loaded
-       $dummy = LOAD_CONFIG();
-       $_CONFIG = merge_array($_CONFIG, $dummy);
-       unset($dummy);
        break;
 }
+
 // Language file prefix
 $EXT_LANG_PREFIX = "rewrite";
 
diff --git a/inc/extensions/ext-safe.php b/inc/extensions/ext-safe.php
new file mode 100644 (file)
index 0000000..8fb3f79
--- /dev/null
@@ -0,0 +1,94 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 09/14/2008 *
+ * ================                             Last change: 09/14/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : ext-safe.php                                     *
+ * -------------------------------------------------------------------- *
+ * Short description : A safe for storing points on a "safe" place      *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Ein Tresor zum Ablegen der Punkte an einem       *
+ *                     sicheren Ort                                     *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF']))) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Version number
+$EXT_VERSION = "0.0";
+
+// Auto-set extension version
+if (empty($EXT_VER)) $EXT_VER = $EXT_VERSION;
+
+// Version history array (add more with , "0.1" and so on)
+$EXT_VER_HISTORY = array("0.0");
+
+switch ($EXT_LOAD_MODE)
+{
+case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+       // SQL commands to run
+
+       // Load CSS file?
+       $EXT_CSS = 'Y';
+       break;
+
+case "remove": // Do stuff when removing extension
+       // SQL commands to run
+       break;
+
+case "activate": // Do stuff when admin activates this extension
+       // SQL commands to run
+       break;
+
+case "deactivate": // Do stuff when admin deactivates this extension
+       // SQL commands to run
+       break;
+
+case "update": // Update an extension
+       switch ($EXT_VER)
+       {
+       case "0.0.1": // SQL queries for v0.0.1
+               $SQLs[] = "";
+
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "";
+               break;
+       }
+       break;
+
+default: // Do stuff when extension is loaded
+       break;
+}
+
+// Language file prefix
+$EXT_LANG_PREFIX = "safe";
+
+// Extension is always active?
+$EXT_ALWAYS_ACTIVE = 'N';
+
+//
+?>
index 75d8583..35abe65 100644 (file)
@@ -427,9 +427,6 @@ case "update": // Update an extension
        break;
 
 default: // Do stuff when extension is loaded
-       $dummy = LOAD_CONFIG();
-       $_CONFIG = merge_array($_CONFIG, $dummy);
-       unset($dummy);
        break;
 }
 
index c387d98..2ed851d 100644 (file)
@@ -577,13 +577,9 @@ PRIMARY KEY (id)
        break;
 
 default: // Do stuff when extension is loaded
-       $dummy = LOAD_CONFIG();
-
        // When the sql_patches is not installed we cannot load it's configuration... *sigh*
        if (GET_EXT_VERSION("sql_patches") != '') {
                $_CONFIG['secret_key']        = "";
-               //die("<pre>".print_r($dummy, true)."</pre>");
-               $_CONFIG = merge_array($_CONFIG, $dummy);
 
                // Read key from secret file
                if ((empty($_CONFIG['file_hash'])) || (empty($_CONFIG['master_salt'])) || (empty($_CONFIG['pass_scramble']))) {
@@ -613,11 +609,11 @@ default: // Do stuff when extension is loaded
                } // END - if
 
                // Transfer words/numbers to constants
-               define('POINTS'  , $dummy['points_word']);
-               define('MT_WORD' , $dummy['mt_word']);
-               define('MT_WORD2', $dummy['mt_word2']);
-               define('MT_WORD3', $dummy['mt_word3']);
-               define('_MAX'    , $dummy['rand_no']);
+               define('POINTS'  , $_CONFIG['points_word']);
+               define('MT_WORD' , $_CONFIG['mt_word']);
+               define('MT_WORD2', $_CONFIG['mt_word2']);
+               define('MT_WORD3', $_CONFIG['mt_word3']);
+               define('_MAX'    , $_CONFIG['rand_no']);
        } else {
                // Set some lame ;-) default settings
                $_CONFIG['def_refid'] = 0;
@@ -629,9 +625,6 @@ default: // Do stuff when extension is loaded
                define('MT_WORD2', DEFAULT_MT_WORD2);
                define('POINTS'  , DEFAULT_POINTS);
        }
-
-       // Remove dummy config array
-       unset($dummy);
        break;
 }
 
index 6151ba4..0376697 100644 (file)
@@ -171,9 +171,6 @@ case "update": // Update an extension
        break;
 
 default: // Do stuff when extension is loaded
-       $dummy = LOAD_CONFIG();
-       $_CONFIG = merge_array($_CONFIG, $dummy);
-       unset($dummy);
        break;
 }
 
index c764d09..0ec4802 100644 (file)
@@ -142,9 +142,6 @@ case "update": // Update an extension
        break;
 
 default: // Do stuff when extension is loaded
-       $dummy = LOAD_CONFIG();
-       $_CONFIG = merge_array($_CONFIG, $dummy);
-       unset($dummy);
        break;
 }
 
index 3d7905d..907583a 100644 (file)
@@ -283,17 +283,13 @@ case "update": // Update an extension
        break;
 
 default: // Do stuff when extension is loaded
-       $dummy = LOAD_CONFIG();
-       $_CONFIG = merge_array($_CONFIG, $dummy);
-       unset($dummy);
-
-       if ((isBooleanConstantAndTrue('__DAILY_RESET')) && ($_CONFIG['ap_transfer'] == "Y"))
-       {
+       if ((isBooleanConstantAndTrue('__DAILY_RESET')) && ($_CONFIG['ap_transfer'] == "Y")) {
                // Automatically remove outdated or not displayed transactions
                TRANSFER_AUTPPURGE($_CONFIG['transfer_max'], $_CONFIG['transfer_age']);
        }
        break;
 }
+
 // Language file prefix
 $EXT_LANG_PREFIX = "transfer";
 
index c10a346..3aa099c 100644 (file)
@@ -214,11 +214,9 @@ case "update": // Update an extension
        break;
 
 default: // Do stuff when extension is loaded
-       $dummy = LOAD_CONFIG();
-       $_CONFIG = merge_array($_CONFIG, $dummy);
-       unset($dummy);
        break;
 }
+
 // Language file prefix
 $EXT_LANG_PREFIX = "user";
 
index 24634ea..e1f5bdd 100644 (file)
@@ -126,11 +126,9 @@ case "update": // Update an extension
        break;
 
 default: // Do stuff when extension is loaded
-       $dummy = LOAD_CONFIG();
-       $_CONFIG = merge_array($_CONFIG, $dummy);
-       unset($dummy);
        break;
 }
+
 // Language file prefix
 $EXT_LANG_PREFIX = "wernis";
 
index 93461af..6dc9287 100644 (file)
@@ -80,8 +80,6 @@ case "update": // Update an extension
        break;
 
 default: // Do stuff when extension is loaded
-       $dummy = LOAD_CONFIG();
-       unset($dummy);
        break;
 }
 
index 1f2fefc..5773707 100644 (file)
@@ -95,103 +95,76 @@ if ((!isBooleanConstantAndTrue('mxchange_installing')) && (isBooleanConstantAndT
                                require_once(PATH."inc/mysql-manager.php"); // Functions which interact with the database
 
                                // Load configuration stuff
-                               $result = SQL_QUERY("SELECT pass_len, points_register, points_ref, least_cats, check_double_email, check_double_pass, admin_notify, url_tlock, test_text, max_tlength, test_subj, autosend_active, max_send, url_blacklist, auto_purge, auto_purge_active, last_update, unconfirmed, profile_lock, online_timeout, mad_timestamp, mad_count, profile_update, send_prof_update, resend_profile_update, code_length, patch_level, patch_ctime, guest_stats, ref_payout, activate_xchange, order_multi_page, display_refid, ip_timeout, allow_direct_pay, config
-FROM "._MYSQL_PREFIX."_config
-WHERE config=0
-LIMIT 1", __FILE__, __LINE__);
-
-                               if (SQL_NUMROWS($result) == 1) {
-                                       // Load data when previous SQL query did not fail
-                                       if (!is_resource($result)) {
-                                               // Something went wrong
-                                               ADD_FATAL(FATAL_CANNOT_LOAD_CONFIG);
-                                               return;
-                                       } // END - if
-
-                                       // Load the configuration
-                                       $_CONFIG = array_merge($_CONFIG, SQL_FETCHARRAY($result));
-
-                                       // Initialize include-file-pool
-                                       $INC_POOL = array();
-
-                                       // Load "databases" aka static arrays
-                                       require_once(PATH."inc/databases.php");
-
-                                       // Loading patching system is required here...
-                                       require_once(PATH."inc/patch-system.php"); // Initialize patch system
-
-                                       // Functions which are related to themes
-                                       require_once(PATH."inc/theme-manager.php");
-
-                                       // Run daily reset
-                                       require_once(PATH."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");
-                                       } // END - if
-
-                                       // Get all values
-                                       if (($CSS != 1) && ($CSS != -1)) {
-                                               if (empty($GLOBALS['module']))  $GLOBALS['module'] = "empty";
-                                               if (empty($GLOBALS['what']))    $GLOBALS['what']   = GET_WHAT($GLOBALS['module']);
-                                               if (empty($GLOBALS['action']))  $GLOBALS['action'] = GET_ACTION($GLOBALS['module'], $GLOBALS['what']);
-                                       } else {
-                                               // Set action/what to empty
-                                               $GLOBALS['action'] = "";
-                                               $GLOBALS['what']   = "";
-                                       }
+                               $_CONFIG = LOAD_CONFIG();
+
+                               // Initialize include-file-pool
+                               $INC_POOL = array();
+
+                               // Load "databases" aka static arrays
+                               require_once(PATH."inc/databases.php");
+
+                               // Loading patching system is required here...
+                               require_once(PATH."inc/patch-system.php"); // Initialize patch system
+
+                               // Functions which are related to themes
+                               require_once(PATH."inc/theme-manager.php");
+
+                               // Run daily reset
+                               require_once(PATH."inc/check-reset.php");
 
-                                       // Secure and validate user ID from cookie
-                                       UPDATE_LOGIN_DATA();
-
-                                       // Update online list
-                                       UPDATE_ONLINE_LIST($PHPSESSID, $GLOBALS['module'], $GLOBALS['action'], $GLOBALS['what']);
-
-                                       // Load theme name
-                                       $currTheme = GET_CURR_THEME();
-
-                                       // Set default 'what' value
-                                       //* DEBUG */ echo "-".$GLOBALS['module']."/".$GLOBALS['what']."-<br />\n";
-                                       if ((empty($GLOBALS['what'])) && (empty($GLOBALS['action'])) && ($CSS != 1) && ($CSS != -1)) {
-                                               if ($GLOBALS['module'] == "admin") {
-                                                       // Set 'action' value to 'login' in admin menu
-                                                       $GLOBALS['action'] = GET_ACTION($GLOBALS['module'], $GLOBALS['what']);
-                                               } elseif (($GLOBALS['module'] == "index") || ($GLOBALS['module'] == "login")) {
-                                                       // Set 'what' value to 'welcome' in guest and member menu
-                                                       $GLOBALS['what'] = "welcome";
-                                                       if (!empty($_CONFIG['index_home'])) $GLOBALS['what'] = $_CONFIG['index_home'];
-                                               } else {
-                                                       // Anything else like begging link
-                                                       $GLOBALS['what'] = "";
-                                               }
-                                       } // END - if
-
-                                       // Update sending pool
-                                       if (($CSS != "1") && ($CSS != "-1")) require_once(PATH."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
-                                       $dummy = CHECK_MODULE($GLOBALS['module']);
-                                       if ($dummy == "done") COUNT_MODULE($GLOBALS['module']);
-                                       unset($dummy);
-
-                                       // Shall we activate the exchange?
-                                       if ($_CONFIG['activate_xchange'] > 0) activateExchange();
+                               // Load admin include file if he is admin
+                               if (IS_ADMIN()) {
+                                       // Administrative functions
+                                       require_once(PATH."inc/modules/admin/admin-inc.php");
+                               } // END - if
+
+                               // Get all values
+                               if (($CSS != 1) && ($CSS != -1)) {
+                                       if (empty($GLOBALS['module']))  $GLOBALS['module'] = "empty";
+                                       if (empty($GLOBALS['what']))    $GLOBALS['what']   = GET_WHAT($GLOBALS['module']);
+                                       if (empty($GLOBALS['action']))  $GLOBALS['action'] = GET_ACTION($GLOBALS['module'], $GLOBALS['what']);
                                } else {
-                                       // If you will read following error message you probably need to contact me (webmaster@mxchange.org)
-                                       // and download the sql-upgrades extension from my server. Please ask me which SQL file(s) you need to
-                                       // import *BEFORE* you import them!
-                                       ADD_FATAL(FATAL_CANNOT_LOAD_CONFIG);
-
-                                       // Reset link and db here, close database first
-                                       SQL_CLOSE($link, __FILE__, __LINE__);
-                                       $link = false; $db = false;
+                                       // Set action/what to empty
+                                       $GLOBALS['action'] = "";
+                                       $GLOBALS['what']   = "";
                                }
 
-                               // Free memory
-                               SQL_FREERESULT($result);
+                               // Secure and validate user ID from cookie
+                               UPDATE_LOGIN_DATA();
+
+                               // Update online list
+                               UPDATE_ONLINE_LIST($PHPSESSID, $GLOBALS['module'], $GLOBALS['action'], $GLOBALS['what']);
+
+                               // Load theme name
+                               $currTheme = GET_CURR_THEME();
+
+                               // Set default 'what' value
+                               //* DEBUG */ echo "-".$GLOBALS['module']."/".$GLOBALS['what']."-<br />\n";
+                               if ((empty($GLOBALS['what'])) && (empty($GLOBALS['action'])) && ($CSS != 1) && ($CSS != -1)) {
+                                       if ($GLOBALS['module'] == "admin") {
+                                               // Set 'action' value to 'login' in admin menu
+                                               $GLOBALS['action'] = GET_ACTION($GLOBALS['module'], $GLOBALS['what']);
+                                       } elseif (($GLOBALS['module'] == "index") || ($GLOBALS['module'] == "login")) {
+                                               // Set 'what' value to 'welcome' in guest and member menu
+                                               $GLOBALS['what'] = "welcome";
+                                               if (!empty($_CONFIG['index_home'])) $GLOBALS['what'] = $_CONFIG['index_home'];
+                                       } else {
+                                               // Anything else like begging link
+                                               $GLOBALS['what'] = "";
+                                       }
+                               } // END - if
+
+                               // Update sending pool
+                               if (($CSS != "1") && ($CSS != "-1")) require_once(PATH."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
+                               $dummy = CHECK_MODULE($GLOBALS['module']);
+                               if ($dummy == "done") COUNT_MODULE($GLOBALS['module']);
+                               unset($dummy);
+
+                               // Shall we activate the exchange?
+                               if ($_CONFIG['activate_xchange'] > 0) activateExchange();
 
                                // Generate random number
                                if (isset($GLOBALS['userid'])) {
diff --git a/templates/de/html/ext/ext_safe.tpl b/templates/de/html/ext/ext_safe.tpl
new file mode 100644 (file)
index 0000000..b999cdb
--- /dev/null
@@ -0,0 +1,13 @@
+Der Tresor kann von Ihren Mitgliedern zum Sichern von angesammelten {!POINTS!}
+benutzt werden. Zus&auml;tzlich erhalten Ihre Mitglieder, wenn Sie die
+Erweiterung <strong>active</strong> in Ihrem {!MT_WORD!} installiert und die
+Aktiv-Rallye aktiviert haben, jeden Monat Zinsen auf das gesicherte Guthaben.
+Die Zinsabstuffung k&ouml;nnen Sie im Adminbereich frei einstellen und dabei
+beliebig viele Zinsstufen einrichten. Eine Zinsstufe richtet sich nach einem
+einstellbaren Bereich an Aktiv-{!POINTS!}, die das Mitglied f&uuml;r diverse
+Aktionen gesammelt hat.<br />
+<br />
+Zus&auml;tzlich ist der Tresor durch ein Tresor-Passwort gesch&uuml;tzt. Hat das
+Mitglied dies nicht mehr, so es einen Link per Mail zugesandt bekommen, womit es
+dann ein neues Tresor-Passwort einstellen kann. Das Tresor-Passwort muss
+unterschiedlich zum Account-Passwort sein!