switch ($ret)
{
case "done": // Admin and password are okay, so we log in now
- // Try to register the session variables
- if ((set_session("admin_md5", generatePassString(generateHash($_POST['pass'], __SALT)))) && (set_session("admin_login", $_POST['login'])) && (set_session("admin_last", time())) && (set_session("admin_to", $_POST['timeout']))) {
- // Construct URL and redirect
- $URL = URL."/modules.php?module=admin&";
-
- // Rewrite overview module
- if ($GLOBALS['what'] == "overview") {
- $GLOBALS['action'] = GET_ACTION($GLOBALS['module'], $GLOBALS['what']);
- }
-
- // Add data to URL
- if (!empty($GLOBALS['what'])) $URL .= "what=".$GLOBALS['what'];
- elseif (!empty($GLOBALS['action'])) $URL .= "action=".$GLOBALS['action'];
- elseif (!empty($_GET['area'])) $URL .= "area=".$_GET['area'];
+ // Construct URL and redirect
+ $URL = URL."/modules.php?module=admin&";
- // Load URL
- LOAD_URL($URL);
- } else {
- OUTPUT_HTML("<STRONG class=\"admin_fatal\">".ADMIN_LOGIN_FAILED."</STRONG>");
- ADD_FATAL(CANNOT_REGISTER_SESS);
+ // Rewrite overview module
+ if ($GLOBALS['what'] == "overview") {
+ $GLOBALS['action'] = GET_ACTION($GLOBALS['module'], $GLOBALS['what']);
}
+
+ // Add data to URL
+ if (!empty($GLOBALS['what'])) $URL .= "what=".$GLOBALS['what'];
+ elseif (!empty($GLOBALS['action'])) $URL .= "action=".$GLOBALS['action'];
+ elseif (!empty($_GET['area'])) $URL .= "area=".$_GET['area'];
+
+ // Load URL
+ LOAD_URL($URL);
break;
case "404": // Administrator login not found