diff --git a/lam/lib/tools/serverInfo.inc b/lam/lib/tools/serverInfo.inc new file mode 100644 index 00000000..9391cc84 --- /dev/null +++ b/lam/lib/tools/serverInfo.inc @@ -0,0 +1,104 @@ + \ No newline at end of file diff --git a/lam/lib/tools/tests.inc b/lam/lib/tools/tests.inc index 7c032ad9..2f1e3d4b 100644 --- a/lam/lib/tools/tests.inc +++ b/lam/lib/tools/tests.inc @@ -96,7 +96,7 @@ class toolTests implements LAMTool { * @return int prefered position */ function getPosition() { - return 600; + return 1000; } } diff --git a/lam/templates/serverInfo.php b/lam/templates/serverInfo.php new file mode 100644 index 00000000..9ef68dce --- /dev/null +++ b/lam/templates/serverInfo.php @@ -0,0 +1,111 @@ +server(), '', 'objectclass=*', array('+', '*')); +if ($result) { + $info = @ldap_get_entries($_SESSION['ldap']->server(), $result); + if ($info) { + $info = $info[0]; + foreach ($info as $key => $value) { + if (is_array($info[$key]) && isset($info[$key]['count'])) { + unset($info[$key]['count']); + } + } + if (isset($info['namingcontexts'])) { + $namingContexts = implode(', ', $info['namingcontexts']); + } + if (isset($info['configcontext'])) { + $configcontext = $info['configcontext'][0]; + } + if (isset($info['supportedldapversion'])) { + $supportedldapversion = $info['supportedldapversion'][0]; + } + if (isset($info['supportedsaslmechanisms'])) { + $supportedsaslmechanisms = implode(', ', $info['supportedsaslmechanisms']); + } + if (isset($info['subschemasubentry'])) { + $subschemasubentry = $info['subschemasubentry'][0]; + } + } +} + +echo $_SESSION['header']; + + +echo "\n"; +echo "\n"; +echo "\n"; +echo ""; + +echo "\n"; + +echo "

" . _("Server information") . "

\n"; + +echo "\n"; + +echo ""; +echo ""; + +echo ""; +echo ""; + +echo ""; +echo ""; + +echo ""; +echo ""; + +echo ""; +echo ""; + +echo "
" . _("Managed suffix(es)") . "  " . $namingContexts . "
" . _("LDAP version") . "  " . $supportedldapversion . "
" . _("Config suffix") . "  " . $configcontext . "
" . _("Schema suffix") . "  " . $subschemasubentry . "
" . _("SASL mechanisms") . "  " . $supportedsaslmechanisms . "
\n"; + + + +echo "\n"; +echo "\n"; + +?> diff --git a/lam/templates/tools.php b/lam/templates/tools.php index 8b2e26ed..e4ae0765 100644 --- a/lam/templates/tools.php +++ b/lam/templates/tools.php @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2003 - 2006 Roland Gruber + Copyright (C) 2003 - 2009 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -81,7 +81,7 @@ for ($i = 0; $i < sizeof($tools); $i++) { echo "\n"; echo "   \n"; echo "
"; - echo "getLink() . "\" target=\"mainpart\">getImageLink() . "\"> " . $tools[$i]->getName() . ""; + echo "getLink() . "\" target=\"mainpart\">getImageLink() . "\">  " . $tools[$i]->getName() . ""; echo "

\n"; echo "     \n"; echo "";