4 Copyright(c) 2010 Internet Archive. Software license AGPL version 3.
6 This file is part of BookReader. The full source code can be found at GitHub:
7 http://github.com/openlibrary/bookreader
10 Michael Ang <http://github.com/mangtronix>
12 BookReader is free software: you can redistribute it and/or modify
13 it under the terms of the GNU Affero General Public License as published by
14 the Free Software Foundation, either version 3 of the License, or
15 (at your option) any later version.
17 BookReader is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU Affero General Public License for more details.
22 You should have received a copy of the GNU Affero General Public License
23 along with BookReader. If not, see <http://www.gnu.org/licenses/>.
26 require_once('../datanode/BookReaderImages.inc.php');
29 switch ($_REQUEST['test']) {
31 $bri = new BookReaderImages();
32 ok('text/javascript');
33 print( json_encode($bri->parsePageRequest($_REQUEST['value'], $_REQUEST['bookPrefix'])) );
38 print "<html><head><title>BookReader Tests</title></head>";
40 print "<h1>Available tests</h1>";
42 print "<a href='BookReaderTest.php?test=pageparse&value=cover_r4.jpg'>pageparse</a> value bookPrefix";
48 } catch (Exception $e) {
49 print "Error serving request:\n";
50 print " " . $e->getMessage() . "\n\n";
51 print "Debugging information:\n";
52 echo $e->getTraceAsString();
56 header('HTTP/1.0 200 OK');
57 header('Content-type: ' . $type);