diff --git a/lam/lib/listhosts.php b/lam/lib/listhosts.php new file mode 100644 index 00000000..3414c514 --- /dev/null +++ b/lam/lib/listhosts.php @@ -0,0 +1,53 @@ +"; + +// Samba hosts have the attribute "sambaAccount" and end with "$" +$filter = "(&(objectClass=sambaAccount) (uid=*$))"; +$attrs = array("cn", "rid"); +$sr = ldap_search($_SESSION["ldap"]->server(), + $_SESSION["config"]->get_HostSuffix(), + $filter, $attrs); +$info = ldap_get_entries($_SESSION["ldap"]->server, $sr); +ldap_free_result($sr); + +// print host table +echo "\n"; +echo ""; +echo ""; +echo ""; +echo ""; +for ($i = 0; $i < sizeof($info); $i++) { + echo(""); + echo (""); + echo (""); + echo(""); +} +echo ("
" . _("Host Name") . "RID
" . $info["cn"][$i] . "" . $info["rid"][$i] . "
"); +?> \ No newline at end of file diff --git a/lam/templates/main_header.php b/lam/templates/main_header.php index 9ad2f441..43629049 100644 --- a/lam/templates/main_header.php +++ b/lam/templates/main_header.php @@ -39,8 +39,8 @@ $Id$ - - + +