Location: PHPKode > projects > LDAP Navigator > ldapnavigator-0.9.6/modules/search/results.advanced.php
<?php

// a set of plugins to customize the attributes display
include_once( 'attribute.plugins.php' );


echo '<table cellspacing=0 style="border: 1px solid gray; width:90%">';

echo "<tr>",
		"<th width=20 class=grid>", "&nbsp;", "</th>\n";
foreach( $searchAttrs as $fieldName ) {
	echo "<th class=grid>", $fieldName , "</th>\n";
}
echo "</tr>\n";

// $DEBUG = 1;
	
while( $pos < ( $offset + $rowCount ) ) {

	$item = get_ldap_object( $items[$pos] );
	
	if( $pos % 2 )
		$bgcolor = "bgcolor=#CCCCF0";
	else
		$bgcolor = "";

	debug( $item );
	
	$icon = smartIcon( $item['objectclass'] );

	
	$encdn = urlencode($item['dn']);
	$tooltip = utf8_decode($item['dn']); // @TODO : escape " char
	$mail = attributeFormat( 'mail', $item['mail'][0] );
		
				
	echo "<TR $bgcolor>";
	
	echo "<TD class=\"grid\">", "<img src=\"img/$icon\" border=0>", "</TD>\n";
	
	foreach( $searchAttrs as $fieldName ) {
		
		// we try to find a plugin displayer 
		if( isset(	$attributesPluginsMap[$fieldName]) ) {
			$attributePlugin = $attributesPluginsMap[$fieldName];
			$data = $attributePlugin( $item[$fieldName][0], 0 );
		// or we fallback to default display
		} else {
			$data = $item[$fieldName][0];
		}
		debug( $data );
		echo "<TD class=\"grid\"><a title=\"$tooltip\" href=\"submit.php?A=entry.properties&dn=$encdn&prevURL=$prevURL\">" . 
			$data . "</a>&nbsp;</TD>\n";
	}
	
	echo "</TR>\n";

	$pos ++;

}

echo "</table>\n";

?>
Return current item: LDAP Navigator