define('SERVER_URL', "http://www.mxchange.org");
// Current SVN revision
-define('CURR_SVN_REVISION', "695");
+define('CURR_SVN_REVISION', "696");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
if (((!defined('__COOKIES')) || (!__COOKIES)) && ($addUrlData)) $URL = ADD_URL_DATA($URL);
// Probe for bot from search engine
- if ((eregi("spider", GET_USER_AGENT())) || (eregi("bot", GET_USER_AGENT())) || (eregi("spider", GET_USER_AGENT()))) {
+ if ((eregi("spider", GET_USER_AGENT())) || (eregi("bot", GET_USER_AGENT()))) {
// Search engine bot detected so let's rewrite many chars for the link
$URL = htmlentities(strip_tags($URL), ENT_QUOTES);
define('ADMIN_REMOVING_THESE_EXTENSIONS', "Diese Erweiterungen werden deinstalliert");
define('ADMIN_REMOVE_EXTENSIONS', "Erweiterungen jetzt entfernen");
define('ADMIN_SQLS_EXECUTED_ON_REMOVAL', "Beim Entfernen ausgeführte SQL-Anweisungen");
-define('ADMIN_NO_ADDIONAL_SQLS', "Keine weiteren SQL-Anweisungen zum Ausführen!");
+define('ADMIN_NO_ADDITIONAL_SQLS', "Keine weiteren SQL-Anweisungen zum Ausführen!");
define('ADMIN_SQLS_EXECUTED_ON_UPDATE', "Beim Aktualisieren ausgeführte SQL-Anweisungen");
define('ADMIN_SQLS_EXECUTED_ON_REGISTER', "Beim Registrieren ausgeführte SQL-Anweisungen");
define('ADMIN_UNKNOWN_FIELD_TYPE_1', "Unbekannter Datentyp <strong>");
define('ADMIN_REMOVING_THESE_EXTENSIONS', "Diese Erweiterungen werden deinstalliert");
define('ADMIN_REMOVE_EXTENSIONS', "Erweiterungen jetzt entfernen");
define('ADMIN_SQLS_EXECUTED_ON_REMOVAL', "Beim Entfernen ausgeführte SQL-Anweisungen");
-define('ADMIN_NO_ADDIONAL_SQLS', "Keine weiteren SQL-Anweisungen zum Ausführen!");
+define('ADMIN_NO_ADDITIONAL_SQLS', "Keine weiteren SQL-Anweisungen zum Ausführen!");
define('ADMIN_SQLS_EXECUTED_ON_UPDATE', "Beim Aktualisieren ausgeführte SQL-Anweisungen");
define('ADMIN_SQLS_EXECUTED_ON_REGISTER', "Beim Registrieren ausgeführte SQL-Anweisungen");
define('ADMIN_UNKNOWN_FIELD_TYPE_1', "Unbekannter Datentyp <STRONG>");
if (!empty($_POST['no'])) {
// Do not logout now
- LOAD_URL("modules.php?module=admin");
+ LOAD_URL("admin.php");
} elseif ((!empty($_POST['yes'])) && ($GLOBALS['action'] == "logout")) {
// Redirect to logout link
LOAD_URL("modules.php?module=admin&logout=1");
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif ((!EXT_IS_ACTIVE("sql_patches", true)) && (!IS_ADMIN())) {
+} elseif (!EXT_IS_ACTIVE("sql_patches")) {
// The extension "sql_patches" *MUST* be activated or you have lot's of problems!
- LOAD_URL("modules.php?module=admin");
+ LOAD_URL("admin.php");
}
// Load adverstising template
$GLOBALS['action'] = GET_ACTION("guest", $GLOBALS['what']);
} // END - if
-// Get action value directly from URL
-$act = COMPILE_CODE($GLOBALS['action']);
-
// Add the guest's menu here...
if ((getConfig('guest_menu') == "Y") || (!EXT_IS_ACTIVE("sql_patches", true))) {
// Show only when guest menu is active
- ADD_MENU("guest", $act, $GLOBALS['what']);
+ ADD_MENU("guest", $GLOBALS['action'], $GLOBALS['what']);
} // END - if
// TDs between menu and 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']))) {
+// Construct FQFN
+$INC_ACTION = sprintf("%sinc/modules/guest/action-%s.php", PATH, $GLOBALS['action']);
+
+// Is the file there?
+if ((FILE_READABLE($INC_ACTION)) && (VALIDATE_MENU_ACTION("guest", $GLOBALS['action'], $GLOBALS['what']))) {
// Requested module is available so we load it
require_once($INC_ACTION);
} else {
}
//* DEBUG: */ echo __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): ret=".$ret."<br />\n";
+ // Does the module have a menu?
if (MODULE_HAS_MENU($MODE)) {
// Rewriting modules to menu
switch ($MODE) {
// Free memory
SQL_FREERESULT($result);
- } // END - if
+ } elseif (GET_EXT_VERSION("sql_patches") == "") {
+ // No sql_patches installed!
+ LOAD_URL("admin.php");
+ }
// Return action value
return $ret;