X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin.php;h=cccd51af5adeb4efed3c25cc53f7045cdf09e239;hb=39172de4ecec2f6ddc597a5ae439e7aef79c75ed;hp=ea744f2f33abdc18eb763aea91bd0d1c51d37756;hpb=49c0cfbada5ede43152c053139b32f92441f8e45;p=mailer.git diff --git a/inc/modules/admin.php b/inc/modules/admin.php index ea744f2f33..cccd51af5a 100644 --- a/inc/modules/admin.php +++ b/inc/modules/admin.php @@ -57,10 +57,7 @@ if (!isBooleanConstantAndTrue('admin_registered')) { $hashedPass = md5($_POST['pass']); // Kill maybe existing session variables - set_session('admin_login' , ""); - set_session('admin_md5' , ""); - set_session('admin_last' , ""); - set_session('admin_to' , ""); + DESTROY_ADMIN_SESSION(false); // Do registration $ret = REGISTER_ADMIN($_POST['login'], $hashedPass); @@ -214,7 +211,7 @@ if (!isBooleanConstantAndTrue('admin_registered')) { // Rewrite overview module if ($GLOBALS['what'] == "overview") { $GLOBALS['action'] = GET_ACTION($GLOBALS['module'], $GLOBALS['what']); - } + } // END - if // Add data to URL if (!empty($GLOBALS['what'])) $URL .= "what=".$GLOBALS['what']; @@ -236,8 +233,10 @@ if (!isBooleanConstantAndTrue('admin_registered')) { $ret = WRONG_PASS." [".ADMIN_RESET_PASS."]\n"; DESTROY_ADMIN_SESSION(); break; - } - } + } // END - switch + } // END - if + + // Error detected? if ($ret != "done") { if (!empty($_POST['login'])) { define('__LOGIN_VALUE', $_POST['login']); @@ -247,8 +246,8 @@ if (!isBooleanConstantAndTrue('admin_registered')) { if (isset($_POST['ok'])) { // Set messages to zero - $MSG1 = ""; $MSG2 = ""; + // No login entered? if (empty($_POST['login'])) $MSG1 = ADMIN_NO_LOGIN; @@ -298,7 +297,7 @@ if (!isBooleanConstantAndTrue('admin_registered')) { // Load login form template LOAD_TEMPLATE("admin_login_form", false, $content); - } + } // END - if } elseif (isset($_GET['logout'])) { // Only try to remove cookies if (DESTROY_ADMIN_SESSION()) { @@ -351,7 +350,7 @@ if (!isBooleanConstantAndTrue('admin_registered')) { } // When type of admin menu is not set fallback to old menu system - if (empty($_CONFIG['admin_menu'])) $_CONFIG['admin_menu'] = "OLD"; + if (getConfig('admin_menu') == null) $_CONFIG['admin_menu'] = "OLD"; // Check for version and switch between old menu system and new "intelligent menu system" if ((ADMIN_CHECK_MENU_MODE() == "NEW") && (FILE_READABLE(PATH."inc/modules/admin/lasys-inc.php"))) {