*/ // Include functions and settings. require_once __DIR__ . "/inc/functions.php"; require_once __DIR__ . "/inc/search.php"; // Ensure working environment for frontend. ensureEnvironment(); $pages = loadPublicPages(); // Load overview of pages. /* * Load data. */ /* * Output */ echo printPublicHead($settings, "search", $settings['pageTitle'], $settings['logo']); echo printPublicHeader($settings['pageTitle']); echo printStaticPagePart("banner", "header"); // Print aside (if need be) echo generatePublicNav($pages); echo '
'; // Print main content echo '
'; if (!isset($_GET['q'])) { echo '

'; } else { $getArgsForMD = []; foreach ($_GET as $key => $value) $getArgsForMD[] = "$key=$value"; echo '

"' . $_GET['q'] . '"

' . displaySearchResults($_GET['q']) . '

' . searchMDObjects(array_merge(["sv=" . $_GET['q']], $getArgsForMD), $settings) . '
'; } echo '
'; echo printStaticPagePart("aside", "aside"); // Print aside (if need be) echo '
'; echo printStaticPagePart("footer", "footer"); // Print footer (if need be) echo printPublicEnd(); ?>