get_Passwd(); // check if password was entered // if not: load login page if (! $passwd) { $_SESSION['conf_message'] = _("No password was entered!"); /** go back to login if password is empty */ require('conflogin.php'); exit; } if (!isset($_SESSION['conf_config']) && isset($_POST['filename'])) { $_SESSION['conf_config'] = new LAMConfig($_POST['filename']); } $conf = &$_SESSION['conf_config']; // check if password is valid // if not: load login page if (!(($conf->get_Passwd()) == $passwd)) { $sessionKeys = array_keys($_SESSION); for ($i = 0; $i < sizeof($sessionKeys); $i++) { if (substr($sessionKeys[$i], 0, 5) == "conf_") unset($_SESSION[$sessionKeys[$i]]); } $_SESSION['conf_message'] = _("The password is invalid! Please try again."); /** go back to login if password is invalid */ require('conflogin.php'); exit; } // check if button was pressed and if we have to save the setting or go back to login if (isset($_POST['back']) || isset($_POST['submitconf']) || isset($_POST['editmodules']) || isset($_POST['edittypes'])){ // go to final page if ($_POST['submitconf']){ saveSettings(); } // go to modules page elseif ($_POST['editmodules']){ metaRefresh("confmodules.php"); exit; } // go to types page elseif ($_POST['edittypes']){ metaRefresh("conftypes.php"); exit; } // back to login else if ($_POST['back']){ metaRefresh("../login.php"); exit; } } // check if user comes from types page if (isset($_GET["typesback"])) { // check if a new account type was added if (isset($_GET["typeschanged"])) { metaRefresh("confmodules.php"); exit; } } // type information if (!isset($_SESSION['conf_accountTypes'])) $_SESSION['conf_accountTypes'] = $conf->get_ActiveTypes(); if (!isset($_SESSION['conf_accountTypesOld'])) $_SESSION['conf_accountTypesOld'] = $conf->get_ActiveTypes(); if (!isset($_SESSION['conf_typeSettings'])) $_SESSION['conf_typeSettings'] = $conf->get_typeSettings(); // index for tab order $tabindex = 1; $tabindexLink = 1000; echo $_SESSION['header']; echo ("