Latest SANDPIT - MERGE from CVS (MERGE-GIT)
This commit is contained in:
@@ -1,56 +1,50 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/compare_form.php,v 1.5.2.1 2008/12/12 07:29:55 wurley Exp $
|
||||
// $Header$
|
||||
|
||||
/**
|
||||
* Compares to DN entries side by side.
|
||||
*
|
||||
* - dn (rawurlencoded)
|
||||
* - server_id
|
||||
* Compares two DN entries side by side.
|
||||
* This is the entry form to determine which DN to compare this DN with.
|
||||
*
|
||||
* @package phpLDAPadmin
|
||||
* @subpackage Page
|
||||
*/
|
||||
|
||||
/**
|
||||
*/
|
||||
|
||||
require_once './common.php';
|
||||
require './common.php';
|
||||
|
||||
$dn = get_request('dn','GET');
|
||||
$rdn = get_rdn($dn);
|
||||
$select_server_html = server_select_list($ldapserver->server_id,true,'server_id_dst');
|
||||
# The DN we are working with
|
||||
$request = array();
|
||||
$request['dn'] = get_request('dn','GET');
|
||||
|
||||
printf('<h3 class="title">%s %s</h3>',_('Compare another DN with'),htmlspecialchars($rdn));
|
||||
printf('<h3 class="subtitle">%s: <b>%s</b>',_('Server'),$ldapserver->name);
|
||||
if ($dn)
|
||||
printf(' %s: <b>%s</b>',_('Distinguished Name'),htmlspecialchars($dn));
|
||||
echo '</h3>';
|
||||
echo "\n";
|
||||
# Check if the entry exists.
|
||||
if (! $request['dn'] || ! $app['server']->dnExists($request['dn']))
|
||||
error(sprintf(_('The entry (%s) does not exist.'),$request['dn']),'error','index.php');
|
||||
|
||||
$request['page'] = new PageRender($app['server']->getIndex(),get_request('template','REQUEST',false,'none'));
|
||||
$request['page']->setDN($request['dn']);
|
||||
$request['page']->accept();
|
||||
|
||||
# Render the form
|
||||
$request['page']->drawTitle(sprintf('%s <b>%s</b>',_('Compare another DN with'),get_rdn($request['dn'])));
|
||||
$request['page']->drawSubTitle();
|
||||
|
||||
echo '<center>';
|
||||
printf('%s <b>%s</b> %s<br />',_('Compare'),htmlspecialchars($rdn),_('with '));
|
||||
printf('%s <b>%s</b> %s<br />',_('Compare'),get_rdn($request['dn']),_('with '));
|
||||
|
||||
echo '<form action="cmd.php?cmd=compare" method="post" name="compare_form">';
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
|
||||
printf('<input type="hidden" name="server_id_src" value="%s" />',$ldapserver->server_id);
|
||||
echo '<form action="cmd.php" method="post" name="compare_form">';
|
||||
echo '<input type="hidden" name="cmd" value="compare" />';
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$app['server']->getIndex());
|
||||
printf('<input type="hidden" name="server_id_src" value="%s" />',$app['server']->getIndex());
|
||||
printf('<input type="hidden" name="dn_src" value="%s" />',htmlspecialchars($request['dn']));
|
||||
echo "\n";
|
||||
|
||||
echo '<table style="border-spacing: 10px">';
|
||||
echo "\n";
|
||||
echo '<tr><td>';
|
||||
|
||||
if (! $dn) {
|
||||
printf('<acronym title="%s">%s</acronym>:',_('Compare this DN with another'),_('Source DN'));
|
||||
echo '</td><td>';
|
||||
printf('<input type="text" name="dn_src" size="45" value="%s" />',htmlspecialchars($dn));
|
||||
draw_chooser_link('compare_form.dn_src','true',$rdn);
|
||||
|
||||
} else
|
||||
printf('<input type="hidden" name="dn_src" value="%s" />',htmlspecialchars($dn));
|
||||
|
||||
echo '</td></tr>';
|
||||
echo "\n";
|
||||
|
||||
echo '<tr>';
|
||||
printf('<td><acronym title="%s">%s</acronym>:</td>',_('Compare this DN with another'),_('Destination DN'));
|
||||
printf('<td><acronym title="%s">%s</acronym>:</td>',
|
||||
_('Compare this DN with another'),_('Destination DN'));
|
||||
echo '<td>';
|
||||
echo '<input type="text" name="dn_dst" size="45" value="" />';
|
||||
draw_chooser_link('compare_form.dn_dst','true','');
|
||||
@@ -58,7 +52,7 @@ echo '</td>';
|
||||
echo '</tr>';
|
||||
echo "\n";
|
||||
|
||||
printf('<tr><td>%s:</td><td>%s</td></tr>',_('Destination Server'),$select_server_html);
|
||||
printf('<tr><td>%s:</td><td>%s</td></tr>',_('Destination Server'),server_select_list($app['server']->getIndex(),true,'server_id_dst'));
|
||||
echo "\n";
|
||||
|
||||
printf('<tr><td colspan="2" align="right"><input type="submit" value="%s" /></td></tr>',_('Compare'));
|
||||
|
Reference in New Issue
Block a user