get_Passwd()) == $passwd)) { $message = _("The password is invalid! Please try again."); /** go back to login if password is invalid */ require('conflogin.php'); exit; } // check if user comes from modules page if (isset($_GET["modulesback"])) { // load config values from session $conf->set_ServerURL($_SESSION['conf_serverurl']); $conf->set_cacheTimeout($_SESSION['conf_cachetimeout']); $conf->set_Adminstring($_SESSION['conf_admins']); $conf->set_Suffix('user', $_SESSION['conf_suffusers']); $conf->set_Suffix('group', $_SESSION['conf_suffgroups']); $conf->set_Suffix('host', $_SESSION['conf_suffhosts']); $conf->set_Suffix('domain', $_SESSION['conf_suffdomains']); $conf->set_Suffix('tree', $_SESSION['conf_sufftree']); $conf->set_listAttributes($_SESSION['conf_usrlstattr'], 'user'); $conf->set_listAttributes($_SESSION['conf_grplstattr'], 'group'); $conf->set_listAttributes($_SESSION['conf_hstlstattr'], 'host'); $conf->set_MaxListEntries($_SESSION['conf_maxlistentries']); $conf->set_defaultLanguage($_SESSION['conf_lang']); $conf->set_scriptpath($_SESSION['conf_scriptpath']); $conf->set_scriptserver($_SESSION['conf_scriptserver']); // check if modules were edited if ($_GET["moduleschanged"] == "true") { $conf->set_AccountModules($_SESSION['conf_usermodules'], 'user'); $conf->set_AccountModules($_SESSION['conf_groupmodules'], 'group'); $conf->set_AccountModules($_SESSION['conf_hostmodules'], 'host'); } } // index for tab order $tabindex = 1; $tabindexLink = 1000; echo $_SESSION['header']; echo ("" . _("LDAP Account Manager Configuration") . "\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("

". "\"LDAP

\n
\n

\n"); // display formular echo ("
\n"); echo ("
" . _("Server settings") . ""); echo (""); // serverURL echo ("". "\n"); echo "\n"; $tabindex++; // new line echo (""); // user suffix echo ("". "\n"); echo "\n"; $tabindex++; // group suffix echo ("". "\n"); echo "\n"; $tabindex++; // host suffix echo ("". "\n"); echo "\n"; $tabindex++; // domain suffix echo ("". "\n"); echo "\n"; $tabindex++; // tree suffix echo ("". "\n"); echo "\n"; $tabindex++; // new line echo (""); // LDAP cache timeout echo ("". "\n"); $tabindex++; echo "\n"; echo ("
" . _("Server address") . " *: ". "get_ServerURL() . "\">". ""; echo ""; echo "\"""; echo "\n"; echo "
 
". _("UserSuffix") . ": get_Suffix('user') . "\">"; echo ""; echo "\"""; echo "\n"; echo "
". _("GroupSuffix") . ": get_Suffix('group') . "\">"; echo ""; echo "\"""; echo "\n"; echo "
". _("HostSuffix") . ": get_Suffix('host') . "\">"; echo ""; echo "\"""; echo "\n"; echo "
". _("DomainSuffix") . " **: get_Suffix('domain') . "\">"; echo ""; echo "\"""; echo "\n"; echo "
". _("TreeSuffix") . ": get_Suffix('tree') . "\">"; echo ""; echo "\"""; echo "\n"; echo "
 
