type . "list\">\n";
if ($this->dn_orig!='') {
echo "";
}
echo " | ";
// display DN
if (isset($this->dn_orig) && ($this->dn_orig != '')) {
echo _("DN") . ": " . htmlspecialchars($this->dn_orig) . '
';
}
// display html-code from modules
$return = array();
if ($this->current_page == 0) {
if ($this->subpage == 'finish') {
// Show success message
if ($this->dn_orig == '') {
$text = _("Account was created successfully.");
}
else {
$text = _("Account was modified successfully.");
}
$return[] = array(
0 => array('kind' => 'message', 'type' => 'INFO', 'headline' => _('LDAP operation successful.'), 'text' => $text,
'td' => array('colspan' => 3)));
$return[] = array(
0 => array('kind' => 'text', 'text' => '', 'td' => array('colspan' => 3)));
$return[] = array(
0 => array('kind' => 'input', 'type' => 'submit', 'name' => 'createagain', 'value' => _('Create another account')),
1 => array('kind' => 'input', 'type' => 'submit', 'name' => 'backmain', 'value' => _('Back to account list')));
$return[] = array(0 => array('kind' => 'text', 'text' => ' ')); // empty line
$return[] = array(0 => array('kind' => 'text', 'text' => ' ')); // empty line
$pdfStructures = getPDFStructureDefinitions($this->type);
$return[] = array(
0 => array('kind' => 'fieldset', 'legend' => 'PDF', 'td' => array('colspan' => 2), 'value' => array(array(
0 => array('kind' => 'select', 'name' => 'pdfStructure', 'options' => $pdfStructures),
1 => array('kind' => 'input', 'type' => 'submit', 'name' => 'outputpdf', 'value' => _('Create PDF file')),
2 => array('kind' => 'help', 'value' => '403'))
)));
}
else {
$options_selected = array();
// loop through all suffixes
$rootsuffix = $_SESSION['config']->get_Suffix($this->type);
foreach ($_SESSION['ldap']->search_units($rootsuffix) as $suffix) {
if ($this->dn == $suffix) $options_selected = array($suffix);
$suffixes[] = $suffix;
}
if (!in_array($this->dn, $suffixes)) {
$suffixes[] = $this->dn;
$options_selected = array($this->dn);
}
$return[] = array(
0 => array('kind' => 'text', 'text' => _('Suffix')),
1 => array('kind' => 'select', 'name' => 'suffix', 'options' => $suffixes, 'options_selected' => $options_selected, 'noSorting' => true),
2 => array ('kind' => 'help', 'value' => '361'));
// RDN selection
$rdnlist = getRDNAttributes($this->type);
$rdnSelected = array();
if ($this->rdn != '') {
$rdnSelected[] = $this->rdn;
}
else {
$rdnSelected[] = $rdnlist[0];
}
$return[] = array(
0 => array('kind' => 'text', 'text' => _('RDN identifier')),
1 => array('kind' => 'select', 'name' => 'rdn', 'options' => $rdnlist, 'options_selected' => $rdnSelected, 'noSorting' => true),
2 => array ('kind' => 'help', 'value' => '301'));
// Get list of profiles
$profilelist = getAccountProfiles($this->type);
if (count($profilelist)!=0) {
$return[] = array(
0 => array('kind' => 'text', 'text' => _("Load profile")),
1 => array('kind' => 'table', 'value' => array(0 => array(
0 => array('kind' => 'select', 'name' => 'selectLoadProfile', 'options' => $profilelist),
1 => array('kind' => 'input', 'type' => 'submit', 'name' => 'loadProfile', 'value' => _('Load profile'))
))),
2 => array('kind' => 'help', 'value' => '401')
);
}
$return[] = array(0 => array('kind' => 'text', 'text' => ' ')); // empty line
if ($this->dn_orig!='') $text = _('Modify account');
else $text = _('Create account');
$return[] = array ( 0 => array ( 'kind' => 'text', 'text' => $text ),
1 => array ( 'kind' => 'input', 'type' => 'submit', 'name' => 'create', 'value' => $text, 'disabled' => $disabled),
2 => array ('kind' => 'help', 'value' => '402'));
}
}
else $return = call_user_func(array($this->module[$this->order[$this->current_page]], 'display_html_'.$this->subpage));
$y = 5000;
$z = 10000;
parseHtml($this->order[$this->current_page], $return, array(), false, $y, $z, $this->type);
// Display rest of html-page
if ($this->current_page != "main") echo " *" . _('required');
echo " |