*/ // Include functions and settings. require_once __DIR__ . "/inc/functions.php"; // Check validity of request. if (!isset($_GET['id']) or !is_numeric($_GET['id'])) { echo printErrorPage("Collection does not exist."); return; } // Ensure working environment for frontend. ensureEnvironment(); $pages = loadPublicPages(); // Load overview of pages. // Load data $contents = json_decode(queryCachePage($settings['mdVersion'] . "?t=sammlung&gesusa=" . urlencode($_GET['id']) . "&output=json", "institution", $settings), true); if (!$contents || (isset($contents[0]) and $contents[0] == "There is no collection with this ID yet.")) { echo printErrorPage("Temporarily unavailable."); return; } if ($settings['limitToInstitutions'] != [] and !in_array($contents['collection_id'], $settings['limitToInstitutions'])) { echo printErrorPage("This collection does not belong to an enabled institution."); return; } /* * Output */ $addToHead = ' '; echo printPublicHead($settings, $_GET['id'], $settings['pageTitle'] . " - " . $contents['collection_name'], $settings['logo'], $addToHead); echo printPublicHeader($settings['pageTitle']); echo printStaticPagePart("banner", "header"); // Print aside (if need be) echo generatePublicNav($pages); echo '
'; // Print main content echo '
'; echo drawCollectionDetails($contents, $settings); echo '
'; echo printStaticPagePart("aside", "aside"); // Print aside (if need be) echo '
'; echo printStaticPagePart("footer", "footer"); // Print footer (if need be) echo printPublicEnd(); ?>