Location: PHPKode > projects > LDAP Navigator > ldapnavigator-0.9.6/modules/schema/objectclass.list.php
<?
	include_once( "./config.php" );
	include_once ("./page.header.php");
	
	// load the schema object ($s)
	include_once( "./modules/schema/loader.php" );	

	// default list filter
	if( ! isset($filter) )
		$filter = 'A';
		
	
	
	echo "<div align=center width=90%>\n";
	html::form( $PHP_SELF, "get", "name=frm" );
	html::hidden( "A", $A );
	html::hidden( "filter", $filter );
	html::hidden( "refresh", "" );
	
	FormStart( "$iconSchema Objectclass commen├žant par $filter", "width:90%;" );

	$numclass = count($s->objectclasses);
	$numattrs = count($s->attributes);
	
	// show alphabet filter
	echo "<tr><td align=center>\n";
	echo "Schema describe $numclass objectclasses and $numattrs attributes<br>";
	echo "<span style=\"letter-spacing: 4px\">";
	$letter ='A';
	do {
		if( $letter != 'A' )
			echo '|';
			
		if( $letter == $filter )
			echo $letter;
		else 
			echo "<a class=menu href=\"$PHP_SELF?A=$A&filter=$letter\">$letter</a>";

	} while( $letter++ != 'Z' );
	
	echo "</span><br></td></tr><tr><td>\n\n";
		
	$cnt = 0;	
	echo '<table cellspacing=0 style="border: 1px solid gray; width:96%">', "\n",
		" <tr>",
		"  <th width=20 class=grid>", "&nbsp;", "</th>\n", // icon column
		"  <th class=grid> ", "Name", " </th>\n",
		"  <th class=grid> ", "Extends", " </th>\n",
		"  <th class=grid> ", "OID", " </th>\n",
		"  <th class=grid> ", "Type", " </th>\n",
		" </tr>\n";

//	ksort( $s->objectclasses );
	
	foreach( $s->objectclasses as $oc ) 
	{
		// ignore non matching objectclasses
		if( $filter != strtoupper(substr( $oc['name'], 0, 1 )) )
			continue;
			
		$cnt ++;
		$link = "<a href=\"$PHP_SELF?A=objectclass.info&oc=$oc[name]\">";
		
		echo "<tr>",
			"<td class=grid>&nbsp;</td>",
			"<td class=grid> $link $oc[name]</a></td>",
			"<td class=grid> $oc[superiorClass]</td>",
			"<td class=grid> $oc[oid]</td>",
			"<td class=grid> $oc[type]</td>",
		"</tr>\n";			

	}
	echo "</table>\n";
	
	echo "</td></tr>";

	// button bar
	
	$wAbList  = new Button( "Attributes list", "this.form.A.value='attribute.list';this.form.submit()", "listBtn" );
	
	$wRefresh  = new Button( "Refresh schema cache", "this.form.refresh.value=1;this.form.submit()", "listBtn" );

	echo "<tr><td class=form colspan=2 align=right>",
           	 $wAbList->toString(),
          	 $wRefresh->toString(),
     	  "</td></tr>";
	echo "</table></form>";

	echo $statusMsg;
	
	echo "</div>\n";
	
	include_once ("./page.footer.php");

?>
Return current item: LDAP Navigator