RELEASE 0.9.8

This commit is contained in:
Deon George
2009-06-30 20:26:08 +10:00
parent 1f7f96122f
commit fdee1bdbd1
242 changed files with 34529 additions and 34446 deletions

View File

@@ -1,6 +1,6 @@
<?php
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/template_header.php,v 1.6 2005/09/04 18:41:34 wurley Exp $
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/template_header.php,v 1.6.4.5 2005/12/09 14:32:37 wurley Exp $
/**
* Header page for engine.
* @package phpLDAPadmin
@@ -15,75 +15,66 @@ $url_base = sprintf('server_id=%s&amp;dn=%s',$ldapserver->server_id,$encoded_dn)
$export_href_base = sprintf('export_form.php?%s&amp;scope=%s',$url_base,'base');
$export_href_sub = sprintf('export_form.php?%s&amp;scope=%s',$url_base,'sub');
$refresh_href = sprintf('edit.php?%s&amp;random=%s',$url_base,$random_junk);
$refresh_href = sprintf('template_engine.php?%s&amp;random=%s',$url_base,$random_junk);
$copy_href = sprintf('copy_form.php?%s',$url_base);
$intattr_href = sprintf('edit.php?%s&amp;show_internal_attrs=true',$url_base);
$intattr_href = sprintf('template_engine.php?%s&amp;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&amp;container=%s',$ldapserver->server_id,$encoded_dn);
$addattr_href = sprintf('add_attr_form.php?%s',$url_base);
?>
<body>
echo '<body>';
<?php if ($dn) { ?>
<h3 class="title"><?php echo htmlspecialchars($rdn); ?></h3>
<h3 class="subtitle"><?php echo $lang['server']; ?>: <b><?php echo $ldapserver->name; ?></b> &nbsp;&nbsp;&nbsp; <?php echo $lang['distinguished_name'];?>: <b><?php echo htmlspecialchars( ( $dn ) ); ?></b></h3>
if ($dn) {
$actionlayout = '<td class="icon"><img src="images/%s" /></td><td><a href="%s" title="%s">%s</a></td>';
$hintlayout = '<td class="icon"><img src="images/light.png" /></td><td colspan="3"><span class="hint">%s</span></td>';
<table class="edit_dn_menu">
<tr>
<td class="icon"><img src="images/refresh.png" /></td>
<td><a href="<?php echo $refresh_href; ?>" title="<?php echo $lang['refresh_this_entry']; ?>"><?php echo $lang['refresh_entry']; ?></a></td>
<td class="icon"><img src="images/save.png" /></td>
<td><a href="<?php echo $export_href_base; ?>" title="<?php echo $lang['export_tooltip']; ?>"><?php echo $lang['export']; ?></a></td>
</tr>
printf('<h3 class="title">%s</h3>',htmlspecialchars($rdn));
printf('<h3 class="subtitle">%s: <b>%s</b> &nbsp;&nbsp;&nbsp; %s: <b>%s</b></h3>',
_('Server'),$ldapserver->name,_('Distinguished Name'),htmlspecialchars($dn));
<tr>
<td class="icon"><img src="images/cut.png" /></td>
<td><a href="<?php echo $copy_href; ?>" title="<?php echo $lang['copy_this_entry_tooltip']; ?>"><?php echo $lang['copy_this_entry']; ?></a></td>
echo "\n";
<?php if ($show_internal_attrs) { ?>
<td class="icon"><img src="images/tools-no.png" /></td>
<td><a href="<?php echo $refresh_href; ?>"><?php echo $lang['hide_internal_attrs']; ?></a></td>
echo '<table class="edit_dn_menu"><tr>';
printf($actionlayout,'refresh.png',$refresh_href,_('Refresh this entry'),_('Refresh'));
printf($actionlayout,'save.png',$export_href_base,_('Save a dump of this object'),_('Export'));
echo '</tr><tr>';
<?php } else { ?>
<td class="icon"><img src="images/tools.png" /></td>
<td><a href="<?php echo $intattr_href; ?>"><?php echo $lang['show_internal_attrs']; ?></a></td>
<?php } ?>
printf($actionlayout,'cut.png',$copy_href,_('Copy this object to another location, a new DN, or another server'),_('Copy or move this entry'));
</tr>
if ($show_internal_attrs)
printf($actionlayout,'tools-no.png',$refresh_href,'',_('Hide internal attributes'));
<?php if (! $ldapserver->isReadOnly()) { ?>
<tr>
<td class="icon"><img src="images/trash.png" /></td>
<td><a style="color: red" href="<?php echo $delete_href; ?>" title="<?php echo $lang['delete_this_entry_tooltip']; ?>"><?php echo $lang['delete_this_entry']; ?></a></td>
<td class="icon"><img src="images/rename.png" /></td>
<td><a href="<?php echo $rename_href; ?>"><?php echo $lang['rename']; ?></a></td>
</tr>
else
printf($actionlayout,'tools.png',$intattr_href,'',_('Show internal attributes'));
<?php if ($config->GetValue('appearance','show_hints')) { ?>
<tr>
<td class="icon"><img src="images/light.png" /></td>
<td colspan="3"><span class="hint"><?php echo $lang['delete_hint']; ?></span></td>
</tr>
<?php } ?>
echo '</tr>';
<tr>
<td class="icon"><img src="images/compare.png" /></td>
<td><a href="<?php echo $compare_href; ?>"><?php echo $lang['compare_with']; ?></a></td>
</tr>
if (! $ldapserver->isReadOnly()) {
echo '<tr>';
printf($actionlayout,'trash.png',$delete_href,_('You will be prompted to confirm this decision'),_('Delete this entry'));
printf($actionlayout,'rename.png',$rename_href,'',_('Rename'));
echo '</tr>';
<tr>
<td class="icon"><img src="images/star.png" /></td>
<td><a href="<?php echo $create_href; ?>"><?php echo $lang['create_a_child_entry']; ?></a></td>
<td class="icon"><img src="images/add.png" /></td>
<td><a href="<?php echo $addattr_href; ?>"><?php echo $lang['add_new_attribute']; ?></a></td>
</tr>
<?php }
if ($config->GetValue('appearance','show_hints')) {
echo '<tr>';
printf($hintlayout,_('Hint: To delete an attribute, empty the text field and click save.'));
echo '</tr>';
}
echo '<tr>';
printf($actionlayout,'compare.png',$compare_href,'',_('Compare with another entry'));
echo '</tr>';
echo '<tr>';
printf($actionlayout,'star.png',$create_href,'',_('Create a child entry'));
printf($actionlayout,'add.png',$addattr_href,'',_('Add new attribute'));
echo '</tr>';
}
flush();
$children = get_container_contents($ldapserver,$dn,$max_children,'(objectClass=*)',$config->GetValue('deref','view'));
$children = $ldapserver->getContainerContents($dn,$max_children,'(objectClass=*)',$config->GetValue('deref','view'));
if (($children_count = count($children)) > 0) {
if ($children_count == $max_children)
@@ -91,122 +82,94 @@ $addattr_href = sprintf('add_attr_form.php?%s',$url_base);
$child_href = sprintf('search.php?server_id=%s&amp;search=true&amp;filter=%s&amp;base_dn=%s&amp;form=advanced&amp;scope=one',
$ldapserver->server_id,rawurlencode('objectClass=*'),$encoded_dn);
?>
<tr>
<td class="icon"><img src="images/children.png" /></td>
<td><a href="<?php echo $child_href; ?>"><?php if( $children_count == 1 ) echo $lang['view_one_child']; else echo sprintf( $lang['view_children'], $children_count ); ?></a></td>
<td class="icon"><img src="images/save.png" /></td>
<td><a href="<?php echo $export_href_sub; ?>" title="<?php echo $lang['export_subtree_tooltip']; ?>"><?php echo $lang['export_subtree']; ?></a></td>
</tr>
echo '<tr>';
printf($actionlayout,'children.png',$child_href,'',($children_count == 1) ? _('View 1 child') : sprintf(_('View %s children'),$children_count));
printf($actionlayout,'save.png',$export_href_sub,_('Save a dump of this object and all of its children'),_('Export subtree'));
echo '</tr>';
}
<?php } ?>
if ($config->GetValue('appearance','show_hints')) {
echo '<tr>';
printf($hintlayout,_('Hint: To view the schema for an attribute, click the attribute name.'));
echo '</tr>';
}
<?php if ($config->GetValue('appearance','show_hints')) { ?>
<tr>
<td class="icon"><img src="images/light.png" /></td>
<td colspan="3"><span class="hint"><?php echo $lang['attr_schema_hint']; ?></span></td>
</tr>
<?php } ?>
if ($ldapserver->isReadOnly()) {
echo '<tr>';
printf($hintlayout,_('Viewing entry in read-only mode.'));
echo '</tr>';
}
<?php if ($ldapserver->isReadOnly()) { ?>
<tr>
<td class="icon"><img src="images/light.png" /></td>
<td><?php echo $lang['viewing_read_only']; ?></td>
</tr>
<?php } ?>
if ($modified_attrs) {
echo '<tr>';
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 '</tr>';
}
<?php if ($modified_attrs) { ?>
<tr>
<td class="icon"><img src="images/light.png" /></td>
echo '</table>';
<?php if (count($modified_attrs) > 1) { ?>
<td colspan="3"><?php echo sprintf($lang['attrs_modified'],implode(', ',$modified_attrs)); ?></td>
flush();
<?php } else { ?>
<td colspan="3"><?php echo sprintf($lang['attr_modified'],implode('',$modified_attrs)); ?></td>
<?php } ?>
if (! $ldapserver->isReadOnly()) {
echo '<form action="update_confirm.php" method="post" name="edit_form">';
printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
printf('<input type="hidden" name="dn" value="%s" />',$dn);
}
</tr>
<?php } ?>
echo '<br />'."\n\n";
echo '<table class="edit_dn">';
</table>
<?php flush(); ?>
<br />
<table class="edit_dn">
<?php if ($show_internal_attrs) {
if ($show_internal_attrs) {
$counter = 0;
foreach (get_entry_system_attrs($ldapserver,$dn) as $attr => $vals) {
foreach ($ldapserver->getDNSysAttrs($dn) as $attr => $vals) {
$counter++;
$schema_href = sprintf('schema.php?server_id=%s&amp;view=attributes&amp;viewvalue=%s',
$ldapserver->server_id,real_attr_name($attr));
?>
<tr>
<td colspan="2" class="attr"><b><a title="<?php echo sprintf( $lang['attr_name_tooltip'], $attr ); ?>" href="<?php echo $schema_href; ?>"><?php echo htmlspecialchars( $attr ); ?></b></td>
</tr>
printf('<tr><td colspan="2" class="attr"><b><a title="'._('Click to view the schema defintion for attribute type \'%s\'').'" href="%s" />%s</b></td></tr>',
$attr,$schema_href,htmlspecialchars($attr));
<tr>
<td class="val">
echo '<tr><td class="val"><small>';
<?php if (is_attr_binary($ldapserver,$attr)) {
$href = "download_binary_attr.php?server_id=$server_id&amp;dn=$encoded_dn&amp;attr=$attr";
?>
if ($ldapserver->isAttrBinary($attr)) {
$href = sprintf('download_binary_attr.php?server_id=%s&amp;dn=%s&amp;attr=%s',$server_id,$encoded_dn,$attr);
<small>
<?php echo $lang['binary_value']; ?><br />
<?php if (count($vals) > 1) {
for ($i = 1; $i <= count($vals); $i++) { ?>
echo _('Binary value');
echo '<br />';
<a href="<?php sprintf('%s&amp;value_num=%s',$href,$i); ?>"><img src="images/save.png" /> <?php echo $lang['download_value']; ?>(<?php echo $i; ?>)</a>
<br />
if (count($vals) > 1) {
for ($i=1;$i<=count($vals);$i++)
printf('<a href="%s&amp;value_num=%s"><img src="images/save.png" /> %s(%s)</a><br />',
$href,$i,_('download value'),$i);
<?php
}
} else { ?>
<a href="<?php echo $href; ?>"><img src="images/save.png" /> <?php echo $lang['download_value']; ?></a><br />
<?php }
} else {
printf('<a href="%s"><img src="images/save.png" /> %s</a><br />',
$href,_('download value'));
}
} else {
foreach ($vals as $v) {
echo htmlspecialchars($v);
echo "<br />\n";
}
foreach ($vals as $v)
printf('%s<br />',htmlspecialchars($v));
}
?>
</small>
</td>
</tr>
<?php
echo '</small></td></tr>';
}
if ($counter == 0)
echo "<tr><td colspan=\"2\">(" . $lang['no_internal_attributes'] . ")</td></tr>\n";
printf('<tr><td colspan="2">(%s)</td></tr>',_('No internal attributes'));
echo "\n\n";
}
flush(); ?>
<!-- Table of attributes/values to edit -->
<?php if (! $ldapserver->isReadOnly()) { ?>
<form action="update_confirm.php" method="post" name="edit_form">
<input type="hidden" name="server_id" value="<?php echo $ldapserver->server_id; ?>" />
<input type="hidden" name="dn" value="<?php echo $dn; ?>" />
<?php }
flush();
} else {
?>
<h3 class="title"><?php echo $lang['createf_create_object']; ?></h3>
<h3 class="subtitle"><?php echo $lang['server']; ?>: <b><?php echo $ldapserver->name; ?></b> &nbsp;&nbsp;&nbsp; <?php echo $lang['using_template'];?>: <b><?php echo htmlspecialchars($_REQUEST['template']); ?></b></h3>
<?php
printf('<h3 class="title">%s</h3>',_('Create Object'));
printf('<h3 class="subtitle">%s: <b>%s</b> &nbsp;&nbsp;&nbsp; %s: <b>%s</b></h3>',
_('Server'),$ldapserver->name,_('using template'),htmlspecialchars($_REQUEST['template']));
}
?>