phpldapadmin/htdocs/compare_form.php

80 lines
2.3 KiB
PHP
Raw Normal View History

2009-06-30 09:29:51 +00:00
<?php
2009-06-30 10:26:08 +00:00
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/compare_form.php,v 1.2.4.2 2005/12/09 14:29:15 wurley Exp $
2009-06-30 09:29:51 +00:00
/**
* Compares to DN entries side by side.
*
* - dn (rawurlencoded)
* - server_id
*
* @package phpLDAPadmin
*/
/**
*/
require './common.php';
if( ! $ldapserver->haveAuthInfo())
2009-06-30 10:26:08 +00:00
pla_error( _('Not enough information to login to server. Please check your configuration.') );
2009-06-30 09:29:51 +00:00
$dn = (isset($_GET['dn']) ? $_GET['dn'] : '');
$encoded_dn = rawurlencode( $dn );
$rdn = get_rdn( $dn );
$container = get_container( $dn );
2009-06-30 10:26:08 +00:00
$attrs = $ldapserver->getDNAttrs($dn);
2009-06-30 09:29:51 +00:00
$select_server_html = server_select_list($ldapserver->server_id,true,'server_id_dst');
include './header.php'; ?>
<body>
2009-06-30 10:26:08 +00:00
<h3 class="title"><?php echo _('Compare another DN with'). '&nbsp;' . $rdn; ?></h3>
<h3 class="subtitle"><?php echo _('Server'); ?>: <b><?php echo $ldapserver->name; ?></b>
2009-06-30 09:29:51 +00:00
<?php if ($dn) { ?>
2009-06-30 10:26:08 +00:00
&nbsp;&nbsp;&nbsp; <?php echo _('Distinguished Name')?>: <b><?php echo $dn; ?></b>
2009-06-30 09:29:51 +00:00
<?php } ?>
</h3>
<center>
2009-06-30 10:26:08 +00:00
<?php echo _('Compare'); ?> <b><?php echo htmlspecialchars( $rdn ); ?></b> <?php echo _('with '); ?>:<br />
2009-06-30 09:29:51 +00:00
<br />
<form action="compare.php" method="post" name="compare_form">
<input type="hidden" name="server_id_src" value="<?php echo $ldapserver->server_id; ?>" />
<table style="border-spacing: 10px">
<tr>
<?php if (! $dn) { ?>
2009-06-30 10:26:08 +00:00
<td><acronym title="<?php echo _('Compare this DN with another'); ?>"><?php echo _('Source DN'); ?></acronym>:</td>
2009-06-30 09:29:51 +00:00
<td>
<input type="text" name="dn_src" size="45" value="<?php echo htmlspecialchars( $dn ); ?>" />
<?php draw_chooser_link( 'compare_form.dn_src', 'true', $rdn ); ?></td>
</td>
<?php } else { ?>
<input type="hidden" name="dn_src" value="<?php echo htmlspecialchars( $dn ); ?>" />
<?php } ?>
</tr>
<tr>
2009-06-30 10:26:08 +00:00
<td><acronym title="<?php echo _('Compare this DN with another'); ?>"><?php echo _('Destination DN'); ?></acronym>:</td>
2009-06-30 09:29:51 +00:00
<td>
<input type="text" name="dn_dst" size="45" value="" />
<?php draw_chooser_link( 'compare_form.dn_dst', 'true', '' ); ?></td>
</td>
</tr>
<tr>
2009-06-30 10:26:08 +00:00
<td><?php echo _('Destination Server')?>:</td>
2009-06-30 09:29:51 +00:00
<td><?php echo $select_server_html; ?></td>
</tr>
<tr>
2009-06-30 10:26:08 +00:00
<td colspan="2" align="right"><input type="submit" value="<?php echo _('Compare'); ?>" /></td>
2009-06-30 09:29:51 +00:00
</tr>
</table>
</form>
</center>
</body>
</html>