forked from uklibraries/ohms-viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrender.php
31 lines (24 loc) · 993 Bytes
/
render.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
/**
* OHMS Viewer
* @author Nouman Tayyab <[email protected]>
* @copyright Copyright © 2012 Louie B. Nunn Center, University of Kentucky
* @license http://www.gnu.org/licenses/ GNU GENERAL PUBLIC LICENSE
* @link https://ams.americanarchive.org
*/
use Ohms\ViewerController;
require_once 'app/init.php';
session_start();
$translate = (int) filter_input(INPUT_GET, 'translate', FILTER_VALIDATE_INT, array('options' => array('default' => 0)));
$file = filter_input(INPUT_GET, 'cachefile');
$keyword = filter_input(INPUT_GET, 'kw');
$action = filter_input(INPUT_GET, 'action', FILTER_SANITIZE_ENCODED);
$external = filter_input(INPUT_GET, 'external', FILTER_VALIDATE_BOOLEAN, array('options' => array('default' => false)));
if (empty($file)):
header('HTTP/1.0 404 Not Found');
exit();
else:
$vController = new ViewerController($file, $external, $translate);
$vController->route($action, $keyword, $file);
endif;
/* Location: ./render.php */