added vendor name and version

This commit is contained in:
Roland Gruber 2009-11-10 19:25:47 +00:00
parent 3a7b94f070
commit 89d84951a5
1 changed files with 24 additions and 4 deletions

View File

@ -43,8 +43,10 @@ $configcontext = '';
$supportedldapversion = '';
$supportedsaslmechanisms = '';
$subschemasubentry = '';
$vendorname = '';
$vendorversion = '';
$result = @ldap_read($_SESSION['ldap']->server(), '', 'objectclass=*', array('+', '*'));
$result = @ldap_read($_SESSION['ldap']->server(), '', 'objectclass=*', array('+', '*', 'subschemasubentry'));
if ($result) {
$info = @ldap_get_entries($_SESSION['ldap']->server(), $result);
if ($info) {
@ -61,7 +63,7 @@ if ($result) {
$configcontext = $info['configcontext'][0];
}
if (isset($info['supportedldapversion'])) {
$supportedldapversion = $info['supportedldapversion'][0];
$supportedldapversion = implode(', ', $info['supportedldapversion']);
}
if (isset($info['supportedsaslmechanisms'])) {
$supportedsaslmechanisms = implode(', ', $info['supportedsaslmechanisms']);
@ -69,6 +71,12 @@ if ($result) {
if (isset($info['subschemasubentry'])) {
$subschemasubentry = $info['subschemasubentry'][0];
}
if (isset($info['vendorname'])) {
$vendorname = $info['vendorname'][0];
}
if (isset($info['vendorversion'])) {
$vendorversion = $info['vendorversion'][0];
}
}
}
@ -92,8 +100,10 @@ echo "<td style=\"padding:10px;\">" . $namingContexts . "</td></tr>";
echo "<tr class=\"userlist\"><td style=\"padding:10px;\"><b>" . _("LDAP version") . "</b>&nbsp;&nbsp;</td>";
echo "<td style=\"padding:10px;\">" . $supportedldapversion . "</td></tr>";
echo "<tr class=\"userlist\"><td style=\"padding:10px;\"><b>" . _("Config suffix") . "</b>&nbsp;&nbsp;</td>";
echo "<td style=\"padding:10px;\">" . $configcontext . "</td></tr>";
if ($configcontext != '') {
echo "<tr class=\"userlist\"><td style=\"padding:10px;\"><b>" . _("Config suffix") . "</b>&nbsp;&nbsp;</td>";
echo "<td style=\"padding:10px;\">" . $configcontext . "</td></tr>";
}
echo "<tr class=\"userlist\"><td style=\"padding:10px;\"><b>" . _("Schema suffix") . "</b>&nbsp;&nbsp;</td>";
echo "<td style=\"padding:10px;\">" . $subschemasubentry . "</td></tr>";
@ -101,6 +111,16 @@ echo "<td style=\"padding:10px;\">" . $subschemasubentry . "</td></tr>";
echo "<tr class=\"userlist\"><td style=\"padding:10px;\"><b>" . _("SASL mechanisms") . "</b>&nbsp;&nbsp;</td>";
echo "<td style=\"padding:10px;\">" . $supportedsaslmechanisms . "</td></tr>";
if ($vendorname != '') {
echo "<tr class=\"userlist\"><td style=\"padding:10px;\"><b>" . _("Vendor name") . "</b>&nbsp;&nbsp;</td>";
echo "<td style=\"padding:10px;\">" . $vendorname . "</td></tr>";
}
if ($vendorversion != '') {
echo "<tr class=\"userlist\"><td style=\"padding:10px;\"><b>" . _("Vendor version") . "</b>&nbsp;&nbsp;</td>";
echo "<td style=\"padding:10px;\">" . $vendorversion . "</td></tr>";
}
echo "</table>\n";