:     :

0 ) { if( $children_count == $max_children ) $children_count = $children_count . '+'; ?> 1 ) { ?> $attr ) { $modified_attrs[$i] = strtolower( $attr ); } } ?>
">
"> ">

$vals ) { $counter++; $schema_href = "schema.php?server_id=$server_id&view=attributes&viewvalue=" . real_attr_name($attr); ?> \n"; } ?> \n"; echo "

1 ) { for( $i=1; $i<=count($vals); $i++ ) { ?> "> ()

\n"; } } ?>
(" . $lang['no_internal_attributes'] . ")
(" . $lang['no_attributes'] . ")
"; echo ""; die(); } uksort( $attrs, 'sortAttrs' ); foreach( $attrs as $attr => $vals ) { flush(); $schema_attr = get_schema_attribute( $ldapserver, $attr, $dn ); if( $schema_attr ) $attr_syntax = $schema_attr->getSyntaxOID(); else $attr_syntax = null; if( 0 == strcasecmp( $attr, 'dn' ) ) continue; // has the config.php specified that this attribute is to be hidden or shown? if( is_attr_hidden( $ldapserver, $attr)) continue; // Setup the $attr_note, which will be displayed to the right of the attr name (if any) $attr_note = ''; // is there a user-friendly translation available for this attribute? if( isset( $friendly_attrs[ strtolower( $attr ) ] ) ) { $attr_display = $friendly_attrs[ strtolower( $attr ) ]; $attr_note = "alias"; } else { $attr_note = ""; $attr_display = $attr; } // is this attribute required by an objectClass? $required_by = ''; if( $schema_attr ) foreach( $schema_attr->getRequiredByObjectClasses() as $required ) if( isset($attrs['objectClass']) && in_array( strtolower( $required ), arrayLower( $attrs['objectClass'] ) ) ) $required_by .= $required . ' '; // It seems that some LDAP servers (Domino) returns attributes in lower case? elseif( isset($attrs['objectclass']) && in_array( strtolower( $required ), arrayLower( $attrs['objectclass'] ) ) ) $required_by .= $required . ' '; if( $required_by ) { if( trim( $attr_note ) ) $attr_note .= ', '; $attr_note .= "" . $lang['required'] . " "; } // is this attribute required because its the RDN if (preg_match("/^${attr}=/",$rdn)) { if( trim( $attr_note ) ) $attr_note .= ', '; $attr_note .= " " . 'rdn' . " "; } ?> () isReadOnly() || is_attr_read_only( $ldapserver, $attr ) ) draw_jpeg_photos( $ldapserver, $dn, $attr, false ); else draw_jpeg_photos( $ldapserver, $dn, $attr, true ); // proceed to the next attribute echo "\n"; if( $is_modified_attr ) echo ''; continue; } /* * Is this attribute binary? */ if( is_attr_binary( $ldapserver, $attr ) ) { $href = "download_binary_attr.php?server_id=$server_id&dn=$encoded_dn&attr=$attr"; ?>
1 ) { for( $i=1; $i<=count($vals); $i++ ) { ?> "> ()

'; continue; } /* * Note: at this point, the attribute must be text-based (not binary or jpeg) */ // If we this is the userPassword attribute, add the javascript so we can call check password later. if (! strcasecmp( $attr, 'userPassword' ) ) { $user_password = $vals[0]; ?> $val ) { if( trim( $val ) == "" ) echo "[" . $lang['empty'] . "]
\n"; elseif( 0 == strcasecmp( $attr, 'userPassword' ) && obfuscate_password_display() ) echo preg_replace( '/./', '*', $val ) . "
"; elseif( in_array(strtolower($attr), $shadow_format_attrs) ) { $shadow_date = shadow_date( $attrs, $attr); echo htmlspecialchars($val)." "; echo ""; if( ($today < $shadow_date) && in_array(strtolower($attr), $shadow_before_today_attrs) ) echo ''.htmlspecialchars("(".strftime(get_date_format(),$shadow_date).")").''; elseif( $today > $shadow_date && in_array(strtolower($attr), $shadow_after_today_attrs) ) echo ''.htmlspecialchars("(".strftime(get_date_format(),$shadow_date).")").''; else echo htmlspecialchars("(".strftime(get_date_format(),shadow_date( $attrs, $attr)).")"); echo ""; } else echo htmlspecialchars( $val ) . "
"; } } else { if( 0 == strcasecmp( $attr, 'userPassword' ) && obfuscate_password_display() ) echo preg_replace( '/./', '*', $vals ) . "
"; else echo $vals . "
"; ?> "; echo ""; if( $is_modified_attr ) echo ''; continue; } /* * Is this a userPassword attribute? */ if( 0 == strcasecmp( $attr, 'userpassword' ) ) { $user_password = $vals[0]; $enc_type = get_enc_type( $user_password ); // Set the default hashing type if the password is blank (must be newly created) if( $user_password == '' ) { $enc_type = get_default_hash( $server_id ); } ?>

'; continue; } /* * Is this a boolean attribute? */ if( is_attr_boolean( $ldapserver, $attr) ) { $val = $vals[0]; ?> '; continue; } /* * End of special case attributes (non plain text). */ /* * This is a plain text attribute, to be displayed and edited in plain text. */ foreach( $vals as $i => $val ) { $input_name = "new_values[" . htmlspecialchars( $attr ) . "][$i]"; // We smack an id="..." tag in here that doesn't have [][] in it to allow the // draw_chooser_link() to identify it after the user clicks. $input_id = "new_values_" . htmlspecialchars($attr) . "_" . $i; ?> type == 'structural') { echo "$val (" . $lang['structural'] . ")
"; ?> 0 ) { echo "
"; $group = array_pop( $group ); $group_dn = $group['dn']; $group_name = explode( '=', get_rdn( $group_dn ) ); $group_name = $group_name[1]; $href = "edit.php?server_id=$server_id&dn=" . urlencode( $group_dn ); echo ""; echo "" . htmlspecialchars($group_name) . ""; $description = isset( $group['description'] ) ? $group['description'] : null; if( $description ) echo " (" . htmlspecialchars( $description ) . ")"; echo ""; } } // Show the dates for all the shadow attributes. if( in_array(strtolower($attr), $shadow_format_attrs) ) { if( ( $shadow_date = shadow_date( $attrs, $attr) ) !== false ) { echo "
"; echo ""; if( ($today < $shadow_date) && in_array(strtolower($attr), $shadow_before_today_attrs) ) echo ''.htmlspecialchars(strftime(get_date_format(),$shadow_date)).''; elseif( $today > $shadow_date && in_array(strtolower($attr), $shadow_after_today_attrs) ) echo ''.htmlspecialchars(strftime(get_date_format(),$shadow_date)).''; else echo htmlspecialchars(strftime(get_date_format(),$shadow_date)); echo ""; } } ?>
getIsSingleValue() ) { $add_href = "add_value_form.php?server_id=$server_id&" . "dn=$encoded_dn&attr=" . rawurlencode( $attr ); echo "
(" . $lang['add_value'] . ")
\n"; } ?> $vals ) */ ?>
$values ) if( 0 == strcasecmp( $attr, $x ) ) return false; return true; } echo "\n"; ?>