From 521eea86f90060ae09ba493fd2227f86ebbda8d8 Mon Sep 17 00:00:00 2001 From: Albert Bertram Date: Mon, 4 Nov 2024 13:56:21 -0500 Subject: [PATCH] Moving xml.php to the document root. --- html/admin/index.php | 29 ++++++++++++++++++++++++++++ html/{browse/categories => }/xml.php | 0 2 files changed, 29 insertions(+) create mode 100644 html/admin/index.php rename html/{browse/categories => }/xml.php (100%) diff --git a/html/admin/index.php b/html/admin/index.php new file mode 100644 index 0000000..26dd8b9 --- /dev/null +++ b/html/admin/index.php @@ -0,0 +1,29 @@ + getenv("TWIG_CACHE"), 'autoescape' => false]); +$db = new \Umich\CallNumberMapping\Database; +$hlb = new \Umich\CallNumberMapping\Hlb($db, $twig); + +foreach (['narrow'] as $var) { + if (isset($_POST[$var])) { + $$var = $_POST[$var]; + } + elseif (isset($_GET[$var])) { + $$var = $_GET[$var]; + } + else { + $$var = ''; + } +} + +$hlb->pageTitle('Browse & Map Library Browse Mappings'); +$hlb->setAuthenticated(!empty($_SERVER['REMOTE_USER'])); +$hlb->addContent('navigation', ['browse_active' => 'active']); +$hlb->addContent('search', $hlb->getSearchParams($narrow)); +if (!empty($narrow)) { + $hlb->addContent('mappings', $hlb->getMappingsParams($narrow)); +} + +print $hlb->render(); diff --git a/html/browse/categories/xml.php b/html/xml.php similarity index 100% rename from html/browse/categories/xml.php rename to html/xml.php