<?
include_once( "./config.php" );
include_once ("./page.header.php");
// load the schema object ($s)
include_once( "./modules/schema/loader.php" );
// default list filter
if( ! $filter )
$filter = 'A';
FormStart( "$iconSchema Attributes starting with $filter", "width:80%" );
echo "<tr><td align=center>\n";
// show alphabet filter
echo "<p><span style=\"letter-spacing: 4px\">";
$letter ='A';
do {
if( $letter == $filter )
echo "$letter ";
else
echo "<a class=menu href=\"$PHP_SELF?A=attribute.list&filter=$letter\">$letter</a>";
if( $letter != 'Z' )
echo '|';
} while( $letter++ != 'Z' );
echo "</span></p>\n";
$cnt = 0;
echo '<table cellspacing=0 style="width:96%; border: 1px solid gray;">',
"<tr>",
"<th width=20 class=grid>", " ", "</th>\n", // icon column
"<th class=grid>", "Name", "</th>\n",
"<th class=grid>", "Type", "</th>\n",
"<th class=grid>", "OID", "</th>\n",
"<th class=grid>", "Other", "</th>\n",
"</tr>\n";
foreach( $s->attributes as $oc )
{
if( strtoupper(substr( $oc['name'], 0, 1 )) != $filter )
continue;
$cnt ++;
// DBG echo "<tr><td>"; print_r($oc); echo "</td></tr>\n";
$link = "<a href=\"$PHP_SELF?A=attribute.info&atr=$oc[name]\">";
echo "<tr>",
"<td class=grid> </td>",
"<td class=grid> $link $oc[name]</a></td>",
"<td class=grid> ", @$oc['type'], "</td>",
"<td class=grid> ", @$oc['syntax'],"</td>",
"<td class=grid> ", @$oc['single-value'] ? "single value" : "", "</td>",
"</tr>\n";
}
echo "</table>\n";
echo "</td></tr>";
// button bar
$wOCList = new Button( "Objectclasses list", "document.location='$PHP_SELF?A=objectclass.list'", "ocListBtn" );
echo "<tr><td class=form colspan=6 align=right>",
$wOCList->toString(), "\n",
"</td></tr>";
echo "</table></div></form>\n";
include_once ("./page.footer.php");
?>