//xdebug_start_trace();
// Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
-require_once ("inc/libs/security_functions.php");
+require_once("inc/libs/security_functions.php");
// Init "action" and "what"
global $what, $action, $startTime;
$GLOBALS['module'] = secureString($_GET['module']);
// Needed include files
-require ("inc/config.php");
+require("inc/config.php");
// Check if logged in
if (IS_MEMBER()) {
// Is still logged in so we welcome him with his name
- $result = SQL_QUERY_ESC("SELECT surname, family FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT surname, family FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array($GLOBALS['userid']), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load surname and family's name and build the username
// Modules are by default not valid!
$MOD_VALID = false; $check = "failed";
-if ((!empty($_CONFIG['maintenance'])) && ($_CONFIG['maintenance'] == "Y") && (!IS_ADMIN()) && ($GLOBALS['module'] != "admin")) {
+if ((getConfig('maintenance') == "Y") && (!IS_ADMIN()) && ($GLOBALS['module'] != "admin")) {
// Maintain mode is active and you are no admin
ADD_FATAL(LANG_DOWN_MAINTAINCE);
} elseif (($link) && ($db) && (sizeof($FATAL) == 0)) {
ADD_FATAL(MYSQL_ERRORS);
}
-if ($MOD_VALID) {
+if (($MOD_VALID) && (defined('__MODULE'))) {
/////////////////////////////////////////////
// Main including line DO NOT REMOVE/EDIT! //
/////////////////////////////////////////////