parent
cea46df0a2
commit
1850f10ded
|
@ -138,11 +138,10 @@ class Config {
|
||||||
|
|
||||||
// prints current preferences
|
// prints current preferences
|
||||||
function printconf() {
|
function printconf() {
|
||||||
echo _("SSL: " ) . $this->SSL . "</br>";
|
echo _("<b>SSL: </b>" ) . $this->SSL . "</br>";
|
||||||
echo _("Host: ") . $this->Host . "</br>";
|
echo _("<b>Host: </b>") . $this->Host . "</br>";
|
||||||
echo _("Port: ") . $this->Port . "</br>";
|
echo _("<b>Port: </b>") . $this->Port . "</br>";
|
||||||
echo _("Passwd: ") . $this->Passwd . "</br>";
|
echo _("<b>Admins: </b>") . $this->Adminstring;
|
||||||
echo _("Admins: "); for ($i = 0; $i < sizeof($this->Admins); $i++) { echo $this->Admins[$i] . " "; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_SSL() {
|
function get_SSL() {
|
||||||
|
|
|
@ -33,10 +33,11 @@ $Id$
|
||||||
</title>
|
</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<b> <? echo _("Password to enter preferences:"); ?> </b><br><br>
|
<br><b><big><big><p align="center"> LDAP Account Manager</b></big></big></p><br><br>
|
||||||
|
<b><p align="center"> <? echo _("Password to enter preferences:"); ?> </b></p>
|
||||||
<form action="confmain.php" method="post">
|
<form action="confmain.php" method="post">
|
||||||
<input type="password" name="passwd">
|
<p align="center"><input type="password" name="passwd">
|
||||||
<input type="submit" name="submit" value=<? echo _("Ok"); ?> >
|
<input type="submit" name="submit" value=<? echo _("Ok"); ?> ></p>
|
||||||
</form>
|
</form>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -43,19 +43,24 @@ echo ("<head>\n");
|
||||||
echo ("<title>" . _("LDAP Account Manager Configuration") . "</title>\n");
|
echo ("<title>" . _("LDAP Account Manager Configuration") . "</title>\n");
|
||||||
echo ("</head>\n");
|
echo ("</head>\n");
|
||||||
echo ("<body>\n");
|
echo ("<body>\n");
|
||||||
|
echo ("<br><b><big><big><p align=\"center\"> LDAP Account Manager</b></big></big></p><br><br>\n");
|
||||||
echo ("<form action=\"confsave.php\" method=\"post\">\n");
|
echo ("<form action=\"confsave.php\" method=\"post\">\n");
|
||||||
echo ("<b>" . _("Hostname") . ": </b> <input type=\"text\" name=\"host\" value=\"" . $conf->get_Host() . "\"><br>\n");
|
echo ("<p align=\"center\"><table border=\"0\">");
|
||||||
echo ("<b>" . _("Portnumber") . ": </b> <input type=\"text\" name=\"port\" value=\"" . $conf->get_Port() . "\"><br>\n");
|
echo ("<tr><th><p align=\"right\"><b>" . _("Hostname") . ": </b></th> <th><p align=\"left\"><input type=\"text\" name=\"host\" value=\"" . $conf->get_Host() . "\"></th></tr>\n");
|
||||||
if ($conf->get_SSL() == "True") echo ("<b>" . _("Use SSL") . ": </b> <input type=\"checkbox\" name=\"ssl\" checked><br><br>\n");
|
echo ("<tr><th><p align=\"right\"><b>" . _("Portnumber") . ": </b></th> <th><p align=\"left\"><input type=\"text\" size=5 name=\"port\" value=\"" . $conf->get_Port() . "\"></th>\n");
|
||||||
else echo ("<b>" . _("Use SSL") . ": </b> <input type=\"checkbox\" name=\"ssl\"><br><br>\n");
|
echo _("<th><p align=\"left\">Default is 389, use 636 for SSL connections</th></tr>\n");
|
||||||
echo ("<b>" . _("List of valid users") . ": </b> <input type=\"text\" name=\"admins\" value=\"" . $conf->get_Adminstring() . "\"><br>\n");
|
if ($conf->get_SSL() == "True") echo ("<tr><th><p align=\"right\"><b>" . _("Use SSL") . ": </b></th> <th><p align=\"left\"><input type=\"checkbox\" name=\"ssl\" checked></th></tr>\n");
|
||||||
echo _("Usernames must be seperated by semicolons (e.g. cn=admin,dc=yourcompany,dc=com ; uid=root,ou=people,dc=yourcompany,cd=com)\n");
|
else echo ("<tr><th><p align=\"right\"><b>" . _("Use SSL") . ": </b></th> <th><p align=\"left\"><input type=\"checkbox\" name=\"ssl\"></th></tr>\n");
|
||||||
echo ("<br><br><br>\n");
|
echo ("<tr><th><p align=\"right\"><b>" . _("List of valid users") . ": </b></th> <th><input size=50 type=\"text\" name=\"admins\" value=\"" . $conf->get_Adminstring() . "\"></th>\n");
|
||||||
echo ("<b>" . _("New Password") . ": </b> <input type=\"password\" name=\"pass1\"><br>\n");
|
echo _("<th><p align=\"left\">Usernames must be seperated by semicolons<br>(e.g. cn=admin,dc=yourcompany,dc=com ; uid=root,ou=people,dc=yourcompany,cd=com)</th></tr>\n");
|
||||||
echo ("<b>" . _("Reenter Password") . ": </b> <input type=\"password\" name=\"pass2\"><br>\n");
|
echo ("<tr><th> </th></tr>");
|
||||||
|
echo ("<tr><th><p align=\"right\"><b>" . _("New Password") . ": </b></th> <th><p align=\"left\"><input type=\"password\" name=\"pass1\"></th></tr>\n");
|
||||||
|
echo ("<tr><th><p align=\"right\"><b>" . _("Reenter Password") . ": </b></th> <th><p align=\"left\"><input type=\"password\" name=\"pass2\"></th></tr>\n");
|
||||||
echo ("<input type=\"hidden\" name=\"passwd\" value=\"" . $passwd . "\"><br>\n");
|
echo ("<input type=\"hidden\" name=\"passwd\" value=\"" . $passwd . "\"><br>\n");
|
||||||
echo ("<br><br><br>\n");
|
echo ("<tr><th> </th></tr>\n");
|
||||||
echo ("<input type=\"submit\" name=\"submitconf\" value=\"" . _("Ok") . ">\n");
|
echo ("<tr><th> </th></tr>\n");
|
||||||
|
echo ("<tr><th></th><th><p align=\"left\"><input type=\"submit\" name=\"submitconf\" value=\"" . _("Submit") . "></th></tr>\n");
|
||||||
|
echo ("</table>\n");
|
||||||
echo ("</form>\n");
|
echo ("</form>\n");
|
||||||
echo ("</body>\n");
|
echo ("</body>\n");
|
||||||
echo ("</html>\n");
|
echo ("</html>\n");
|
||||||
|
|
|
@ -54,6 +54,9 @@ $conf->set_Adminstring($admins);
|
||||||
if ($ssl == "on") $conf->set_SSL("True");
|
if ($ssl == "on") $conf->set_SSL("True");
|
||||||
else $conf->set_SSL("False");
|
else $conf->set_SSL("False");
|
||||||
|
|
||||||
|
echo ("<br><b><big><big><p align=\"center\"> LDAP Account Manager</b></big></big></p><br><br>");
|
||||||
|
|
||||||
|
|
||||||
// check if password was changed
|
// check if password was changed
|
||||||
if ($pass1 != $pass2) {
|
if ($pass1 != $pass2) {
|
||||||
echo _("<b>" . _("Passwords are different!") . "</b>");
|
echo _("<b>" . _("Passwords are different!") . "</b>");
|
||||||
|
@ -66,6 +69,4 @@ if ($pass1 != "") {
|
||||||
// save settings
|
// save settings
|
||||||
echo ("<b>" . _("Saving the following settings:") . "</b><br><br>");
|
echo ("<b>" . _("Saving the following settings:") . "</b><br><br>");
|
||||||
$conf->printconf();
|
$conf->printconf();
|
||||||
if ($conf->save()) echo ("<br><br><b>" . _("Failed!") . "</b>");
|
|
||||||
else echo ("<br><br><b>" . _("Successfully saved!") . "</b>");
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue