get_ServerURL()) . ")"; printHeaderContents($title, $headerPrefix); echo "\n"; // include all JavaScript files printJsIncludes($headerPrefix); printHeader($headerPrefix); function printHeader(string $headerPrefix): void { // get tool list $availableTools = getTools(); // sort tools $toSort = []; foreach ($availableTools as $myTool) { if ($myTool->getRequiresWriteAccess() && !checkIfWriteAccessIsAllowed()) { continue; } if ($myTool->getRequiresPasswordChangeRights() && !checkIfPasswordChangeIsAllowed()) { continue; } // check visibility if (!$myTool->isVisible()) { continue; } // check if hidden by config $toolClass = $myTool::class; $toolName = substr($toolClass, strrpos($toolClass, '\\') + 1); if (!$_SESSION['config']->isToolActive($toolName)) { continue; } $toSort[$toolClass] = $myTool->getPosition(); } asort($toSort); $tools = []; foreach (array_keys($toSort) as $key) { $tools[] = new $key(); } $userData = $_SESSION['ldap']->getUserName(); $userName = extractRDNValue($userData); ?>
help       getName() . ' - '; $serverProfilesPersistenceManager = new ServerProfilePersistenceManager(); try { $serverProfileNames = $serverProfilesPersistenceManager->getProfiles(); if (count($serverProfileNames) < 2) { $serverProfileLabel = ''; } } catch (LAMException $e) { logNewMessage(LOG_ERR, 'Unable to read server profiles: ' . $e->getTitle()); } echo $serverProfileLabel . $userName; ?>
menu
getConfiguredTypes(); if (!empty($types)) { $accountTypesGroup = new htmlGroup(); $accountTypesLink = new htmlLink(_('Accounts'), "javascript:void(0);"); $accountTypesLink->setOnClick("window.lam.topmenu.openSubmenu(event, 'lam-navigation-types', window.lam.topmenu.subMenuCloseListenerTypes);"); $accountTypesLink->setOnMouseOver("window.lam.topmenu.openSubmenu(event, 'lam-navigation-types', window.lam.topmenu.subMenuCloseListenerTypes);"); $accountTypesLink->setCSSClasses(['lam-menu-entry']); $accountTypesGroup->addElement($accountTypesLink); $accountList = new htmlGroup(); foreach ($types as $type) { if ($type->isHidden()) { continue; } $link = $headerPrefix . '/templates/lists/list.php?type=' . $type->getId(); $accountTypeLink = new htmlLink($type->getAlias(), $link, $headerPrefix . '/graphics/' . $type->getIcon()); $accountTypeLink->setCSSClasses(['lam-menu-entry icon']); $accountList->addElement($accountTypeLink); } $accountTypeEntriesDiv = new htmlDiv(null, $accountList, ['lam-navigation-layer-content']); $accountTypesDiv = new htmlDiv('lam-navigation-types', $accountTypeEntriesDiv, ['lam-navigation-layer zeroHeight']); $accountTypesGroup->addElement($accountTypesDiv); parseHtml(null, $accountTypesGroup, [], false); } if ($tools !== []) { $toolGroup = new htmlGroup(); $toolLink = new htmlLink(_('Tools'), "javascript:void(0);"); $toolLink->setOnClick("window.lam.topmenu.openSubmenu(event, 'lam-navigation-tools', window.lam.topmenu.subMenuCloseListenerTools);"); $toolLink->setOnMouseOver("window.lam.topmenu.openSubmenu(event, 'lam-navigation-tools', window.lam.topmenu.subMenuCloseListenerTools);"); $toolLink->setCSSClasses(['lam-menu-entry']); $toolGroup->addElement($toolLink); $toolList = new htmlGroup(); foreach ($tools as $tool) { $link = $headerPrefix . '/templates/' . $tool->getLink(); $toolLink = new htmlLink($tool->getName(), $link, $headerPrefix . '/graphics/' . $tool->getImageLink()); $toolLink->setCSSClasses(['lam-menu-entry icon']); $toolList->addElement($toolLink); } $toolEntriesDiv = new htmlDiv(null, $toolList, ['lam-navigation-layer-content']); $toolDiv = new htmlDiv('lam-navigation-tools', $toolEntriesDiv, ['lam-navigation-layer zeroHeight']); $toolGroup->addElement($toolDiv); parseHtml(null, $toolGroup, [], false); } if (is_dir(__DIR__ . '/../docs/manual')) { ?>