X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=modules.php;h=ade12602091f1f9626d83c713a77fa6c401da7e8;hb=af71686cb6c6e59eee9c206b36342f7dd7164c1f;hp=dcc22657d4362df9c61d6d8832b4d415d8027e6e;hpb=f75ece45874353859d07849cc9c6f79f76f76aa8;p=mailer.git diff --git a/modules.php b/modules.php index dcc22657d4..ade1260209 100644 --- a/modules.php +++ b/modules.php @@ -55,47 +55,13 @@ require('inc/config-global.php'); // Fix missing module to 'index' if (!REQUEST_ISSET_GET('module')) REQUEST_SET_GET('module', 'index'); -// 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", - array(getUserId()), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) { - // Load surname and family's name and build the username - list($s, $f) = SQL_FETCHROW($result); - $username = $s . ' ' . $f; - - // Additionally admin? - if (IS_ADMIN()) { - // Add it - $username .= ' ({--_ADMIN_SHORT--})'; - } // END - if - } else { - // Hmmm, logged in and no valid userid? - $username = '{--_UNKNOWN--}'; - - // Destroy session - destroyUserSession(); - - // Kill userid - setUserId(0); - } - - // Free memory - SQL_FREERESULT($result); -} elseif (IS_ADMIN()) { - // Admin is there - $username = getMessage('_ADMIN'); -} else { - // He's a guest, hello there... ;-) - $username = getMessage('_GUEST'); -} - // The header file loadIncludeOnce('inc/header.php'); // Modules are by default not valid! $isModuleValid = false; $check = 'failed'; + +// Is the maintenance mode active or goes all well? if ((getConfig('maintenance') == 'Y') && (!IS_ADMIN()) && (getModule() != 'admin')) { // Maintain mode is active and you are no admin addFatalMessage(__FILE__, __LINE__, getMessage('LANG_DOWN_MAINTAINCE'));