". _("Cache timeout") . ": "; echo ""; echo "\"""; echo "\n"; echo "
"); echo ("
"); echo ("

"); echo ("
" . _("Account modules") . ""); echo (""); // Account modules echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $tabindex++; echo ("
" . _("User modules") . ": " . implode(", ", $conf->get_AccountModules('user')) . "
" . _("Group modules") . ": " . implode(", ", $conf->get_AccountModules('group')) . "
" . _("Host modules") . ": " . implode(", ", $conf->get_AccountModules('host')) . "
 
  "; echo ""; echo "\"""; echo "\n"; echo "
"); echo ("
"); echo ("

"); // module settings // get list of scopes of modules $scopes = array(); $mods = $conf->get_AccountModules('user'); for ($i = 0; $i < sizeof($mods); $i++) $scopes[$mods[$i]][] = 'user'; $mods = $conf->get_AccountModules('group'); for ($i = 0; $i < sizeof($mods); $i++) $scopes[$mods[$i]][] = 'group'; $mods = $conf->get_AccountModules('host'); for ($i = 0; $i < sizeof($mods); $i++) $scopes[$mods[$i]][] = 'host'; // get module options $options = getConfigOptions($scopes); // get current setting $old_options = $conf->get_moduleSettings(); // get module descriptions $moduleDescriptions = getConfigDescriptions(); // save scopes $_SESSION['config_scopes'] = $scopes; // display module boxes $modules = array_keys($options); $_SESSION['config_types'] = array(); for ($i = 0; $i < sizeof($modules); $i++) { if (sizeof($options[$modules[$i]]) < 1) continue; echo "
\n"; echo "" . $moduleDescriptions['legend'][$modules[$i]] . "\n"; $configTypes = parseHtml($modules[$i], $options[$modules[$i]], $old_options, true, $tabindex, $tabindexLink, 'config'); $_SESSION['config_types'] = array_merge($configTypes, $_SESSION['config_types']); echo "
\n"; echo "
"; } echo ("
" . _("LDAP List settings") . "\n"); echo ("\n"); // user list attributes echo ("". ""); echo "\n"; $tabindex++; // group list attributes echo ("". ""); echo "\n"; $tabindex++; // host list attributes echo ("". ""); echo "\n"; $tabindex++; echo ("\n"); // maximum list entries echo ("". "\n"); $tabindex++; echo "\n"; echo ("
". _("Attributes in User List") . " *:get_listAttributes('user') . "\">"; echo ""; echo "\"""; echo "\n"; echo "
". _("Attributes in Group List") . " *:get_listAttributes('group') . "\">"; echo ""; echo "\"""; echo "\n"; echo "
". _("Attributes in Host List") . " **:get_listAttributes('host') . "\">"; echo ""; echo "\"""; echo "\n"; echo "
 
". _("Maximum list entries") . " : "; echo ""; echo "\"""; echo "\n"; echo "
\n"); echo ("
\n"); echo ("

\n"); echo ("
" . _("Language settings") . "\n"); echo ("\n"); // language echo (""); echo ("\n"); echo "\n"; echo ("
" . _("Default language") . ":\n"); // read available languages $languagefile = "../../config/language"; if(is_file($languagefile)) { $file = fopen($languagefile, "r"); $i = 0; while(!feof($file)) { $line = fgets($file, 1024); if($line == "\n" || $line[0] == "#" || $line == "") continue; // ignore comment and empty lines $languages[$i] = chop($line); $i++; } fclose($file); // generate language list echo ("\n"); $tabindex++; } else { echo _("Unable to load available languages. Setting English as default language. For further instructions please contact the Admin of this site."); } echo (""; echo ""; echo "\"""; echo "\n"; echo "
\n"); echo ("
\n"); echo ("

\n"); // script settings echo ("
" . _("Script settings") . "\n"); echo ("\n"); echo ("". "\n"); $tabindex++; echo "\n"; echo ("". "\n"); $tabindex++; echo "\n"; echo ("
". _("Server of external script") . ": get_scriptServer() . "\">"; echo ""; echo "\"""; echo "\n"; echo "
". _("Path to external script") . ": get_scriptPath() . "\">"; echo ""; echo "\"""; echo "\n"; echo "
\n"); echo ("
\n"); echo ("

\n"); // security setings echo ("
" . _("Security settings") . "\n"); echo ("\n"); // admin list echo ("". "\n"); echo "\n"; $tabindex++; echo ("\n"); // new password echo ("". "\n"); $tabindex++; echo "\n"; // reenter password echo ("". "\n"); $tabindex++; echo ("
". _("List of valid users") . " *: get_Adminstring() . "\">"; echo ""; echo "\"""; echo "\n"; echo "
 
". _("New Password") . ": "; echo ""; echo "\"""; echo "\n"; echo "
". _("Reenter Password") . ":
\n"); echo ("
\n"); echo ("

\n"); // buttons echo ("\n"); echo ""; echo "\n"); echo ("
";
	echo "";
	$tabindex++;
	echo "";
	$tabindex++;
	echo "
\n"); echo ("

"); echo ("

* = ". _("required") . "

"); echo ("

** = ". _("required for Samba 3 accounts") . "

"); // password for configuration echo ("

\n"); // config file echo ("

\n"); // modules echo ("

get_AccountModules('user')) . "\">

\n"); echo ("

get_AccountModules('group')) . "\">

\n"); echo ("

get_AccountModules('host')) . "\">

\n"); echo ("
\n"); echo ("\n"); echo ("\n"); ?>