" . _("LDAP Account Manager Configuration") . "\n"; // include all CSS files $cssDirName = dirname(__FILE__) . '/../../style'; $cssDir = dir($cssDirName); while ($cssEntry = $cssDir->read()) { if (substr($cssEntry, strlen($cssEntry) - 4, 4) != '.css') continue; echo "\n"; } echo "\n"; for ($i = 0; $i < sizeof($allTypes); $i++){ echo "\n"; } echo "\n"; // include all JavaScript files $jsDirName = dirname(__FILE__) . '/../lib'; $jsDir = dir($jsDirName); while ($jsEntry = $jsDir->read()) { if (substr($jsEntry, strlen($jsEntry) - 3, 3) != '.js') continue; echo "\n"; } ?>
 LDAP Account Manager  LDAP Account Manager

\n"); echo '
'; echo ""; echo " "; echo ""; echo "

\n"; echo '
'; // hidden submit buttons which are clicked by tabs echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo "
\n"; // tabs echo '
'; echo ''; ?>
get_ActiveTypes(); // get list of scopes of modules $scopes = array(); for ($m = 0; $m < sizeof($types); $m++) { $mods = $conf->get_AccountModules($types[$m]); for ($i = 0; $i < sizeof($mods); $i++) $scopes[$mods[$i]][] = $types[$m]; } // get module options $options = getConfigOptions($scopes); // get current setting $old_options = $conf->get_moduleSettings(); // display module boxes $tabindex = 0; $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 = new $modules[$i]('none'); $iconImage = $module->getIcon(); if ($iconImage != null) { $icon = '' . $iconImage . ' '; } echo "$icon" . getModuleAlias($modules[$i], "none") . "
\n"; $configTypes = parseHtml($modules[$i], $options[$modules[$i]], $old_options, true, $tabindex, 'config'); $_SESSION['conf_types'] = array_merge($configTypes, $_SESSION['conf_types']); echo "
\n"; echo "
"; } echo "\n"; 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']; $types = $conf->get_ActiveTypes(); // check module options // create option array to check and save $options = array(); $opt_keys = array_keys($_SESSION['conf_types']); for ($i = 0; $i < sizeof($opt_keys); $i++) { $element = $opt_keys[$i]; // text fields if ($_SESSION['conf_types'][$element] == "text") { $options[$element] = array($_POST[$element]); } // checkboxes elseif ($_SESSION['conf_types'][$element] == "checkbox") { if (isset($_POST[$element]) && ($_POST[$element] == "on")) $options[$element] = array('true'); else $options[$element] = array('false'); } // dropdownbox elseif ($_SESSION['conf_types'][$element] == "select") { $options[$element] = array($_POST[$element]); } // multiselect elseif ($_SESSION['conf_types'][$element] == "multiselect") { $options[$element] = $_POST[$element]; // value is already an array } // textarea elseif ($_SESSION['conf_types'][$element] == "textarea") { $options[$element] = explode("\r\n", $_POST[$element]); } } // get list of scopes of modules $scopes = array(); for ($m = 0; $m < sizeof($types); $m++) { $mods = $conf->get_AccountModules($types[$m]); for ($i = 0; $i < sizeof($mods); $i++) $scopes[$mods[$i]][] = $types[$m]; } // check options $errors = checkConfigOptions($scopes, $options); $conf->set_moduleSettings($options); return $errors; } ?>