More extension-depending menus secured
authorRoland Häder <roland@mxchange.org>
Fri, 5 Dec 2008 16:18:51 +0000 (16:18 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 5 Dec 2008 16:18:51 +0000 (16:18 +0000)
29 files changed:
inc/databases.php
inc/modules/admin/overview-inc.php
inc/modules/guest/action-
inc/modules/guest/action-admin.php
inc/modules/guest/action-main.php
inc/modules/guest/action-members.php
inc/modules/guest/action-sponsor.php
inc/modules/guest/action-themes.php
inc/modules/guest/what-wernis_portal.php
inc/modules/index.php
inc/modules/member/action-
inc/modules/member/action-bank.php
inc/modules/member/action-order.php
inc/modules/member/action-surfbar.php
inc/modules/member/action-themes.php
inc/modules/member/what-bank_create.php
inc/modules/member/what-bank_deposit.php
inc/modules/member/what-bank_infos.php
inc/modules/member/what-bank_output.php
inc/modules/member/what-bank_withdraw.php
inc/modules/member/what-payout.php
inc/modules/member/what-refback.php
inc/modules/member/what-sponsor.php
inc/modules/member/what-surfbar_book.php
inc/modules/member/what-surfbar_list.php
inc/modules/member/what-surfbar_start.php
inc/modules/member/what-surfbar_stats.php
inc/modules/member/what-themes.php
inc/modules/member/what-wernis.php

index d31263f640bff4e52807d4481938a71ea5d9fdbf..ad12324fb3324a4646c3f713e1bef013e8449d68 100644 (file)
@@ -114,7 +114,7 @@ define('USAGE_BASE', "usage");
 define('SERVER_URL', "http://www.mxchange.org");
 
 // Current SVN revision
-define('CURR_SVN_REVISION', "597");
+define('CURR_SVN_REVISION', "598");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
index 5e84a577fdcb41af2acc4c4111e159df6c7335ac..fe806cb55eff8c309c1ef057875344d21098ae2c 100644 (file)
@@ -445,7 +445,7 @@ function OUTPUT_SELECTED_TASKS($_POST, $result_tasks) {
                        );
 
                        // Do we have extension task?
-                       if (($type == "EXTENSION") && (!GET_EXT_VERSION($infos) == "")) {
+                       if (($type == "EXTENSION") && (GET_EXT_VERSION($infos) == "")) {
                                // Load extension row template
                                LOAD_TEMPLATE("admin_overview_list_ext_rows", false, $content);
                        } else {
index 0814201b13866fd3b218e232a161e54706ac3886..c5c60dbc4971e6e57d1e6fb1c6adc4f0df2c7d24 100644 (file)
 if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
+} elseif (!EXT_IS_ACTIVE("")) {
+       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "");
+       return;
+} elseif ($BLOCK_MODE) {
+       // Block mode detected
+       return;
 }
 
 // Add description as navigation point
index 17443554f4f59269f406dc7100297b9cd4a13742..d62329fd1a8fb76f15a72938f59fb61121f9bd99 100644 (file)
@@ -35,6 +35,9 @@
 if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
+} elseif ($BLOCK_MODE) {
+       // Block mode detected
+       return;
 }
 
 if (GET_ACTION("guest", $GLOBALS['what']) == "admin") {
index a1c35d51cd6ba1471fae3f02f11a425ba79bb0c0..3177c102275230293ae1bffe8308576d2eba5e02 100644 (file)
@@ -35,6 +35,9 @@
 if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
+} elseif ($BLOCK_MODE) {
+       // Block mode detected
+       return;
 }
 
 // Add description as navigation point
index d066e560368d8fe4a910cb3aeff8b79452664811..75779be80c7cd1f78d6e54b0142579b4594669bb 100644 (file)
@@ -35,6 +35,9 @@
 if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
+} elseif ($BLOCK_MODE) {
+       // Block mode detected
+       return;
 }
 
 // Add description as navigation point
index deeabb891b61f044879b04f8b179907d4b36d946..2cd8983eda93c8460b37acad88f77f2194e0fb33 100644 (file)
 if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
        require($INC);
+} elseif (!EXT_IS_ACTIVE("sponsor")) {
+       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "sponsor");
+       return;
+} elseif ($BLOCK_MODE) {
+       // Block mode detected
+       return;
 }
 
 // Add description as navigation point
index a94178bff6de0558980a3eda966549abe7416564..522158d0abdc066b42138bcbd9ceb569fea2610c 100644 (file)
@@ -35,6 +35,9 @@
 if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
+} elseif (!EXT_IS_ACTIVE("theme")) {
+       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "theme");
+       return;
 }
 
 // Already loaded?
index dae458d7fbf0ea89d8f04d4b34dcbede7793abcd..0cb400b6cb811a77283f7b769ca4f21cdc300ead 100644 (file)
@@ -35,6 +35,9 @@
 if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
+} elseif (!EXT_IS_ACTIVE("wernis")) {
+       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "wernis");
+       return;
 }
 
 // Special file
index e43f6869353d526f5fc19065bd60181383510bb8..1ac4b9912201c555477ac536573a69c6802d4e8e 100644 (file)
@@ -107,6 +107,9 @@ if (($_CONFIG['guest_menu'] == "Y") || (!EXT_IS_ACTIVE("sql_patches", true))) {
 // TDs between menu and content
 LOAD_TEMPLATE("guest_menu_content");
 
+// Disable block-mode by default
+$BLOCK_MODE = false;
+
 $INC_ACTION = sprintf("%sinc/modules/guest/action-%s.php", PATH, $act);
 if ((FILE_READABLE($INC_ACTION)) && (VALIDATE_MENU_ACTION("guest", $act, $GLOBALS['what']))) {
        // Requested module is available so we load it
index 67fc3812cbf2d2893e736dc1d5415a5699633b13..171ebea3ad948319b0fe9f3c317f24918af01869 100644 (file)
@@ -37,6 +37,9 @@ if (!defined('__SECURITY')) {
        require($INC);
 } elseif (!IS_LOGGED_IN()) {
        LOAD_URL(URL."/modules.php?module=index");
+} elseif (!EXT_IS_ACTIVE("")) {
+       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "");
+       return;
 } elseif ($BLOCK_MODE) {
        // Block mode detected
        return;
index 0e60f78b6b754c2479e2aa760f57c5ae80e51030..459b46d1765c4fc3cf1e761b8b0cda47a486bf7f 100644 (file)
@@ -37,6 +37,9 @@ if (!defined('__SECURITY')) {
        require($INC);
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
+} elseif (!EXT_IS_ACTIVE("bank")) {
+       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "bank");
+       return;
 } elseif ($BLOCK_MODE) {
        // Block mode detected
        return;
index 3bb82fa2379c5e29f54b97ccd9bffa0ff1d6dc01..5b1492cab392c33588baf1a9b176a302ba05eb06 100644 (file)
@@ -37,6 +37,9 @@ if (!defined('__SECURITY')) {
        require($INC);
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
+} elseif (!EXT_IS_ACTIVE("order")) {
+       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "order");
+       return;
 } elseif ($BLOCK_MODE) {
        // Block mode detected
        return;
index 19b460abbe75d7f8a3c20817ee7ecd18f7e2e481..f1f864698d2e701823a97e92fb0c255067460581 100644 (file)
@@ -37,6 +37,9 @@ if (!defined('__SECURITY')) {
        require($INC);
 } elseif (!IS_MEMBER()) {
        LOAD_URL(URL."/modules.php?module=index");
+} elseif (!EXT_IS_ACTIVE("surfbar")) {
+       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "surfbar");
+       return;
 } elseif ($BLOCK_MODE) {
        // Block mode detected
        return;
index fc90a45ed73887a76e30e8c2013fae3144796a99..493833f320e2a9b0c33736e46e73f3669e9373d7 100644 (file)
@@ -37,6 +37,9 @@ if (!defined('__SECURITY')) {
        require($INC);
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
+} elseif (!EXT_IS_ACTIVE("theme")) {
+       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "theme");
+       return;
 }
 
 // Already defined?
index c5cffb56afb77b39cf6d75db602e82cb14743a5e..5d50ac7ddab4acda56689368edad32377530c9f8 100644 (file)
@@ -35,6 +35,9 @@
 if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
+} elseif (!EXT_IS_ACTIVE("bank")) {
+       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "bank");
+       return;
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 }
index c5cffb56afb77b39cf6d75db602e82cb14743a5e..9316759fe2631703c9af8f4a258e173b381a8ed0 100644 (file)
@@ -37,6 +37,9 @@ if (!defined('__SECURITY')) {
        require($INC);
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
+} elseif (!EXT_IS_ACTIVE("bank")) {
+       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "bank");
+       return;
 }
 
 // Add description as navigation point
index c5cffb56afb77b39cf6d75db602e82cb14743a5e..9316759fe2631703c9af8f4a258e173b381a8ed0 100644 (file)
@@ -37,6 +37,9 @@ if (!defined('__SECURITY')) {
        require($INC);
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
+} elseif (!EXT_IS_ACTIVE("bank")) {
+       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "bank");
+       return;
 }
 
 // Add description as navigation point
index c5cffb56afb77b39cf6d75db602e82cb14743a5e..9316759fe2631703c9af8f4a258e173b381a8ed0 100644 (file)
@@ -37,6 +37,9 @@ if (!defined('__SECURITY')) {
        require($INC);
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
+} elseif (!EXT_IS_ACTIVE("bank")) {
+       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "bank");
+       return;
 }
 
 // Add description as navigation point
index c5cffb56afb77b39cf6d75db602e82cb14743a5e..9316759fe2631703c9af8f4a258e173b381a8ed0 100644 (file)
@@ -37,6 +37,9 @@ if (!defined('__SECURITY')) {
        require($INC);
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
+} elseif (!EXT_IS_ACTIVE("bank")) {
+       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "bank");
+       return;
 }
 
 // Add description as navigation point
index d352d80cf79d48bde4892a970e5465bee5fc7fa5..1c81b69455a788a1e65b67e05c9795186d1c4059 100644 (file)
@@ -40,7 +40,6 @@ if (!defined('__SECURITY')) {
        // Not logged in
        LOAD_URL("modules.php?module=index");
 } elseif (!EXT_IS_ACTIVE("payout")) {
-       // Extension "payout" is not active
        ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "payout");
        return;
 }
index efc0964132c02932df9aaf8e4c94d7b8fe76457f..a3e61a45a1c4e8bb44870bb25760e339d8fc7b01 100644 (file)
@@ -39,7 +39,6 @@ if (!defined('__SECURITY')) {
        // User is not logged in
        LOAD_URL("modules.php?module=index");
 } elseif (!EXT_IS_ACTIVE("refback")) {
-       // Extension "refback" is not active
        ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "refback");
        return;
 }
index 0360d6ecb0f701d4f763a2d8777d6d614e6e2f18..059429d87f07d29fd10df565797cd0ee2a567536 100644 (file)
@@ -36,6 +36,9 @@ if (!defined('__SECURITY')) {
        require($INC);
 } elseif (!IS_MEMBER()) {
        LOAD_URL(URL."/modules.php?module=index");
+} elseif (!EXT_IS_ACTIVE("sponsor")) {
+       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "sponsor");
+       return;
 }
 
 // Add description as navigation point
index 977548668f7916a2faa3cd8086f24aed2d7fa67e..b81c7d785c7ada4604e3e17875fab874cea5cd67 100644 (file)
@@ -39,7 +39,6 @@ if (!defined('__SECURITY')) {
        // Redirect
        LOAD_URL(URL."/modules.php?module=index");
 } elseif (!EXT_IS_ACTIVE("surfbar")) {
-       // Extension "surfbar" is not active
        ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "surfbar");
        return;
 }
index b9ac2954a1f25f58480f02ff016a8c7fcb985dfe..243d4800b5bfa1222a4e8f7557c7482887189d4d 100644 (file)
@@ -37,6 +37,9 @@ if (!defined('__SECURITY')) {
        require($INC);
 } elseif (!IS_MEMBER()) {
        LOAD_URL(URL."/modules.php?module=index");
+} elseif (!EXT_IS_ACTIVE("surfbar")) {
+       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "surfbar");
+       return;
 }
 
 // Add description as navigation point
index d7eff2727ca6ca66e5844457596cef74c8a6108c..7e2f7036bb4e3e6df42a2a3711afd95d0187a8eb 100644 (file)
@@ -39,7 +39,6 @@ if (!defined('__SECURITY')) {
        // Not logged in
        LOAD_URL("modules.php?module=index");
 } elseif (!EXT_IS_ACTIVE("surfbar")) {
-       // Extension "surfbar" is not active
        ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "surfbar");
        return;
 }
index 7e7101b6f8bb0a9c5bc3f06ea69119d2186ba859..38ae863068ba70b43bc88bc2eea00667d20bd915 100644 (file)
@@ -37,6 +37,9 @@ if (!defined('__SECURITY')) {
        require($INC);
 } elseif (!IS_MEMBER()) {
        LOAD_URL(URL."/modules.php?module=index");
+} elseif (!EXT_IS_ACTIVE("surfbar")) {
+       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "surfbar");
+       return;
 }
 
 // Add description as navigation point
index ec009de3948b5ae795fcf0f3fe311ba55466fd82..ecce7b10fc9b496d47a9541ea7a4a2586d4fb148 100644 (file)
@@ -37,6 +37,9 @@ if (!defined('__SECURITY')) {
        require($INC);
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
+} elseif (!EXT_IS_ACTIVE("theme")) {
+       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "theme");
+       return;
 }
 
 // Add description as navigation point
index 8578e52479abb22486b96892926c367c0358645f..227d5031a0d756a2c0bcb019f3d9850b0a289498 100644 (file)
@@ -39,7 +39,6 @@ if (!defined('__SECURITY')) {
        // User is not logged in
        LOAD_URL("modules.php?module=index");
 } elseif (!EXT_IS_ACTIVE("wernis")) {
-       // Extension "wernis" is not activated
        ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "wernis");
        return;
 }