haveAuthInfo()) pla_error( $lang['not_enough_login_info'] ); $view = isset($_GET['view']) ? $_GET['view'] : 'objectClasses'; $viewvalue = isset($_GET['viewvalue']) ? $_GET['viewvalue'] : null; if (trim($viewvalue) == "") $viewvalue = null; if (! is_null($viewvalue)) $viewed = false; include './header.php'; $schema_error_str = sprintf('%s %s.

%s', $lang['could_not_retrieve_schema_from'],htmlspecialchars($ldapserver->name), $lang['reasons_for_error'],$lang['schema_retrieve_error_1'], $lang['schema_retrieve_error_2'],$lang['schema_retrieve_error_3'], $lang['schema_retrieve_error_4']); ?>

name); ?>


%s', $ldapserver->server_id,'objectClasses',$lang['objectclasses'])); ?> | %s', $ldapserver->server_id,'attributes',$lang['attribute_types'])); ?> | %s', $ldapserver->server_id,'syntaxes',$lang['syntaxes'])); ?> | %s', $ldapserver->server_id,'matching_rules',$lang['matchingrules'])); ?>

'; printf('%s%s',$lang['syntax_oid'],$lang['desc']); $counter = 1; $schema_syntaxes = $ldapserver->SchemaSyntaxes(null,true); if (! $schema_syntaxes) pla_error($schema_error_str); foreach ($schema_syntaxes as $syntax) { $counter++; $oid = htmlspecialchars($syntax->getOID()); $desc = htmlspecialchars($syntax->getDescription()); if ($highlight_oid && $highlight_oid == $oid) echo ''; else printf('',$counter%2==0?'even':'odd'); printf('%s%s',$oid,$oid,$desc); } print ''; break; case 'attributes': $schema_attrs = $ldapserver->SchemaAttributes(null,true); $schema_object_classes = $ldapserver->SchemaObjectClasses(null,true); if (! $schema_attrs || ! $schema_object_classes) pla_error($schema_error_str); ?> :

getName())) { if (! is_null($viewvalue)) $viewed = true; printf('', strtolower($attr->getName()),$attr->getName()); $counter = 0; foreach ( array('desc','obsolete','inherits','equality','ordering','substring_rule','syntax', 'single_valued','collective','user_modification','usage','maximum_length', 'aliases','used_by_objectclasses' ) as $item) { printf('',++$counter%2 ? 'odd' : 'even'); printf('',$lang[$item]); switch ($item) { case 'desc': printf('', is_null($attr->getDescription()) ? '('.$lang['no_description'].')' : $attr->getDescription()); print ''; printf('',++$counter%2 ? 'odd' : 'even'); printf('',$lang['oid']); printf('',$attr->getOID()); break; case 'obsolete': printf('',$attr->getIsObsolete() ? ''.$lang['yes'].'' : $lang['no']); break; case 'inherits': print ''; break; case 'equality': printf('', is_null($attr->getEquality()) ? '('.$lang['not_specified'].')' : sprintf('%s', $ldapserver->server_id,$attr->getEquality(),$attr->getEquality())); break; case 'ordering': printf('', is_null($attr->getOrdering()) ? '('.$lang['not_specified'].')' : $attr->getOrdering()); break; case 'substring_rule': printf('', is_null($attr->getSubstr()) ? '('.$lang['not_specified'].')' : $attr->getSubstr()); break; case 'syntax': print ''; break; case 'single_valued': printf('',$attr->getIsSingleValue() ? $lang['yes'] : $lang['no']); break; case 'collective': printf('',$attr->getIsCollective() ? $lang['yes'] : $lang['no']); break; case 'user_modification': printf('',$attr->getIsNoUserModification() ? $lang['no'] : $lang['yes']); break; case 'usage': printf('',$attr->getUsage() ? $attr->getUsage() : '('.$lang['not_specified'].')'); break; case 'maximum_length': print ''; break; case 'aliases': print ''; break; case 'used_by_objectclasses': print ''; break; } print ''; } flush(); } } print '
%s
%s%s
%s%s%s'; if (is_null($attr->getSupAttribute())) printf('(%s)',$lang['none']); else printf('%s', $ldapserver->server_id,$view, strtolower($attr->getSupAttribute()),$attr->getSupAttribute()); print '%s%s%s'; if (is_null($attr->getType())) { echo $attr->getSyntaxOID(); } else { printf('%s (%s)', $ldapserver->server_id, $attr->getSyntaxOID(),$attr->getSyntaxOID(), $attr->getType(),$attr->getSyntaxOID()); } print '%s%s%s%s'; if ( is_null($attr->getMaxLength())) echo '('.$lang['not_applicable'].')'; else printf('%s %s',number_format($attr->getMaxLength()), $attr->getMaxLength()>1 ? $lang['characters'] : $lang['character']); print ''; if (count($attr->getAliases()) == 0) echo '('.$lang['none'].')'; else foreach ($attr->getAliases() as $alias_attr_name) printf('%s', $ldapserver->server_id,$alias_attr_name,$alias_attr_name); print ''; if (count($attr->getUsedInObjectClasses()) == 0) echo '('.$lang['none'].')'; else foreach ($attr->getUsedInObjectClasses() as $used_in_oclass) printf('%s ', $ldapserver->server_id,$used_in_oclass,$used_in_oclass); print '
'; break; case 'matching_rules': $schema_matching_rules = $ldapserver->MatchingRules(null,true); if (! $schema_matching_rules) pla_error($schema_error_str); printf('%s
',$lang['jump_to_matching_rule']); print '
'; printf('',$ldapserver->server_id); print ''; print ''; printf('',$lang['go']); print '
'; print ''; printf('', $lang['matching_rule_oid'],$lang['name'],$lang['used_by_attributes']); $counter = 1; foreach ($schema_matching_rules as $rule) { $counter++; $oid = htmlspecialchars($rule->getOID()); $desc = htmlspecialchars($rule->getName()); if ( is_null($viewvalue) || $viewvalue == ($rule->getName())) { if (! is_null($viewvalue)) $viewed = true; if (null != $rule->getDescription()) $desc .= sprintf(' (%s)',$rule->getDescription()); if ( $rule->getIsObsolete()) $desc .= sprintf(' %s',$lang['obsolete']); printf('',$counter%2 ? 'odd' : 'even'); printf('',$oid); printf('',$desc); print ''; print ''; } } print '
%s%s%s
%s%s'; if (count($rule->getUsedByAttrs()) == 0) { printf('
(%s)


