Working with cops
--HG-- extra : rebase_source : 66639c415fc1286e8df50c255d83b0e8f92777d3
This commit is contained in:
parent
30f801443e
commit
ea3da650de
3 changed files with 37 additions and 17 deletions
|
@ -1,27 +1,33 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
|
||||
<?php
|
||||
|
||||
require_once ("config.php");
|
||||
require_once ("base.php");
|
||||
require_once ("book.php");
|
||||
require_once ("resources/php-epub-meta/epub.php");
|
||||
|
||||
header ("Content-Type: text/html;charset=utf-8");
|
||||
|
||||
$book = new EPub ("c:/Temp/Phare.epub");
|
||||
$idData = getURLParam ("data", NULL);
|
||||
$add = "data=$idData&";
|
||||
if (!is_null (GetUrlParam (DB))) $add .= DB . "=" . GetUrlParam (DB) . "&";
|
||||
$myBook = Book::getBookByDataId($idData);
|
||||
|
||||
$book = new EPub ($myBook->getFilePath ("EPUB", $idData));
|
||||
$book->initSpineComponent ();
|
||||
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta http-equiv="imagetoolbar" content="no" />
|
||||
<meta name="viewport" content="width=device-width, height=device-height, user-scalable=no" />
|
||||
<title>COPS's Epub Reader</title>
|
||||
<script type="text/javascript" src="<?php echo getUrlWithVersion("js/jquery-1.9.1.min.js") ?>"></script>
|
||||
<script type="text/javascript" src="<?php echo getUrlWithVersion("resources/monocle320/scripts/monocore.js") ?>"></script>
|
||||
<script type="text/javascript" src="<?php echo getUrlWithVersion("resources/monocle320/scripts/monoctrl.js") ?>"></script>
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo getUrlWithVersion("resources/monocle320/styles/monocore.css") ?>" media="screen" />
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo getUrlWithVersion("resources/monocle320/styles/monoctrl.css") ?>" media="screen" />
|
||||
<script type="text/javascript" src="<?php echo getUrlWithVersion("resources/jQuery/jquery-1.10.2.min.js") ?>"></script>
|
||||
<script type="text/javascript" src="<?php echo getUrlWithVersion("resources/monocle/scripts/monocore.js") ?>"></script>
|
||||
<script type="text/javascript" src="<?php echo getUrlWithVersion("resources/monocle/scripts/monoctrl.js") ?>"></script>
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo getUrlWithVersion("resources/monocle/styles/monocore.css") ?>" media="screen" />
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo getUrlWithVersion("resources/monocle/styles/monoctrl.css") ?>" media="screen" />
|
||||
<script type="text/javascript">
|
||||
Monocle.DEBUG = true;
|
||||
var bookData = {
|
||||
|
@ -33,7 +39,7 @@ $book->initSpineComponent ();
|
|||
},
|
||||
getComponent: function (componentId, callback) {
|
||||
$.ajax({
|
||||
url: "epubfs.php?comp=" + componentId,
|
||||
url: "epubfs.php?<?php echo $add ?>comp=" + componentId,
|
||||
type: 'get',
|
||||
dataType: 'text',
|
||||
error: function () {alert ("error");},
|
||||
|
@ -42,7 +48,7 @@ $book->initSpineComponent ();
|
|||
},
|
||||
getMetaData: function(key) {
|
||||
return {
|
||||
title: "A book",
|
||||
title: "<?php echo $myBook->title ?>",
|
||||
creator: "Inventive Labs"
|
||||
}[key];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue