diff --git a/lam/lib/config.inc b/lam/lib/config.inc index a0ed084d..e50a2aeb 100644 --- a/lam/lib/config.inc +++ b/lam/lib/config.inc @@ -309,6 +309,10 @@ function extractConfigOptionsFromPOST($confTypes) { * @param string $page the URL of the target page */ function metaRefresh($page) { + if (!headers_sent()) { + header('Location: ' . $page); + return; + } if (isset($_SESSION['header'])) { echo $_SESSION['header']; } diff --git a/lam/templates/initsuff.php b/lam/templates/initsuff.php index fcdba617..073679d4 100644 --- a/lam/templates/initsuff.php +++ b/lam/templates/initsuff.php @@ -1,9 +1,8 @@ 0) { @@ -161,7 +160,7 @@ if (isset($_POST['add_suff']) || isset($_POST['cancel'])) { foreach ($failedDNs as $suffix => $error) { StatusMessage("ERROR", _("Failed to create entry!") . "
" . htmlspecialchars($error), htmlspecialchars($suffix)); } - include 'main_footer.php'; + include '../lib/adminFooter.inc'; } else { // print success message @@ -172,7 +171,7 @@ if (isset($_POST['add_suff']) || isset($_POST['cancel'])) { else { // no suffixes were created StatusMessage("INFO", "", _("No changes were made.")); - include 'main_footer.php'; + include '../lib/adminFooter.inc'; } exit; } @@ -183,24 +182,24 @@ $newSuffixes = str_replace("\\", "", $newSuffixes); $newSuffixes = str_replace("'", "", $newSuffixes); $newSuffixes = explode(";", $newSuffixes); -include 'main_header.php'; +include '../lib/adminHeader.inc'; echo '
'; echo "
\n"; - $container = new htmlTable(); - $container->addElement(new htmlOutputText(_("The following suffixes are missing in LDAP. LAM can create them for you.")), true); - $container->addElement(new htmlOutputText(_("You can setup the LDAP suffixes for all account types in your LAM server profile on tab \"Account types\".")), true); - $container->addElement(new htmlSpacer(null, '10px'), true); + $container = new htmlResponsiveRow(); + $container->add(new htmlOutputText(_("The following suffixes are missing in LDAP. LAM can create them for you.")), 12); + $container->add(new htmlOutputText(_("You can setup the LDAP suffixes for all account types in your LAM server profile on tab \"Account types\".")), 12); + $container->addVerticalSpacer('1rem'); // print missing suffixes foreach ($newSuffixes as $newSuffix) { - $container->addElement(new htmlOutputText($newSuffix), true); + $container->add(new htmlOutputText($newSuffix), 12); } - $container->addElement(new htmlSpacer(null, '10px'), true); + $container->addVerticalSpacer('2rem'); - $buttonContainer = new htmlTable(); + $buttonContainer = new htmlGroup(); $buttonContainer->addElement(new htmlButton('add_suff', _("Create"))); $buttonContainer->addElement(new htmlButton('cancel', _("Cancel"))); $buttonContainer->addElement(new htmlHiddenInput('new_suff', implode(";", $newSuffixes))); - $container->addElement($buttonContainer); + $container->add($buttonContainer, 12); addSecurityTokenToMetaHTML($container); $tabindex = 1; @@ -208,5 +207,5 @@ include 'main_header.php'; echo "

\n"; echo "
\n"; -include 'main_footer.php'; +include '../lib/adminFooter.inc'; ?> diff --git a/lam/templates/lists/deletelink.php b/lam/templates/lists/deletelink.php index f3cf5919..d21ae1ad 100644 --- a/lam/templates/lists/deletelink.php +++ b/lam/templates/lists/deletelink.php @@ -64,9 +64,9 @@ if (isset($dn) && isset($type)) { } else { // print error message if arguments are missing - include '../main_header.php'; + include '../../lib/adminHeader.inc'; StatusMessage("ERROR", "No account or type given."); - include '../main_footer.php'; + include '../../lib/adminFooter.inc'; } ?> diff --git a/lam/templates/lists/userlink.php b/lam/templates/lists/userlink.php index 9c838244..0941768d 100644 --- a/lam/templates/lists/userlink.php +++ b/lam/templates/lists/userlink.php @@ -1,10 +1,11 @@  

"; - echo "

" . _("Back to group list") . "

"; - include '../main_footer.php'; + include '../../lib/adminHeader.inc'; + $container = new htmlResponsiveRow(); + $container->addVerticalSpacer('1rem'); + $container->add(new htmlStatusMessage("ERROR", _("This user was not found!"), htmlspecialchars($user)), 12); + $container->addVerticalSpacer('1rem'); + $container->add(new \htmlLink(_("Back to group list"), 'javascript:history.back()'), 12); + parseHtml(null, $container, array(), false, $tabindex, 'user'); + include '../../lib/adminFooter.inc'; } diff --git a/lam/templates/tools/ou_edit.php b/lam/templates/tools/ou_edit.php index cdb49bf8..86dc0508 100644 --- a/lam/templates/tools/ou_edit.php +++ b/lam/templates/tools/ou_edit.php @@ -118,7 +118,7 @@ if (isset($_POST['createOU']) || isset($_POST['deleteOU'])) { $info = ldap_get_entries($_SESSION['ldap']->server(), $sr); if ($sr && $info['count'] == 0) { // print header - include '../main_header.php'; + include '../../lib/adminHeader.inc'; echo '
'; echo "
\n"; $tabindex = 1; @@ -142,7 +142,7 @@ if (isset($_POST['createOU']) || isset($_POST['deleteOU'])) { parseHtml(null, $container, array(), false, $tabindex, 'user'); echo "
"; echo '
'; - include '../main_footer.php'; + include '../../lib/adminFooter.inc'; exit(); } else {