get_ActiveTypes();
for ($i = 0; $i < sizeof($activeTypes); $i++) {
$selectedModules = $conf->get_AccountModules($activeTypes[$i]);
if (sizeof($selectedModules) == 0) {
// go to module selection
metaRefresh("confmodules.php");
exit;
}
}
// go to final page
if (isset($_POST['saveSettings'])) {
metaRefresh("confsave.php");
exit;
}
// go to modules page
elseif (isset($_POST['editmodules'])) {
metaRefresh("confmodules.php");
exit;
}
// go to general page
elseif (isset($_POST['generalSettingsButton'])) {
metaRefresh("confmain.php");
exit;
}
// go to module settings page
elseif (isset($_POST['moduleSettings'])) {
metaRefresh("moduleSettings.php");
exit;
}
}
}
$typeSettings = $conf->get_typeSettings();
$allTypes = getTypes();
$activeTypes = $conf->get_ActiveTypes();
$availableTypes = array();
for ($i = 0; $i < sizeof($allTypes); $i++) {
if (!in_array($allTypes[$i], $activeTypes)) {
$availableTypes[$allTypes[$i]] = getTypeAlias($allTypes[$i]);
}
}
natcasesort($availableTypes);
echo $_SESSION['header'];
echo "
';
echo '';
?>
0) {
$container->addElement(new htmlSubTitle(_("Available account types")), true);
$availableContainer = new htmlTable();
foreach ($availableTypes as $key => $value) {
$availableContainer->addElement(new htmlImage('../../graphics/' . $key . '.png'));
$availableContainer->addElement(new htmlOutputText($value));
$availableContainer->addElement(new htmlSpacer('10px', null));
$availableContainer->addElement(new htmlOutputText(getTypeDescription($key)));
$button = new htmlButton('add_' . $key, 'add.png', true);
$button->setTitle(_("Add"));
$availableContainer->addElement($button, true);
}
$availableContainer->addElement(new htmlSpacer(null, '20px'), true);
$container->addElement($availableContainer, true);
}
// show active types
if (sizeof($activeTypes) > 0) {
$container->addElement(new htmlSubTitle(_("Active account types")), true);
$activeContainer = new htmlTable();
for ($i = 0; $i < sizeof($activeTypes); $i++) {
// title
$activeContainer->addElement(new htmlImage('../../graphics/' . $activeTypes[$i] . '.png'));
$titleText = new htmlOutputText(getTypeAlias($activeTypes[$i]));
$titleText->setIsBold(true);
$activeContainer->addElement($titleText);
$activeContainer->addElement(new htmlSpacer('10px', null));
$activeContainer->addElement(new htmlOutputText(getTypeDescription($activeTypes[$i])), true);
// LDAP suffix
$suffixText = new htmlOutputText(_("LDAP suffix"));
$suffixText->colspan = 2;
$activeContainer->addElement($suffixText);
$activeContainer->addElement(new htmlSpacer('10px', null));
$suffixInput = new htmlInputField('suffix_' . $activeTypes[$i], $typeSettings['suffix_' . $activeTypes[$i]]);
$suffixInput->setFieldSize(40);
$activeContainer->addElement($suffixInput);
$activeContainer->addElement(new htmlHelpLink('202'));
$activeContainer->addElement(new htmlSpacer('10px', null));
// LDAP filter
$filter = '';
if (isset($typeSettings['filter_' . $activeTypes[$i]])) {
$filter = $typeSettings['filter_' . $activeTypes[$i]];
}
$filterText = new htmlOutputText(_("Additional LDAP filter"));
$filterText->colspan = 2;
$activeContainer->addElement($filterText);
$activeContainer->addElement(new htmlSpacer('10px', null));
$filterInput = new htmlInputField('filter_' . $activeTypes[$i], $filter);
$filterInput->setFieldSize(40);
$activeContainer->addElement($filterInput);
$activeContainer->addElement(new htmlHelpLink('260'));
$activeContainer->addNewLine();
// list attributes
if (isset($typeSettings['attr_' . $activeTypes[$i]])) {
$attributes = $typeSettings['attr_' . $activeTypes[$i]];
}
else {
$attributes = getDefaultListAttributes($activeTypes[$i]);
}
$attrsText = new htmlOutputText(_("List attributes"));
$attrsText->colspan = 2;
$activeContainer->addElement($attrsText);
$activeContainer->addElement(new htmlSpacer('10px', null));
$attrsInput = new htmlInputField('attr_' . $activeTypes[$i], $attributes);
$attrsInput->setFieldSize(40);
$activeContainer->addElement($attrsInput);
$activeContainer->addElement(new htmlHelpLink('206'));
$activeContainer->addElement(new htmlSpacer('10px', null));
// hidden type
$hidden = false;
if (isset($typeSettings['hidden_' . $activeTypes[$i]])) {
$hidden = $typeSettings['hidden_' . $activeTypes[$i]];
}
$hiddenText = new htmlOutputText(_('Hidden'));
$hiddenText->colspan = 2;
$activeContainer->addElement($hiddenText);
$activeContainer->addElement(new htmlSpacer('10px', null));
$activeContainer->addElement(new htmlInputCheckbox('hidden_' . $activeTypes[$i], $hidden));
$activeContainer->addElement(new htmlHelpLink('261'));
$activeContainer->addNewLine();
// delete button
$delButton = new htmlButton('rem_'. $activeTypes[$i], _("Remove this account type"));
$delButton->colspan = 5;
$delButton->setIconClass('deleteButton');
$activeContainer->addElement($delButton, true); //del.png
$activeContainer->addElement(new htmlSpacer(null, '40px'), true);
}
$container->addElement($activeContainer, true);
}
$tabindex = 1;
parseHtml(null, $container, array(), false, $tabindex, 'user');
echo "\n";
echo "
";
$buttonContainer = new htmlTable();
$buttonContainer->addElement(new htmlSpacer(null, '10px'), true);
$saveButton = new htmlButton('saveSettings', _('Save'));
$saveButton->setIconClass('saveButton');
$buttonContainer->addElement($saveButton);
$cancelButton = new htmlButton('cancelSettings', _('Cancel'));
$cancelButton->setIconClass('cancelButton');
$buttonContainer->addElement($cancelButton, true);
$buttonContainer->addElement(new htmlSpacer(null, '10px'), true);
parseHtml(null, $buttonContainer, array(), false, $tabindex, 'user');
echo "\n";
echo "\n";
echo "