server_id,$encoded_dn); $export_href_base = sprintf('export_form.php?%s&scope=%s',$url_base,'base'); $export_href_sub = sprintf('export_form.php?%s&scope=%s',$url_base,'sub'); $refresh_href = sprintf('template_engine.php?%s&random=%s',$url_base,$random_junk); $copy_href = sprintf('copy_form.php?%s',$url_base); $intattr_href = sprintf('template_engine.php?%s&show_internal_attrs=true',$url_base); $delete_href = sprintf('delete_form.php?%s',$url_base); $rename_href = sprintf('rename_form.php?%s',$url_base); $compare_href = sprintf('compare_form.php?%s',$url_base); $create_href = sprintf('create_form.php?server_id=%s&container=%s',$ldapserver->server_id,$encoded_dn); $addattr_href = sprintf('add_attr_form.php?%s',$url_base); echo ''; if ($dn) { $actionlayout = '%s%s'; $hintlayout = 'Hint%s'; printf('

%s

',htmlspecialchars($rdn)); printf('

%s: %s     %s: %s

', _('Server'),$ldapserver->name,_('Distinguished Name'),htmlspecialchars($dn)); echo "\n"; echo ''; printf($actionlayout,'refresh.png','Refresh',$refresh_href,_('Refresh this entry'),_('Refresh')); printf($actionlayout,'save.png','Save',$export_href_base,_('Save a dump of this object'),_('Export')); echo ''; printf($actionlayout,'cut.png','Cut',$copy_href,_('Copy this object to another location, a new DN, or another server'),_('Copy or move this entry')); if ($show_internal_attrs) printf($actionlayout,'tools-no.png','Hide',$refresh_href,'',_('Hide internal attributes')); else printf($actionlayout,'tools.png','Show',$intattr_href,'',_('Show internal attributes')); echo ''; if (! $ldapserver->isReadOnly()) { echo ''; printf($actionlayout,'trash.png','Trash',$delete_href,_('You will be prompted to confirm this decision'),_('Delete this entry')); printf($actionlayout,'rename.png','Rename',$rename_href,'',_('Rename')); echo ''; if ($config->GetValue('appearance','show_hints')) { echo ''; printf($hintlayout,_('Hint: To delete an attribute, empty the text field and click save.')); echo ''; } echo ''; printf($actionlayout,'compare.png','Compare',$compare_href,'',_('Compare with another entry')); echo ''; echo ''; printf($actionlayout,'star.png','Create',$create_href,'',_('Create a child entry')); printf($actionlayout,'add.png','Add',$addattr_href,'',_('Add new attribute')); echo ''; } flush(); $children = $ldapserver->getContainerContents($dn,$max_children,'(objectClass=*)',$config->GetValue('deref','view')); if (($children_count = count($children)) > 0) { if ($children_count == $max_children) $children_count = $children_count.'+'; $child_href = sprintf('search.php?server_id=%s&search=true&filter=%s&base_dn=%s&form=advanced&scope=one', $ldapserver->server_id,rawurlencode('objectClass=*'),$encoded_dn); echo ''; printf($actionlayout,'children.png','Children',$child_href,'',($children_count == 1) ? _('View 1 child') : sprintf(_('View %s children'),$children_count)); printf($actionlayout,'save.png','Save',$export_href_sub,_('Save a dump of this object and all of its children'),_('Export subtree')); echo ''; } if ($config->GetValue('appearance','show_hints')) { echo ''; printf($hintlayout,_('Hint: To view the schema for an attribute, click the attribute name.')); echo ''; } if ($ldapserver->isReadOnly()) { echo ''; printf($hintlayout,_('Viewing entry in read-only mode.')); echo ''; } if ($modified_attrs) { echo ''; printf($hintlayout, ($children_count == 1) ? sprintf(_('An attribute (%s) was modified and is highlighted below.'),implode('',$modified_attrs)) : sprintf(_('Some attributes (%s) were modified and are highlighted below.'),implode(', ',$modified_attrs))); echo ''; } echo '
'; flush(); if (! $ldapserver->isReadOnly()) { echo '
'; printf('',$ldapserver->server_id); printf('',htmlspecialchars($dn)); } echo '
'."\n\n"; echo ''; if ($show_internal_attrs) { $counter = 0; foreach ($ldapserver->getDNSysAttrs($dn) as $attr => $vals) { $counter++; $schema_href = sprintf('schema.php?server_id=%s&view=attributes&viewvalue=%s', $ldapserver->server_id,real_attr_name($attr)); printf('', $attr,$schema_href,htmlspecialchars($attr)); echo ''; } if ($counter == 0) printf('',_('No internal attributes')); echo "\n\n"; } flush(); } else { printf('

%s

',_('Create Object')); printf('

%s: %s     %s: %s

', _('Server'),$ldapserver->name,_('using template'),htmlspecialchars($_REQUEST['template'])); } ?>
%s
'; if ($ldapserver->isAttrBinary($attr)) { $href = sprintf('download_binary_attr.php?server_id=%s&dn=%s&attr=%s',$server_id,$encoded_dn,$attr); echo _('Binary value'); echo '
'; if (count($vals) > 1) { for ($i=1;$i<=count($vals);$i++) printf(' %s(%s)
', $href,$i,_('download value'),$i); } else { printf(' %s
', $href,_('download value')); } } else { foreach ($vals as $v) printf('%s
',htmlspecialchars($v)); } echo '
(%s)