$folio = $uri[6]; //vserver } //$naan = $uri[7]; // localhost //$ARK_NAME = $uri[8]; // localhost //-- If manifest from bnf if ($naan == "12148") { $mfId = $baseUri . "ark:/12148/" . $ARK_NAME . "/manifest.json"; if (!empty($folio)) { $startCanvas = "http://gallica.bnf.fr/iiif/ark:/12148/" . $ARK_NAME . "/canvas/" . $folio; } } //$mfUrl = $baseUriHttps."ark:/12148/".$ARK_NAME."/manifest.json";; //-- List Mongo collections in db $collections = $db->listCollections(); if (!IsManifestInDb($collections, $mfId)) { echo "Ce manifest n'existe pas dans la base de données"; } else { ?> <!DOCTYPE html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <link rel="stylesheet" type="text/css" href="/manifests/js/mirador/build/mirador/css/mirador-combined.css"> <title><?php //echo $label; ?> Mirador Viewer</title> <style type="text/css"> body { padding: 0; margin: 0; overflow: hidden; font-size: 70%; } #viewer { background: #333 url(/manifests/js/mirador/build/mirador/images/debut_dark.png) left top repeat; width: 100%; height: 100%; position: fixed; }
$baseUri = "http://iiif.biblissima.fr/manifests/"; //--- Get ark identifier from url parameter (dev only) //$ARK = $_GET['ark']; //$ark_array = explode("/", $ARK); //$ARK_NAME = $ark_array[2]; //--- Get ark identifier from url (in prod) $uri = explode("/", $_SERVER['REQUEST_URI']); $ark_array = array($uri[2], $uri[3], $uri[4]); // server //$ark_array = array($uri[4], $uri[5], $uri[6]); // localhost $ARK = implode("/", $ark_array); //--- Manifest @id $mfId = $baseUri . $ARK . "/manifest.json"; //-- List Mongo collections in db $collections = $db->listCollections(); if (!IsManifestInDb($collections, $mfId)) { echo "Ce manifest n'existe pas dans la base de données"; } else { $cursor = IsManifestInDb($collections, $mfId); foreach ($cursor as $doc) { // For PHP >= 5.4 $mf = json_encode($doc, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); echo $mf; // For Mongodb 1.4.4 (current version on Debian 6) //unset($doc['_id']); // remove _id field from result, since projection operator does not seem to work w/ Mongodb 1.4.4 // For PHP <= 5.4 (json_encode constants not supported) //$doc = str_replace('\\/', '/', json_encode($doc)); //$doc = mb_convert_encoding($doc, 'UTF-8'); //echo $doc; } }