connect(), $results ); $all_attrs = array( '' => 1, 'dn' => 1 ); // Iterate over each entry and store the whole dang thing in memory (necessary to extract // all attribute names and display in table format in a single pass) $i = 0; $entries = array(); $entries_display = array(); while( $entry_id ) { $i++; if( $i <= $start_entry ) { $entry_id = ldap_next_entry( $ldapserver->connect(), $entry_id ); continue; } if( $i >= $end_entry ) break; $dn = ldap_get_dn( $ldapserver->connect(), $entry_id ); $dn_display = strlen( $dn ) > 40 ? "" . htmlspecialchars( substr( $dn, 0, 40 ) . '...' ) . "" : htmlspecialchars( $dn ); $encoded_dn = rawurlencode( $dn ); $rdn = get_rdn( $dn ); $icon = get_icon_use_cache( $ldapserver, $dn ); $attrs = ldap_get_attributes( $ldapserver->connect(), $entry_id ); $attr = ldap_first_attribute( $ldapserver->connect(), $entry_id, $attrs ); $attrs_display = array(); $edit_url = "edit.php?server_id=$server_id&dn=$encoded_dn"; $attrs_display[''] = "
'; //print_r( $attrs_display ); //echo "\n\n"; $entry_id = ldap_next_entry( $ldapserver->connect(), $entry_id ); } // end while( $entry_id ) $all_attrs = array_keys( $all_attrs ); /* echo ""; print_r( $all_attrs ); print_r( $entries_display ); echo ""; */ // Store the header row so it can be repeated later $header_row = ""; foreach( $all_attrs as $attr ) $header_row .= " \n"; // begin drawing table echo "$attr "; $header_row .= "
"; echo ""; echo " "; ?>\n"; for( $i=0; $i
"; echo ""; else echo " "; foreach( $all_attrs as $attr ) { echo " \n"; } echo ""; if( isset( $entry[ $attr ] ) ) echo $entry[ $attr ]; echo " \n"; } echo "