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

echo '<table cellspacing=0 style="border: 1px solid gray; width:90%">';
echo "<tr>",
	"<th width=20 class=grid>", "&nbsp;", "</th>\n", // column
	"<th class=grid>", "Name", "</th>\n",
	"<th class=grid>", "Description", "</th>\n",
	"<th class=grid>", "Service", "</th>\n",
	"<th class=grid>", "Email", "</th>\n",
	"</tr>\n";

while( $pos < ( $offset + $rowCount ) ) {

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

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

	// choix du champ a afficher comme "Nom"			
	if( $item['cn'] )
		$commonname = $item['cn'][0];
	elseif( $item['ou'] )
		$commonname = $item['ou'][0];
	else {
		list( $commonname, $dummy ) = ldap_explode_dn( $item['dn'], 0 );
	}
	
	$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";
	echo "<TD class=\"grid\"><a title=\"$tooltip\" href=\"submit.php?A=entry.properties&dn=$encdn&prevURL=$prevURL\">" . 
		$commonname . "</a></TD>\n";
	echo "<TD class=\"grid\">", $item['description'][0], "&nbsp;</TD>\n";
	echo "<TD class=\"grid\">", $item['ou'][0], "&nbsp;</TD>\n";
	echo "<TD class=\"grid\">", $mail, "&nbsp;</TD>\n";
	echo "</TR>\n";
	$pos ++;
}

echo "</table>\n";

?>
Return current item: LDAP Navigator