show only used suffixes
This commit is contained in:
parent
6fa703549e
commit
da610f4d5e
|
@ -320,12 +320,6 @@ exit;
|
||||||
else display_main();
|
else display_main();
|
||||||
|
|
||||||
function display_main() {
|
function display_main() {
|
||||||
// generate lists of possible suffixes
|
|
||||||
$usr_units = $_SESSION['ldap']->search_units($_SESSION["config"]->get_UserSuffix());
|
|
||||||
$grp_units = $_SESSION['ldap']->search_units($_SESSION["config"]->get_GroupSuffix());
|
|
||||||
$hst_units = $_SESSION['ldap']->search_units($_SESSION["config"]->get_HostSuffix());
|
|
||||||
$dom_units = $_SESSION['ldap']->search_units($_SESSION["config"]->get_DomainSuffix());
|
|
||||||
|
|
||||||
// display main page
|
// display main page
|
||||||
echo $_SESSION['header'];
|
echo $_SESSION['header'];
|
||||||
echo ("<title>OU-Editor</title>\n");
|
echo ("<title>OU-Editor</title>\n");
|
||||||
|
@ -336,6 +330,9 @@ function display_main() {
|
||||||
echo ("<form action=\"ou_edit.php?type=user\" method=\"post\">\n");
|
echo ("<form action=\"ou_edit.php?type=user\" method=\"post\">\n");
|
||||||
|
|
||||||
// user OUs
|
// user OUs
|
||||||
|
if ($_SESSION["config"]->get_UserSuffix() != "") {
|
||||||
|
// generate lists of possible suffixes
|
||||||
|
$usr_units = $_SESSION['ldap']->search_units($_SESSION["config"]->get_UserSuffix());
|
||||||
echo ("<fieldset><legend><b>" . _("Users") . "</b></legend>\n");
|
echo ("<fieldset><legend><b>" . _("Users") . "</b></legend>\n");
|
||||||
echo ("<table border=0>\n");
|
echo ("<table border=0>\n");
|
||||||
// new OU
|
// new OU
|
||||||
|
@ -367,8 +364,12 @@ function display_main() {
|
||||||
echo ("</table>\n");
|
echo ("</table>\n");
|
||||||
echo ("</fieldset>\n");
|
echo ("</fieldset>\n");
|
||||||
echo ("<br>\n");
|
echo ("<br>\n");
|
||||||
|
}
|
||||||
|
|
||||||
// group OUs
|
// group OUs
|
||||||
|
if ($_SESSION["config"]->get_GroupSuffix() != "") {
|
||||||
|
// generate lists of possible suffixes
|
||||||
|
$grp_units = $_SESSION['ldap']->search_units($_SESSION["config"]->get_GroupSuffix());
|
||||||
echo ("<fieldset><legend><b>" . _("Groups") . "</b></legend>\n");
|
echo ("<fieldset><legend><b>" . _("Groups") . "</b></legend>\n");
|
||||||
echo ("<table border=0>\n");
|
echo ("<table border=0>\n");
|
||||||
// new OU
|
// new OU
|
||||||
|
@ -400,8 +401,12 @@ function display_main() {
|
||||||
echo ("</table>\n");
|
echo ("</table>\n");
|
||||||
echo ("</fieldset>\n");
|
echo ("</fieldset>\n");
|
||||||
echo ("<br>\n");
|
echo ("<br>\n");
|
||||||
|
}
|
||||||
|
|
||||||
// host OUs
|
// host OUs
|
||||||
|
if ($_SESSION["config"]->get_HostSuffix() != "") {
|
||||||
|
// generate lists of possible suffixes
|
||||||
|
$hst_units = $_SESSION['ldap']->search_units($_SESSION["config"]->get_HostSuffix());
|
||||||
echo ("<fieldset><legend><b>" . _("Samba Hosts") . "</b></legend>\n");
|
echo ("<fieldset><legend><b>" . _("Samba Hosts") . "</b></legend>\n");
|
||||||
echo ("<table border=0>\n");
|
echo ("<table border=0>\n");
|
||||||
// new OU
|
// new OU
|
||||||
|
@ -433,8 +438,12 @@ function display_main() {
|
||||||
echo ("</table>\n");
|
echo ("</table>\n");
|
||||||
echo ("</fieldset>\n");
|
echo ("</fieldset>\n");
|
||||||
echo ("<br>\n");
|
echo ("<br>\n");
|
||||||
|
}
|
||||||
|
|
||||||
// domain OUs
|
// domain OUs
|
||||||
|
if ($_SESSION["config"]->get_DomainSuffix() != "") {
|
||||||
|
// generate lists of possible suffixes
|
||||||
|
$dom_units = $_SESSION['ldap']->search_units($_SESSION["config"]->get_DomainSuffix());
|
||||||
echo ("<fieldset><legend><b>" . _("Domains") . "</b></legend>\n");
|
echo ("<fieldset><legend><b>" . _("Domains") . "</b></legend>\n");
|
||||||
echo ("<table border=0>\n");
|
echo ("<table border=0>\n");
|
||||||
// new OU
|
// new OU
|
||||||
|
@ -466,6 +475,7 @@ function display_main() {
|
||||||
echo ("</table>\n");
|
echo ("</table>\n");
|
||||||
echo ("</fieldset>\n");
|
echo ("</fieldset>\n");
|
||||||
echo ("<br>\n");
|
echo ("<br>\n");
|
||||||
|
}
|
||||||
|
|
||||||
echo ("<input type=\"submit\" name=\"submit\" value=\"" . _("Submit") . "\">");
|
echo ("<input type=\"submit\" name=\"submit\" value=\"" . _("Submit") . "\">");
|
||||||
echo ("</form>\n");
|
echo ("</form>\n");
|
||||||
|
|
Loading…
Reference in New Issue