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();
$request['template'] = $request['page']->getTemplate();
$request['page']->drawTitle(get_rdn($request['template']->getDN()));
$request['page']->drawSubTitle();
# Confirm the updates
if (count($request['template']->getLDAPmodify(true))) {
echo '
';
echo _('Do you want to make these changes?');
echo '
';
echo '
';
echo "\n\n";
echo '';
echo '
';
} else {
$href = sprintf('cmd=template_engine&server_id=%s&dn=%s',
$app['server']->getIndex(),$request['template']->getDNEncode());
echo '';
echo _('You made no changes');
if (isAjaxEnabled())
printf('
%s.',
htmlspecialchars($href),htmlspecialchars($href),_('Retrieving DN'),_('Go back'));
else
printf('
%s.',htmlspecialchars($href),_('Go back'));
echo '
';
}
function getMustAttrs($oclasses) {
global $app;
$mustattrs = array();
foreach ($oclasses as $value) {
$soc = $app['server']->getSchemaObjectClass($value);
if ($soc)
foreach ($soc->getMustAttrs() as $sma)
array_push($mustattrs,$sma->getName());
}
return $mustattrs;
}
?>