Joshua Ramon Enslin
bb8fa74cd6
Added standalone pages for: - Exhibitions - Events - Institutions - Collections Added option to limit display to only a given set of institutions.
33 lines
822 B
PHP
33 lines
822 B
PHP
<?PHP
|
|
/**
|
|
* The main display file for standalone pages.
|
|
*
|
|
* @author Joshua Ramon Enslin <joshua@jrenslin.de>
|
|
*/
|
|
|
|
// Include functions and settings.
|
|
|
|
require_once __DIR__ . "/inc/functions.php";
|
|
|
|
// Check validity of request.
|
|
|
|
if (!isset($_GET['args']) || !isset($_GET['area'])) {
|
|
echo printErrorPage("File does not exist.");
|
|
return;
|
|
}
|
|
|
|
if (!in_array($_GET['area'], ['events', 'exhibitions'])) {
|
|
echo printErrorPage("Using a disallowed value for area.");
|
|
return;
|
|
}
|
|
|
|
// Ensure working environment for frontend.
|
|
|
|
ensureEnvironment();
|
|
|
|
$output = queryCachePage($settings['mdVersion'] . "?" . urldecode($_GET['args']), $_GET['area'], $settings);
|
|
$output = str_replace("index.php?t=exhibition&", "exhibition.php?", $output);
|
|
$output = str_replace("index.php?t=event&", "event.php?", $output);
|
|
|
|
echo $output;
|