2
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/rename_form.php,v 1.11.2.2 2008/12/12 12:20:22 wurley Exp $
5
3
* Displays a form for renaming an LDAP entry.
7
* Variables that come in via common.php
9
* Variables that come in as GET vars:
10
* - dn (rawurlencoded)
12
5
* @package phpLDAPadmin
17
12
require './common.php';
19
if ($ldapserver->isReadOnly())
20
error(_('You cannot perform updates while server is in read-only mode'),'error','index.php');
21
if (! $ldapserver->haveAuthInfo())
22
error(_('Not enough information to login to server. Please check your configuration.'),'error','index.php');
27
printf('<h3 class="title">%s <b>%s</b></h3>',_('Rename Entry'),htmlspecialchars($rdn));
28
printf('<h3 class="subtitle">%s: <b>%s</b> %s: <b>%s</b></h3>',
29
_('Server'),$ldapserver->name,_('Distinguished Name'),htmlspecialchars($dn));
31
echo '<br /><center><form action="cmd.php?cmd=rename" method="post" />';
32
printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
33
printf('<input type="hidden" name="dn" value="%s" />',htmlspecialchars($dn));
34
printf('<input type="text" name="new_rdn" size="30" value="%s" />',htmlspecialchars($rdn));
14
# The DN we are working with
16
$request['dn'] = get_request('dn','GET');
17
$request['template'] = get_request('template','GET');
19
$request['page'] = new PageRender($app['server']->getIndex(),get_request('template','REQUEST',false,'none'));
20
$request['page']->setDN($request['dn']);
21
$request['page']->accept();
24
$request['page']->drawTitle(sprintf('%s <b>%s</b>',_('Rename'),get_rdn($request['dn'])));
25
$request['page']->drawSubTitle();
28
printf('%s <b>%s</b> %s:<br /><br />',_('Rename'),get_rdn($request['dn']),_('to a new object'));
30
echo '<form action="cmd.php?cmd=rename" method="post" />';
31
printf('<input type="hidden" name="server_id" value="%s" />',$app['server']->getIndex());
32
printf('<input type="hidden" name="dn" value="%s" />',rawurlencode($request['dn']));
33
printf('<input type="hidden" name="template" value="%s" />',$request['template']);
34
printf('<input type="text" name="new_rdn" size="30" value="%s" />',get_rdn($request['dn']));
35
35
printf('<input type="submit" value="%s" />',_('Rename'));
36
echo '</form></center>';