$new_oclass ); if( is_array( $new_attrs ) && count( $new_attrs ) > 0 ) foreach( $new_attrs as $attr => $val ) { // Check to see if this is a unique Attribute if( $badattr = checkUniqueAttr( $server_id, $dn, $attr, array($val) ) ) { $search_href='search.php?search=true&form=advanced&server_id=' . $server_id . '&filter=' . $attr . '=' . $badattr; pla_error(sprintf( $lang['unique_attr_failed'] , $attr,$badattr,$dn,$search_href ) ); } $new_entry[ $attr ] = $val; } //echo "
"; //print_r( $new_entry ); //exit; $ds = pla_ldap_connect( $server_id ); pla_ldap_connection_is_error( $ds ); $add_res = @ldap_mod_add( $ds, $dn, $new_entry ); if( ! $add_res ) { pla_error( $lang['could_not_perform_ldap_mod_add'], ldap_error( $ds ), ldap_errno( $ds ) ); } else { header( "Location: edit.php?server_id=$server_id&dn=$encoded_dn&modified_attrs[]=objectclass" ); } ?>