~info-massimobernardini/ubuntu/maverick/phpldapadmin/fix-609403

« back to all changes in this revision

Viewing changes to htdocs/compare_form.php

  • Committer: Bazaar Package Importer
  • Author(s): Fabio Tranchitella
  • Date: 2006-05-13 22:04:36 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20060513220436-rasikdyi9diovfsf
Tags: 0.9.8.3-1
* New upstream release.
* Fixes multiple xss vulnerabilities. (Closes: #365313)
* pla_error: now the bug report button is really below the message.
  (Closes: #35722)
* The bug report form is not inside phpldapadmin: it is just a link
  to sourceforge. This is not a real bug, let's close it. (Closes: #357219)
* Standards-Version: 3.7.2, no changes necessary.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
 
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/compare_form.php,v 1.2.4.2 2005/12/09 14:29:15 wurley Exp $
 
2
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/compare_form.php,v 1.2.4.3 2006/04/29 03:15:34 wurley Exp $
3
3
 
4
4
/**
5
5
 * Compares to DN entries side by side.
14
14
 
15
15
require './common.php';
16
16
 
17
 
if( ! $ldapserver->haveAuthInfo())
18
 
        pla_error( _('Not enough information to login to server. Please check your configuration.') );
 
17
if (! $ldapserver->haveAuthInfo())
 
18
        pla_error(_('Not enough information to login to server. Please check your configuration.'));
19
19
 
20
20
$dn = (isset($_GET['dn']) ? $_GET['dn'] : '');
21
 
 
22
 
$encoded_dn = rawurlencode( $dn );
23
 
$rdn = get_rdn( $dn );
24
 
$container = get_container( $dn );
25
 
 
26
 
$attrs = $ldapserver->getDNAttrs($dn);
 
21
$rdn = get_rdn($dn);
27
22
$select_server_html = server_select_list($ldapserver->server_id,true,'server_id_dst');
28
23
 
29
 
include './header.php'; ?>
30
 
 
31
 
<body>
32
 
 
33
 
<h3 class="title"><?php echo _('Compare another DN with'). '&nbsp;' . $rdn; ?></h3>
34
 
<h3 class="subtitle"><?php echo _('Server'); ?>: <b><?php echo $ldapserver->name; ?></b>
35
 
<?php if ($dn) { ?>
36
 
         &nbsp;&nbsp;&nbsp; <?php echo _('Distinguished Name')?>: <b><?php echo $dn; ?></b>
37
 
<?php } ?>
38
 
</h3>
39
 
 
40
 
<center>
41
 
<?php echo _('Compare'); ?> <b><?php echo htmlspecialchars( $rdn ); ?></b> <?php echo _('with '); ?>:<br />
42
 
<br />
43
 
 
44
 
<form action="compare.php" method="post" name="compare_form">
45
 
<input type="hidden" name="server_id_src" value="<?php echo $ldapserver->server_id; ?>" />
46
 
 
47
 
<table style="border-spacing: 10px">
48
 
<tr>
49
 
        <?php if (! $dn) { ?>
50
 
        <td><acronym title="<?php echo _('Compare this DN with another'); ?>"><?php echo _('Source DN'); ?></acronym>:</td>
51
 
        <td>
52
 
        <input type="text" name="dn_src" size="45" value="<?php echo htmlspecialchars( $dn ); ?>" />
53
 
                <?php draw_chooser_link( 'compare_form.dn_src', 'true', $rdn ); ?></td>
54
 
        </td>
55
 
        <?php } else { ?>
56
 
        <input type="hidden" name="dn_src" value="<?php echo htmlspecialchars( $dn ); ?>" />
57
 
        <?php } ?>
58
 
</tr>
59
 
<tr>
60
 
        <td><acronym title="<?php echo _('Compare this DN with another'); ?>"><?php echo _('Destination DN'); ?></acronym>:</td>
61
 
        <td>
62
 
                <input type="text" name="dn_dst" size="45" value="" />
63
 
                <?php draw_chooser_link( 'compare_form.dn_dst', 'true', '' ); ?></td>
64
 
        </td>
65
 
</tr>
66
 
 
67
 
<tr>
68
 
        <td><?php echo _('Destination Server')?>:</td>
69
 
        <td><?php echo $select_server_html; ?></td>
70
 
</tr>
71
 
 
72
 
<tr>
73
 
        <td colspan="2" align="right"><input type="submit" value="<?php echo _('Compare'); ?>" /></td>
74
 
</tr>
75
 
</table>
76
 
</form>
77
 
</center>
78
 
</body>
79
 
</html>
 
24
include './header.php';
 
25
 
 
26
echo '<body>';
 
27
 
 
28
printf('<h3 class="title">%s %s</h3>',_('Compare another DN with'),htmlspecialchars($rdn));
 
29
printf('<h3 class="subtitle">%s: <b>%s</b>',_('Server'),$ldapserver->name);
 
30
if ($dn)
 
31
        printf('&nbsp;&nbsp;&nbsp;%s: <b>%s</b>',_('Distinguished Name'),htmlspecialchars($dn));
 
32
echo '</h3>';
 
33
echo "\n";
 
34
 
 
35
echo '<center>';
 
36
printf('%s <b>%s</b> %s<br />',_('Compare'),htmlspecialchars($rdn),_('with '));
 
37
 
 
38
echo '<form action="compare.php" method="post" name="compare_form">';
 
39
printf('<input type="hidden" name="server_id_src" value="%s" />',$ldapserver->server_id);
 
40
echo "\n";
 
41
 
 
42
echo '<table style="border-spacing: 10px">';
 
43
echo "\n";
 
44
echo '<tr><td>';
 
45
 
 
46
if (! $dn) {
 
47
        printf('<acronym title="%s">%s</acronym>:',_('Compare this DN with another'),_('Source DN'));
 
48
        echo '</td><td>';
 
49
        printf('<input type="text" name="dn_src" size="45" value="%s" />',htmlspecialchars($dn));
 
50
        draw_chooser_link('compare_form.dn_src','true',$rdn);
 
51
 
 
52
} else
 
53
        printf('<input type="hidden" name="dn_src" value="%s" />',htmlspecialchars($dn));
 
54
 
 
55
echo '</td></tr>';
 
56
echo "\n";
 
57
 
 
58
echo '<tr>';
 
59
printf('<td><acronym title="%s">%s</acronym>:</td>',_('Compare this DN with another'),_('Destination DN'));
 
60
echo '<td>';
 
61
echo '<input type="text" name="dn_dst" size="45" value="" />';
 
62
draw_chooser_link('compare_form.dn_dst','true','');
 
63
echo '</td>';
 
64
echo '</tr>';
 
65
echo "\n";
 
66
 
 
67
printf('<tr><td>%s:</td><td>%s</td></tr>',_('Destination Server'),$select_server_html);
 
68
echo "\n";
 
69
 
 
70
printf('<tr><td colspan="2" align="right"><input type="submit" value="%s" /></td></tr>',_('Compare'));
 
71
echo "\n";
 
72
 
 
73
echo '</table>';
 
74
echo '</form>';
 
75
echo '</center>';
 
76
echo '</body>';
 
77
echo '</html>';
 
78
?>