" . _("LDAP Account Manager Configuration") . "\n"; // include all CSS files $cssDirName = dirname(__FILE__) . '/../../style'; $cssDir = dir($cssDirName); $cssFiles = array(); $cssEntry = $cssDir->read(); while ($cssEntry !== false) { if (substr($cssEntry, strlen($cssEntry) - 4, 4) == '.css') { $cssFiles[] = $cssEntry; } $cssEntry = $cssDir->read(); } sort($cssFiles); foreach ($cssFiles as $cssEntry) { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; // include all JavaScript files $jsDirName = dirname(__FILE__) . '/../lib'; $jsDir = dir($jsDirName); $jsFiles = array(); while ($jsEntry = $jsDir->read()) { if (substr($jsEntry, strlen($jsEntry) - 3, 3) != '.js') continue; $jsFiles[] = $jsEntry; } sort($jsFiles); foreach ($jsFiles as $jsEntry) { echo "\n"; } ?>
getName(); ?>   

\n"); // hidden submit buttons which are clicked by tabs echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
\n"; // tabs echo '
'; echo ''; ?>
getConfiguredTypes(); // get list of scopes of modules $scopes = array(); foreach ($types as $type) { $mods = $conf->get_AccountModules($type->getId()); for ($i = 0; $i < sizeof($mods); $i++) { $scopes[$mods[$i]][] = $type->getScope(); } } // get module options $options = getConfigOptions($scopes); // get current setting $old_options = $conf->get_moduleSettings(); // display module boxes $tabindex = 1; $modules = array_keys($options); $_SESSION['conf_types'] = array(); for ($i = 0; $i < sizeof($modules); $i++) { if (sizeof($options[$modules[$i]]) < 1) continue; echo "
\n"; $icon = ''; $module = moduleCache::getModule($modules[$i], 'none'); $iconImage = $module->getIcon(); if ($iconImage != null) { if (!(strpos($iconImage, 'http') === 0) && !(strpos($iconImage, '/') === 0)) { $iconImage = '../../graphics/' . $iconImage; } $icon = '' . $iconImage . ' '; } echo "$icon" . getModuleAlias($modules[$i], "none") . "\n"; $configTypes = parseHtml($modules[$i], $options[$modules[$i]], $old_options, false, $tabindex, 'none'); $_SESSION['conf_types'] = array_merge($configTypes, $_SESSION['conf_types']); echo "
\n"; echo "
"; } 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, 'none'); if ((sizeof($errorsToDisplay) == 0) && isset($_POST['scrollPositionTop']) && isset($_POST['scrollPositionLeft'])) { // scroll to last position echo ''; } echo "\n"; echo "\n"; echo "\n"; /** * Checks user input and saves the entered settings. * * @return array list of errors */ function checkInput() { if (!isset($_POST['postAvailable'])) { return array(); } $conf = &$_SESSION['conf_config']; $typeManager = new \LAM\TYPES\TypeManager($conf); $types = $typeManager->getConfiguredTypes(); // check module options // create option array to check and save $options = extractConfigOptionsFromPOST($_SESSION['conf_types']); // get list of scopes of modules $scopes = array(); foreach ($types as $type) { $mods = $conf->get_AccountModules($type->getId()); for ($i = 0; $i < sizeof($mods); $i++) { $scopes[$mods[$i]][] = $type->getScope(); } } // check options $errors = checkConfigOptions($scopes, $options); $conf->set_moduleSettings($options); return $errors; } ?>