show domains as list box in profile editor, minor changes

This commit is contained in:
Roland Gruber 2003-08-03 19:52:05 +00:00
parent b2a5416013
commit 7a37639134
4 changed files with 35 additions and 5 deletions

View File

@ -4,8 +4,8 @@ unix_password_no: 0
unix_pwdwarn: 10
unix_pwdallowlogin: 10
unix_pwdminage: 1
unix_pwdmaxage: 180
unix_pwdexpire: 1262300400
unix_pwdmaxage: 365
unix_pwdexpire: 1893452400
unix_deactivated: 0
smb_password_no: 0
smb_useunixpwd: 1

View File

@ -104,7 +104,7 @@ class Ldap{
// closes connection to server
function close() {
if (isset($this->server)) ldap_close($this->server);
@ldap_close($this->server);
}
// searches LDAP for a specific user name

View File

@ -80,7 +80,22 @@ echo ("<tr><td>&nbsp</td><td>&nbsp</td><td>&nbsp</td></tr>\n");
// domain
echo ("<tr>\n");
echo ("<td align=\"right\"><b>" . _("Domain") . ": </b></td>\n");
if ($_SESSION['config']->get_samba3() == "yes") {
echo "<td><select name=\"smb_domain\">\n";
$doms = $_SESSION['ldap']->search_domains($_SESSION['config']->get_DomainSuffix());
for ($i = 0; $i < sizeof($doms); $i++) {
if (strtolower($acct->smb_domain) == strtolower($doms[$i]->name)) {
echo ("<option selected>" . $acct->smb_domain . "</option>\n");
}
else {
echo ("<option>" . $doms[$i]->name . "</option>\n");
}
}
echo "</select></td>\n";
}
else {
echo ("<td><input type=\"text\" value=\"" . $acct->smb_domain . "\" name=\"smb_domain\"></td>\n");
}
echo ("<td><a href=\"../help.php?HelpNumber=371\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
echo ("</tr>\n");

View File

@ -317,7 +317,22 @@ echo ("<tr><td>&nbsp</td><td>&nbsp</td><td>&nbsp</td></tr>\n");
// domain
echo ("<tr>\n");
echo ("<td align=\"right\"><b>" . _("Domain") . ": </b></td>\n");
if ($_SESSION['config']->get_samba3() == "yes") {
echo "<td><select name=\"smb_domain\">\n";
$doms = $_SESSION['ldap']->search_domains($_SESSION['config']->get_DomainSuffix());
for ($i = 0; $i < sizeof($doms); $i++) {
if (strtolower($acct->smb_domain) == strtolower($doms[$i]->name)) {
echo ("<option selected>" . $acct->smb_domain . "</option>\n");
}
else {
echo ("<option>" . $doms[$i]->name . "</option>\n");
}
}
echo "</select></td>\n";
}
else {
echo ("<td><input type=\"text\" value=\"" . $acct->smb_domain . "\" name=\"smb_domain\"></td>\n");
}
echo ("<td><a href=\"../help.php?HelpNumber=309\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
echo ("</tr>\n");