Location: PHPKode > projects > LDAP Navigator > ldapnavigator-0.9.6/modules/aci/aci.delete.php
<?php


if( ! isset($idx) )
	ErrorPage( "Missing parameter", "the idx parameter is missing" );

if( ! $dn )
	ErrorPage( "Missing parameter", "the dn parameter is missing" );

// we can only delete an existing aci
if( $idx == "_new_" ) 
	ErrorPage( "Error", "can not delete the new aci (not created yet)" );
	
$sr = ldap_read( $ds, $dn, "objectclass=*", array("aci" ) );
list( $entry, $dummy ) = ldap_get_entries( $ds, $sr );
$aciToDelete = $entry['aci'][$idx];

$ret = @ldap_mod_del( $ds, $dn, array( 'aci' => $aciToDelete ) );
if( ! $ret )
	ErrorPage( "Delete failed", "LDAP server message  : " . ldap_error($ds) );

$idx = ""; 
unset($aci);


?>
Return current item: LDAP Navigator