',$lang['none']); } else { print '
'; print '
'; printf('',$ldapserver->server_id); print ''; print '
'; printf('',$lang['go']); print '
'; print '
'; } print '
'; break; case 'objectClasses': $schema_oclasses = $ldapserver->SchemaObjectClasses(null,true); if (! $schema_oclasses) pla_error($schema_error_str); ?> :

$oclass) { foreach ($oclass->getSupClasses() as $parent_name) { if (isset($schema_oclasses[$parent_name])) $schema_oclasses[$parent_name]->addChildObjectClass($oclass->getName()); } if ( is_null($viewvalue) || ! strcasecmp($viewvalue,$oclass->getName())) { if ( ! is_null($viewvalue)) $viewed = true; ?>

getName(); ?>

: getOID(); ?>

getDescription()) { ?>

: getDescription(); ?>

: getType(); ?>

getIsObsolete()) { ?>

: getSupClasses()) == 0) printf('(%s)',$lang['none']); else foreach ($oclass->getSupClasses() as $i => $object_class) { printf('%s', $lang['jump_to_this_oclass'],$ldapserver->server_id,$view,htmlspecialchars($object_class), htmlspecialchars($object_class)); if ($i < count($oclass->getSupClasses()) - 1) print ', '; } ?>

: getName(),'top') == 0) printf('(all)',$ldapserver->server_id); elseif (count($oclass->getChildObjectClasses()) == 0) printf('(%s)',$lang['none']); else foreach ($oclass->getChildObjectClasses() as $i => $object_class) { printf('%s', $lang['jump_to_this_oclass'],$ldapserver->server_id,$view,htmlspecialchars($object_class), htmlspecialchars($object_class)); if ( $i < count($oclass->getChildObjectClasses()) - 1) print ', '; } ?>

getMustAttrs($schema_oclasses)) > 0) { print '
    '; foreach ($oclass->getMustAttrs($schema_oclasses) as $attr) { print '
  • '; printf('%s', $ldapserver->server_id,rawurlencode($attr->getName()),htmlspecialchars($attr->getName())); if ($attr->getSource() != $oclass->getName()) { printf('
      (%s ',$lang['inherited_from']); printf('%s', $ldapserver->server_id,$attr->getSource(),$attr->getSource()); print ')'; } print '
  • '; } print '
'; } else printf('
(%s)
',$lang['none']); ?>
getMayAttrs($schema_oclasses)) > 0) { print '
    '; foreach ($oclass->getMayAttrs($schema_oclasses) as $attr) { print '
  • '; printf('%s', $ldapserver->server_id,rawurlencode($attr->getName()),htmlspecialchars($attr->getName())); if ($attr->getSource() != $oclass->getName()) { printf('
       (%s ',$lang['inherited_from']); printf('%s', $ldapserver->server_id,$attr->getSource(),$attr->getSource()); print ')'; } print '
  • '; } print '
'; } else printf('
(%s)
',$lang['none']); ?>