diff --git a/lam/templates/main.php b/lam/templates/main.php index fa12a3b3..5c1750d9 100644 --- a/lam/templates/main.php +++ b/lam/templates/main.php @@ -36,21 +36,29 @@ if (!isset($_SESSION['cache'])) { $_SESSION['cache'] = new cache(); } +$startPage = ""; // check if all suffixes in conf-file exist $conf = $_SESSION['config']; $new_suffs = array(); if ($conf->get_UserSuffix() && ($conf->get_UserSuffix() != "")) { + $startPage = "./lists/listusers.php"; $info = @ldap_search($_SESSION['ldap']->server, $conf->get_UserSuffix(), "", array()); $res = @ldap_get_entries($_SESSION['ldap']->server, $info); if (!$res && !in_array($conf->get_UserSuffix(), $new_suffs)) $new_suffs[] = $conf->get_UserSuffix(); } if ($conf->get_GroupSuffix() && ($conf->get_GroupSuffix() != "")) { + if ($startPage == "") { + $startPage = "./lists/listgroups.php"; + } $info = @ldap_search($_SESSION['ldap']->server, $conf->get_GroupSuffix(), "", array()); $res = @ldap_get_entries($_SESSION['ldap']->server, $info); if (!$res && !in_array($conf->get_GroupSuffix(), $new_suffs)) $new_suffs[] = $conf->get_GroupSuffix(); } if ($conf->get_HostSuffix() && ($conf->get_HostSuffix() != "")) { + if ($startPage == "") { + $startPage = "./lists/listhosts.php"; + } $info = @ldap_search($_SESSION['ldap']->server, $conf->get_HostSuffix(), "", array()); $res = @ldap_get_entries($_SESSION['ldap']->server, $info); if (!$res && !in_array($conf->get_HostSuffix(), $new_suffs)) $new_suffs[] = $conf->get_HostSuffix(); @@ -80,7 +88,7 @@ echo (" 0) echo ("\n"); -else echo ("\n"); +else echo ("\n"); echo ("\n"); echo ("This page requires a browser that can show frames!\n"); echo ("\n");