Exemplo n.º 1
0
 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 {
     echo $key;
 }
 echo '</td></tr>';
 echo '<tr class="list_item"><td class="blank">&nbsp;</td><td class="value">';
 echo '<table class="result" border="0">';
 if (is_array($values)) {
     foreach ($values as $value) {
         $oidtext = '';
         print '<tr>';
         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>', IMGDIR, $value, htmlspecialchars($value));
             if ($oidtext = support_oid_to_text($value)) {
                 if (isset($oidtext['ref'])) {
                     printf('<td><acronym title="%s">%s</acronym></td>', $oidtext['ref'], $oidtext['title']);
                 } else {
                     printf('<td>%s</td>', $oidtext['title']);
                 }
             } else {
                 if (strlen($value) > 0) {
                     printf('<td><small>%s</small></td>', $value);
                 }
             }
         } else {
             printf('<td rowspan="2" colspan="2">%s</td>', $value);
         }
         print '</tr>';
         if (isset($oidtext['desc']) && trim($oidtext['desc'])) {
Exemplo n.º 2
0
         }
     } else {
         echo '&nbsp;';
     }
     echo '</td>';
     foreach ($attrs as $attr) {
         echo '<td>';
         if (isset($results[$key][$attr])) {
             if (!is_array($results[$key][$attr])) {
                 $sc = array($results[$key][$attr]);
             } else {
                 $sc = $results[$key][$attr];
             }
             if (strcasecmp('supportedcontrol', $attr) == 0) {
                 foreach ($sc as $control) {
                     $oidtotext = support_oid_to_text($control);
                     printf('<acronym title="%s">%s</acronym><br/>', $control, $oidtotext['title']);
                 }
             } else {
                 printf('%s ', implode('<br/>', $sc));
             }
         } else {
             echo '&nbsp;';
         }
         echo '</td>';
     }
     echo '</tr>';
 }
 echo '</table></td></tr>';
 echo '</table>';
 echo '</td></tr>';