2019-02-08 13:44:52 -05:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Fetches and displays all information that it can from the specified server
|
|
|
|
*
|
|
|
|
* @package phpLDAPadmin
|
|
|
|
* @subpackage Page
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
*/
|
|
|
|
|
|
|
|
require './common.php';
|
|
|
|
|
|
|
|
$attrs = $app['server']->getRootDSE();
|
|
|
|
|
|
|
|
printf('<h3 class="title">%s%s</h3>',_('Server info for: '),$app['server']->getName());
|
|
|
|
printf('<h3 class="subtitle">%s</h3>',_('Server reports the following information about itself'));
|
|
|
|
|
|
|
|
if (! count($attrs)) {
|
|
|
|
echo '<br /><br />';
|
|
|
|
printf('<div style="text-align: center;">%s</div>',_('This server has nothing to report.'));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
echo '<table class="result" border="0">';
|
|
|
|
foreach ($attrs as $key => $values) {
|
|
|
|
if ($key == 'dn')
|
2019-02-12 14:57:50 -05:00
|
|
|
{
|
2019-02-08 13:44:52 -05:00
|
|
|
continue;
|
2019-02-12 14:57:50 -05:00
|
|
|
}
|
2019-02-08 13:44:52 -05:00
|
|
|
|
|
|
|
echo '<tr class="list_item"><td class="heading" rowspan="2">';
|
|
|
|
|
|
|
|
$sattr = $app['server']->getSchemaAttribute($key);
|
|
|
|
|
|
|
|
if ($sattr && $_SESSION[APPCONFIG]->isCommandAvailable('script','schema') && $_SESSION[APPCONFIG]->getValue('appearance','show_schema_link')) {
|
|
|
|
$href = sprintf('cmd.php?cmd=schema&server_id=%s&view=attributes&viewvalue=%s',$app['server']->getIndex(),$sattr->getName());
|
|
|
|
printf('<a href="%s" title="%s: %s" >%s</a>',
|
|
|
|
$href,_('Click to view the schema definition for attribute type'),$sattr->getName(false),$sattr->getName(false));
|
|
|
|
|
|
|
|
} else
|
2019-02-12 14:57:50 -05:00
|
|
|
{
|
2019-02-08 13:44:52 -05:00
|
|
|
echo $key;
|
2019-02-12 14:57:50 -05:00
|
|
|
}
|
2019-02-08 13:44:52 -05:00
|
|
|
|
|
|
|
echo '</td></tr>';
|
|
|
|
|
|
|
|
echo '<tr class="list_item"><td class="blank"> </td><td class="value">';
|
|
|
|
echo '<table class="result" border="0">';
|
|
|
|
|
|
|
|
if (is_array($values))
|
2019-02-12 14:57:50 -05:00
|
|
|
{
|
|
|
|
foreach ($values as $value)
|
|
|
|
{
|
2019-02-08 13:44:52 -05:00
|
|
|
$oidtext = '';
|
|
|
|
print '<tr>';
|
|
|
|
|
2019-02-12 14:57:50 -05:00
|
|
|
if (preg_match('/^[0-9]+\.[0-9]+/', $value))
|
|
|
|
{
|
|
|
|
printf('<td rowspan='2' style='width: 5 %%; vertical - align: top'><img src=' % s / rfc . png' title=' % s' alt=' % s'/></td>',
|
2019-02-08 13:44:52 -05:00
|
|
|
IMGDIR,$value,htmlspecialchars($value));
|
|
|
|
|
|
|
|
if ($oidtext = support_oid_to_text($value))
|
2019-02-12 14:57:50 -05:00
|
|
|
{
|
2019-02-08 13:44:52 -05:00
|
|
|
if (isset($oidtext['ref']))
|
2019-02-12 14:57:50 -05:00
|
|
|
{
|
|
|
|
printf('<td><acronym title=' % s'>%s</acronym></td>',$oidtext['ref'],$oidtext['title']); } else
|
|
|
|
{
|
|
|
|
printf('<td>%s</td>', $oidtext['title']);
|
|
|
|
}
|
|
|
|
} else
|
2019-02-08 13:44:52 -05:00
|
|
|
if (strlen($value) > 0)
|
2019-02-12 14:57:50 -05:00
|
|
|
{
|
|
|
|
printf('<td><small>%s</small></td>', $value);
|
|
|
|
}
|
2019-02-08 13:44:52 -05:00
|
|
|
|
2019-02-12 14:57:50 -05:00
|
|
|
} else
|
|
|
|
{
|
|
|
|
printf('<td rowspan='2' colspan='2'>%s</td>',$value);
|
2019-02-08 13:44:52 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
print '</tr>';
|
|
|
|
|
|
|
|
if (isset($oidtext['desc']) && trim($oidtext['desc']))
|
2019-02-12 14:57:50 -05:00
|
|
|
{
|
|
|
|
printf('<tr><td><small>%s</small></td></tr>', $oidtext['desc']);
|
|
|
|
} else
|
|
|
|
{
|
2019-02-08 13:44:52 -05:00
|
|
|
echo '<tr><td> </td></tr>';
|
2019-02-12 14:57:50 -05:00
|
|
|
}
|
2019-02-08 13:44:52 -05:00
|
|
|
|
|
|
|
if ($oidtext)
|
2019-02-12 14:57:50 -05:00
|
|
|
{
|
|
|
|
echo '<tr><td colspan='2'> </td></tr>'; }
|
2019-02-08 13:44:52 -05:00
|
|
|
}
|
2019-02-12 14:57:50 -05:00
|
|
|
}
|
2019-02-08 13:44:52 -05:00
|
|
|
|
|
|
|
else
|
2019-02-12 14:57:50 -05:00
|
|
|
{
|
|
|
|
printf('<tr><td colspan="2">%s </td></tr>', $values);
|
|
|
|
}
|
2019-02-08 13:44:52 -05:00
|
|
|
|
|
|
|
|
|
|
|
echo '</table>';
|
|
|
|
echo '</td></tr>';
|
|
|
|
}
|
|
|
|
echo '</table>';
|
2019-02-12 14:52:01 -05:00
|
|
|
|