get_Passwd()) {
/** go back to login if password is invalid */
require('conflogin.php');
exit;
}
echo $_SESSION['header'];
echo "
" . _("LDAP Account Manager Configuration") . "\n";
echo "\n";
echo "\n";
echo ("".
"
");
// check new preferences
if (!$conf->set_ServerURL($serverurl)) {
echo ("" . _("Server Address is empty!") . "");
echo ("\n
" . _("Back to preferences...") . "");
exit;
}
if (!$conf->set_cacheTimeout($cachetimeout)) {
echo ("" . _("Cache timeout is invalid!") . "");
echo ("\n
" . _("Back to preferences...") . "");
exit;
}
if (!$conf->set_Adminstring($admins)) {
echo ("" . _("List of admin users is empty or invalid!") . "");
echo ("\n
" . _("Back to preferences...") . "");
exit;
}
if (!$conf->set_UserSuffix($suffusers)) {
echo ("" . _("UserSuffix is invalid!") . "");
echo ("\n
" . _("Back to preferences...") . "");
exit;
}
if (!$conf->set_GroupSuffix($suffgroups)) {
echo ("" . _("GroupSuffix is invalid!") . "");
echo ("\n
" . _("Back to preferences...") . "");
exit;
}
if (!$conf->set_HostSuffix($suffhosts)) {
echo ("" . _("HostSuffix is invalid!") . "");
echo ("\n
" . _("Back to preferences...") . "");
exit;
}
if (!$conf->set_DomainSuffix($suffdomains)) {
echo ("" . _("DomainSuffix is invalid!") . "");
echo ("\n
" . _("Back to preferences...") . "");
exit;
}
if (!$conf->set_minUID($minUID)) {
echo ("" . _("Minimum UID number is invalid!") . "");
echo ("\n
" . _("Back to preferences...") . "");
exit;
}
if (!$conf->set_maxUID($maxUID)) {
echo ("" . _("Maximum UID number is invalid!") . "");
echo ("\n
" . _("Back to preferences...") . "");
exit;
}
if (!$conf->set_minGID($minGID)) {
echo ("" . _("Minimum GID number is invalid!") . "");
echo ("\n
" . _("Back to preferences...") . "");
exit;
}
if (!$conf->set_maxGID($maxGID)) {
echo ("" . _("Maximum GID number is invalid!") . "");
echo ("\n
" . _("Back to preferences...") . "");
exit;
}
if (!$conf->set_minMachine($minMach)) {
echo ("" . _("Minimum Machine number is invalid!") . "");
echo ("\n
" . _("Back to preferences...") . "");
exit;
}
if (!$conf->set_maxMachine($maxMach)) {
echo ("" . _("Maximum Machine number is invalid!") . "");
echo ("\n
" . _("Back to preferences...") . "");
exit;
}
if (!$conf->set_userlistAttributes($usrlstattr)) {
echo ("" . _("User list attributes are invalid!") . "");
echo ("\n
" . _("Back to preferences...") . "");
exit;
}
if (!$conf->set_grouplistAttributes($grplstattr)) {
echo ("" . _("Group list attributes are invalid!") . "");
echo ("\n
" . _("Back to preferences...") . "");
exit;
}
if (!$conf->set_hostlistAttributes($hstlstattr)) {
echo ("" . _("Host list attributes are invalid!") . "");
echo ("\n
" . _("Back to preferences...") . "");
exit;
}
if (!$conf->set_MaxListEntries($maxlistentries)) {
echo ("" . _("Max list entries is invalid!") . "");
echo ("\n
" . _("Back to preferences...") . "");
exit;
}
if (!$conf->set_defaultLanguage($lang)) {
echo ("" . _("Language is not defined!") . "");
echo ("\n
" . _("Back to preferences...") . "");
exit;
}
if (!$conf->set_scriptpath($scriptpath)) {
echo ("" . _("Script path is invalid!") . "");
echo ("\n
" . _("Back to preferences...") . "");
exit;
}
if (!$conf->set_scriptserver($scriptserver)) {
echo ("" . _("Script server is invalid!") . "");
echo ("\n
" . _("Back to preferences...") . "");
exit;
}
if (!$conf->set_pwdhash($pwdhash)) {
echo ("" . _("Password hash is invalid!") . "");
echo ("\n
" . _("Back to preferences...") . "");
exit;
}
if (! $conf->set_UserModules($_SESSION['conf_usermodules'])) {
echo ("" . _("Saving user modules failed!") . "");
echo ("\n
" . _("Back to preferences...") . "");
exit;
}
if (! $conf->set_GroupModules($_SESSION['conf_groupmodules'])) {
echo ("" . _("Saving group modules failed!") . "");
echo ("\n
" . _("Back to preferences...") . "");
exit;
}
if (! $conf->set_HostModules($_SESSION['conf_hostmodules'])) {
echo ("" . _("Saving host modules failed!") . "");
echo ("\n
" . _("Back to preferences...") . "");
exit;
}
// check if password was changed
if ($passwd1) {
if ($passwd1 != $passwd2) {
echo ("" . _("Passwords are different!") . "");
exit;
}
// set new password
if ($passwd1 != "") {
$conf->set_Passwd($passwd1);
echo ("" . _("Password changed!") . "
");
}
}
// save settings and display new settings
$conf->save();
echo ("" . _("The following settings were saved to profile:") . " " . $filename . "
");
$conf->printconf();
echo ("
" . _("Back to Login") . "");
echo("