Skip to content

Commit

Permalink
Moving xml.php to the document root.
Browse files Browse the repository at this point in the history
  • Loading branch information
bertrama committed Nov 4, 2024
1 parent ef73a7e commit 521eea8
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions html/admin/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php
require_once '/var/www/vendor/autoload.php';

$loader = new \Twig\Loader\FilesystemLoader('/var/www/templates');
$twig = new \Twig\Environment($loader, ['cache' => 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();
File renamed without changes.

0 comments on commit 521eea8

Please sign in to comment.