<?
include_once( "./config.php" );
// load the schema object ($s)
include_once( "./modules/schema/loader.php" );
$URL_LDAPSCHEMA = "http://ldap.hklc.com/attribute.html";
$attribute = $s->attributes[strtolower($atr)];
if( ! is_array( $attribute ) )
ErrorPage( "Error", "No such attribute : $atr" );
$pageTitle = "$atr attribute";
include_once( "./page.header.php" );
$moreinfoLink = "<a class=menu href=\"$URL_LDAPSCHEMA?attribute=$attribute[name]\">Definition on ldap.hklc.com</a>";
html::form( $PHP_SELF, "get" );
FormStart( $pageTitle );
FormLine( "Name", @$attribute['name'] );
FormLine( "Type", @$attribute['type'] );
FormLine( "Syntax", @$attribute['syntax'] );
if( $attribute['single-value'] )
FormLine( "Constraints", "single value" );
FormLine( "Description", @$attribute['description'] . "<br>$moreinfoLink" );
// creates buttons...
$wBack = new Button( "Back", "javascript:history.go(-1)", "backBtn" );
$wOCList = new Button( "Objectclasses list", "document.location='$PHP_SELF?A=objectclass.list'", "ocListBtn" );
$wATList = new Button( "Attributes list", "document.location='$PHP_SELF?A=attribute.list'", "atListBtn" );
// ...and display buttons bar
echo "<tr><td class=form colspan=2 align=right>",
$wBack->toString(), "\n",
$wATList->toString(), "\n",
$wOCList->toString(), "\n",
"</td></tr>";
echo "</table></div></form>\n";
include_once( "./page.footer.php" );
?>