loadProfile($_POST['filename']); } catch (LAMException $e) { $_SESSION['conf_message'] = new htmlStatusMessage('ERROR', $e->getTitle()); metaRefresh('conflogin.php'); exit; } } $conf = &$_SESSION['conf_config']; // check if password is valid // if not: load login page if ((!isset($_SESSION['conf_isAuthenticated']) || ($_SESSION['conf_isAuthenticated'] !== $conf->getName())) && !$conf->check_Passwd($passwd)) { $sessionKeys = array_keys($_SESSION); foreach ($sessionKeys as $sessionKey) { if (str_starts_with($sessionKey, "conf_")) { unset($_SESSION[$sessionKey]); } } $_SESSION['conf_message'] = new htmlStatusMessage('ERROR', _("The password is invalid! Please try again.")); /** go back to login if password is invalid */ metaRefresh('conflogin.php'); exit; } $_SESSION['conf_isAuthenticated'] = $conf->getName(); // check if user canceled editing if (isset($_POST['cancelSettings'])) { metaRefresh("../login.php"); exit; } $errorsToDisplay = []; if (isset($_SESSION['conf_messages']) && is_array($_SESSION['conf_messages'])) { $errorsToDisplay = array_merge($errorsToDisplay, $_SESSION['conf_messages']); unset($_SESSION['conf_messages']); } // check if button was pressed and if we have to save the settings or go to another tab if (isset($_POST['saveSettings']) || isset($_POST['editmodules']) || isset($_POST['edittypes']) || isset($_POST['generalSettingsButton']) || isset($_POST['moduleSettings']) || isset($_POST['jobs'])) { $errorsToDisplay = checkInput(); if (count($errorsToDisplay) === 0) { // go to final page if (isset($_POST['saveSettings'])) { metaRefresh("confsave.php"); exit; } // go to modules page elseif (isset($_POST['editmodules'])) { metaRefresh("confmodules.php"); exit; } // go to types page elseif (isset($_POST['edittypes'])) { metaRefresh("conftypes.php"); exit; } // go to module settings page elseif (isset($_POST['moduleSettings'])) { metaRefresh("moduleSettings.php"); exit; } // go to jobs page elseif (isset($_POST['jobs'])) { metaRefresh("jobs.php"); exit; } } } echo $_SESSION['header']; printHeaderContents(_("LDAP Account Manager Configuration"), '../..'); echo "\n"; echo "
\n"; // include all JavaScript files printJsIncludes('../..'); printConfigurationPageHeaderBar($conf); if (!$serverProfilePersistenceManager->isWritable($_SESSION['conf_config']->getName())) { StatusMessage('WARN', _('The config file is not writable.'), _('Your changes cannot be saved until you make the file writable for the webserver user.')); echo "