isReadOnly()) pla_error(_('You cannot perform updates while server is in read-only mode')); if (! $ldapserver->haveAuthInfo()) pla_error(_('Not enough information to login to server. Please check your configuration.')); $dn = $_GET['dn']; $children = $ldapserver->getContainerContents($dn,0,'(objectClass=*)',LDAP_DEREF_NEVER); $has_children = count($children) > 0 ? true : false; include './header.php'; echo ''; printf('

'._('Delete %s').'

',htmlspecialchars(get_rdn($dn))); printf('

%s: %s     %s: %s

', _('Server'),$ldapserver->name,_('Distinguished Name'),htmlspecialchars($dn)); echo "\n"; echo '
'; if ($has_children) { printf('%s

',_('Permanently delete all children also?')); flush(); # get the total number of child objects (whole sub-tree) $s = $ldapserver->search(null,dn_escape($dn),'objectClass=*',array('dn')); $sub_tree_count = count($s); echo ''; echo ''; echo ''; echo ''; echo '

'; printf(_('This entry is the root of a sub-tree containing %s entries.'),$sub_tree_count); printf('(%s)', $ldapserver->server_id,rawurlencode('objectClass=*'),rawurlencode($dn),_('view entries')); echo '

'; printf(_('phpLDAPadmin can recursively delete this entry and all %s of its children. See below for a list of all the entries that this action will delete. Do you want to do this?'),($sub_tree_count-1)); echo '

'; printf('%s', _('Note: this is potentially very dangerous and you do this at your own risk. This operation cannot be undone. Take into consideration aliases, referrals, and other things that may cause problems.')); echo '

'; echo "\n"; echo ''; echo ''; echo ''; echo ''; echo ''; echo '
'; echo '
'; printf('',htmlspecialchars($dn)); printf('',$ldapserver->server_id); printf('',sprintf(_('Delete all %s objects'),$sub_tree_count)); echo '
'; echo '
'; echo '
'; printf('',htmlspecialchars($dn)); printf('',$ldapserver->server_id); printf('',_('Cancel')); echo '
'; echo '
'; echo "\n"; echo '

'; echo "\n"; flush(); echo '

'; echo _('List of entries to be deleted:'); echo '
'; printf(''; echo "\n"; } else { echo ''; echo ''; echo ''; echo ''; echo '
'; echo _('Are you sure you want to permanently delete this object?'); echo '

'; printf('%s: %s',_('Distinguished Name'),_('DN'),pretty_print_dn($dn)); echo '
'; printf('%s: %s',_('Server'),htmlspecialchars($ldapserver->name)); echo '

'; echo "\n"; echo ''; echo ''; echo ''; echo ''; echo ''; echo '
'; echo '
'; printf('',htmlspecialchars($dn)); printf('',$ldapserver->server_id); printf('',_('Delete')); echo '
'; echo '
'; echo '
'; printf('',htmlspecialchars($dn)); printf('',$ldapserver->server_id); printf('',_('Cancel')); echo '
'; echo '
'; echo "\n"; echo '
'; echo "\n"; } echo '
'; echo '
'; echo ''; echo ''; ?>