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 ($_GET["modulesback"] == "true") { // 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_UserSuffix($_SESSION['conf_suffusers']); $conf->set_GroupSuffix($_SESSION['conf_suffgroups']); $conf->set_HostSuffix($_SESSION['conf_suffhosts']); $conf->set_DomainSuffix($_SESSION['conf_suffdomains']); $conf->set_userlistAttributes($_SESSION['conf_usrlstattr']); $conf->set_grouplistAttributes($_SESSION['conf_grplstattr']); $conf->set_hostlistAttributes($_SESSION['conf_hstlstattr']); $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_UserModules($_SESSION['conf_usermodules']); $conf->set_GroupModules($_SESSION['conf_groupmodules']); $conf->set_HostModules($_SESSION['conf_hostmodules']); } } 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"); // new line echo (""); // user suffix echo ("". "\n"); echo ("\n"); // group suffix echo ("". "\n"); echo ("\n"); // host suffix echo ("". "\n"); echo ("\n"); // domain suffix echo ("". "\n"); echo ("\n"); // new line echo (""); // LDAP cache timeout echo ("". "\n"); echo ("\n"); echo ("
" . _("Server address") . " *: ". "get_ServerURL() . "\">". "" . _("Help") . "
 
". _("UserSuffix") . " *: get_UserSuffix() . "\">" . _("Help") . "
". _("GroupSuffix") . " *: get_GroupSuffix() . "\">" . _("Help") . "
". _("HostSuffix") . " **: get_HostSuffix() . "\">" . _("Help") . "
". _("DomainSuffix") . " ***: get_DomainSuffix() . "\">" . _("Help") . "
 
". _("Cache timeout") . ": " . _("Help") . "
"); echo ("
"); echo ("

"); echo ("
" . _("Account modules") . ""); echo (""); // Account modules echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo ("
" . _("User modules") . ": " . implode(", ", $conf->get_UserModules()) . "
" . _("Group modules") . ": " . implode(", ", $conf->get_GroupModules()) . "
" . _("Host modules") . ": " . implode(", ", $conf->get_HostModules()) . "
 
  " . "" . _("Help") . "
"); echo ("
"); echo ("

"); // module settings // get list of scopes of modules $scopes = array(); $mods = $conf->get_UserModules(); for ($i = 0; $i < sizeof($mods); $i++) $scopes[$mods[$i]][] = 'user'; $mods = $conf->get_GroupModules(); for ($i = 0; $i < sizeof($mods); $i++) $scopes[$mods[$i]][] = 'group'; $mods = $conf->get_HostModules(); 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; // index for tab order (1 is LDAP suffix) $tabindex = 2; // display module boxes $modules = array_keys($options); for ($m = 0; $m < sizeof($modules); $m++) { // ignore empty values if (!is_array($options[$modules[$m]]) || (sizeof($options[$modules[$m]]) < 1)) continue; echo "
\n"; echo "" . $moduleDescriptions['legend'][$modules[$m]] . "\n"; echo "\n"; for ($l = 0; $l < sizeof($options[$modules[$m]]); $l++) { // option lines echo "\n"; for ($o = 0; $o < sizeof($options[$modules[$m]][$l]); $o++) { // line parts echo ""; print_option($options[$modules[$m]][$l][$o], $modules[$m], $old_options, $tabindex); echo "\n"; } echo "\n"; } echo "
\n"; echo "
\n"; echo "
"; } echo ("
" . _("LDAP List settings") . "\n"); echo ("\n"); // user list attributes echo ("". ""); echo ("\n"); // group list attributes echo ("". ""); echo ("\n"); // host list attributes echo ("". ""); echo ("\n"); echo ("\n"); // maximum list entries echo ("". "\n"); echo ("\n"); echo ("
". _("Attributes in User List") . " *:get_userlistAttributes() . "\">" . _("Help") . "
". _("Attributes in Group List") . " *:get_grouplistAttributes() . "\">" . _("Help") . "
". _("Attributes in Host List") . " **:get_hostlistAttributes() . "\">" . _("Help") . "
 
". _("Maximum list entries") . " : " . _("Help") . "
\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"); } else { echo _("Unable to load available languages. Setting English as default language. For further instructions please contact the Admin of this site."); } echo ("" . _("Help") . "
\n"); echo ("
\n"); echo ("

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

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

\n"); // buttons echo ("\n"); echo ("\n"); echo ("
".
	"".
	"".
	"
\n"); echo ("

"); echo ("

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

"); echo ("

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

"); echo ("

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

"); // password for configuration echo ("

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

\n"); // modules echo ("

get_UserModules()) . "\">

\n"); echo ("

get_GroupModules()) . "\">

\n"); echo ("

get_HostModules()) . "\">

\n"); echo ("
\n"); echo ("\n"); echo ("\n"); /** * prints out the row of a section table including the option name, values and help * * @param array $values an array formated as module option * @param string $module_name the name of the module the options belong to * @param array $old_options a hash array with the values from the loaded profile * @param integer $tabindex current value for tabulator order */ function print_option($values, $modulename, $old_options, &$tabindex) { switch ($values['kind']) { // text value case 'text': echo $values['text'] . "\n"; break; // help link case 'help': echo "" . _('Help') . "\n"; break; // input field case 'input': if (($values['type'] == 'text') || ($values['type'] == 'checkbox')) { if ($values['type'] == 'text') { $output = "\n"; $_SESSION['config_types'][$values['name']] = "multiselect"; } else { echo "\n"; $tabindex++; break; // subtable case 'table': echo "\n"; for ($l = 0; $l < sizeof($values['value']); $l++) { // option lines echo "\n"; for ($o = 0; $o < sizeof($values['value'][$l]); $o++) { // line parts echo "\n"; } echo "\n"; } echo "
"; print_option($values['value'][$l][$o], $values['value'], $old_options, $tabindex); echo "
\n"; break; // print error message for invalid types default: echo _("Unrecognized type") . ": " . $values['kind'] . "\n"; break; } } ?>