password != $_SESSION['confwiz_masterpwd']) { require("../config/conflogin.php"); exit; } // check if user clicked on cancel button if ($_POST['cancel']) { @unlink("../../config/" . $_SESSION['confwiz_config']->file . ".conf"); metarefresh('../config/conflogin.php'); exit; } // check if user clicked on next button if ($_POST['submit']) { $errors = array(); if (!$_SESSION['confwiz_config']->set_defaultLanguage($_POST['lang'])) { $errors[] = _("Language is not defined!"); } if (!$_SESSION['confwiz_config']->set_Adminstring($_POST['admins'])) { $errors[] = _("List of admin users is empty or invalid!"); } // if no errors save and go back to optional.php if (sizeof($errors) < 1) { $_SESSION['confwiz_config']->save(); $_SESSION['confwiz_optional']['lang'] = 'done'; metarefresh('optional.php'); } else { // errors occured echo $_SESSION['header']; echo "\n"; echo "\n"; echo _("Configuration wizard"); echo "\n"; echo "\n"; for ($i = 0; $i < sizeof($errors); $i++) { StatusMessage("ERROR", $errors[$i], ""); } echo "



" . _("Back to language and admin settings.") . "

\n"; echo "\n"; exit; } } echo $_SESSION['header']; echo "\n"; echo _("Configuration wizard"); echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "

\n"; echo "\"LDAP\n"; echo "

\n"; echo "
\n"; // formular echo "
\n"; echo "

 

\n"; // language echo "

" . _("Please select your prefered language.") . "

\n"; echo "

" . _("This defines the language of the login window and sets this language as the default language. Users can change the language at login.") . "

\n"; echo (""); 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 ("
\n"; echo "


\n"; echo "


\n"; // admin users echo "

" . _("Valid users:") . "

\n"; echo "

" . _("If you want more than one user to login to LAM please enter its DN(s) here. Multiple entries are seperated by semicolons.") . "

\n"; echo "

" . _("Example") . ": cn=admin,dc=yourdomain,dc=org;cn=manager,dc=yourdomain,dc=org

\n"; echo (""); echo ("". "\n"); echo ("\n"); echo "
". _("List of valid users") . " *: get_Adminstring() . "\">
\n"; echo "


\n"; // next/cancel button echo "

\n"; echo "\n"; echo "\n"; echo "

\n"; echo "
\n"; echo "\n\n"; ?>