2012-06-02 09:48:07 +03:00
|
|
|
|
<?php
|
|
|
|
|
/**
|
2012-06-12 23:52:39 +03:00
|
|
|
|
* COPS (Calibre OPDS PHP Server) book detail script
|
2012-06-02 09:48:07 +03:00
|
|
|
|
*
|
|
|
|
|
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
|
|
|
|
|
* @author S<EFBFBD>bastien Lucas <sebastien@slucas.fr>
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
require_once ("config.php");
|
|
|
|
|
require_once ("book.php");
|
|
|
|
|
|
|
|
|
|
$book = Book::getBookById($_GET["id"]);
|
|
|
|
|
$authors = $book->getAuthors ();
|
2012-06-11 22:30:25 +03:00
|
|
|
|
$tags = $book->getTags ();
|
2012-06-17 14:50:33 +03:00
|
|
|
|
$serie = $book->getSerie ();
|
2012-06-24 09:24:28 +03:00
|
|
|
|
$book->getLinkArray ();
|
2012-06-02 09:48:07 +03:00
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
<div class="bookpopup">
|
|
|
|
|
<div class="booke">
|
|
|
|
|
<div class="cover">
|
2012-12-23 14:56:01 +02:00
|
|
|
|
<?php
|
|
|
|
|
if ($book->hasCover) {
|
|
|
|
|
?>
|
2013-01-03 22:40:43 +02:00
|
|
|
|
<a href="fetch.php?id=<?php echo $book->id ?>"><img src="fetch.php?id=<?php echo $book->id ?>&height=150" alt="cover" /></a>
|
2012-12-23 14:56:01 +02:00
|
|
|
|
<?php
|
|
|
|
|
}
|
|
|
|
|
?>
|
2012-06-02 09:48:07 +03:00
|
|
|
|
</div>
|
2012-06-24 09:24:28 +03:00
|
|
|
|
<div class="download">
|
|
|
|
|
<?php
|
2012-06-26 15:45:09 +03:00
|
|
|
|
foreach ($book->getDatas() as $data)
|
2012-06-24 09:24:28 +03:00
|
|
|
|
{
|
|
|
|
|
?>
|
2012-06-26 15:45:09 +03:00
|
|
|
|
<div class="button buttonEffect"><a href="<?php echo $data->getHtmlLink () ?>"><?php echo $data->format ?></a></div>
|
2012-06-24 09:24:28 +03:00
|
|
|
|
<?php
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
</div>
|
2013-01-03 22:40:43 +02:00
|
|
|
|
<div class="entryTitle"><a rel="bookmark" href="<?php echo 'index.php' . $book->getUri () ?>"><img src="<?php echo getUrlWithVersion("images/Link.png") ?>" alt="permalink" /></a><?php echo htmlspecialchars ($book->title) ?></div>
|
2012-06-12 23:46:54 +03:00
|
|
|
|
<div class="entrySection">
|
|
|
|
|
<span><?php echo localize("authors.title") ?></span>
|
|
|
|
|
<div class="buttonEffect pad6">
|
2012-06-02 09:48:07 +03:00
|
|
|
|
<?php
|
2012-06-12 23:46:54 +03:00
|
|
|
|
$i = 0;
|
|
|
|
|
foreach ($authors as $author) {
|
|
|
|
|
if ($i > 0) echo ", ";
|
2012-06-02 09:48:07 +03:00
|
|
|
|
?>
|
2012-06-18 15:12:12 +03:00
|
|
|
|
<a href="index.php<?php echo str_replace ("&", "&", $author->getUri ()) ?>"><?php echo htmlspecialchars ($author->name) ?></a>
|
2012-06-11 22:30:25 +03:00
|
|
|
|
<?php
|
2012-06-12 23:46:54 +03:00
|
|
|
|
}
|
2012-06-11 22:30:25 +03:00
|
|
|
|
?>
|
2012-06-12 23:46:54 +03:00
|
|
|
|
</div>
|
2012-06-11 22:30:25 +03:00
|
|
|
|
</div>
|
2012-06-12 23:46:54 +03:00
|
|
|
|
<div class="entrySection">
|
|
|
|
|
<span><?php echo localize("tags.title") ?></span>
|
|
|
|
|
<div class="buttonEffect pad6">
|
2012-06-11 22:30:25 +03:00
|
|
|
|
<?php
|
2012-06-12 23:46:54 +03:00
|
|
|
|
$i = 0;
|
|
|
|
|
foreach ($tags as $tag) {
|
|
|
|
|
if ($i > 0) echo ", ";
|
2012-06-11 22:30:25 +03:00
|
|
|
|
?>
|
2012-06-18 15:12:12 +03:00
|
|
|
|
<a href="index.php<?php echo str_replace ("&", "&", $tag->getUri ()) ?>"><?php echo htmlspecialchars ($tag->name) ?></a>
|
2012-06-02 09:48:07 +03:00
|
|
|
|
<?php
|
2012-06-12 23:46:54 +03:00
|
|
|
|
}
|
2012-06-02 09:48:07 +03:00
|
|
|
|
?>
|
2012-06-12 23:46:54 +03:00
|
|
|
|
</div>
|
2012-06-02 09:48:07 +03:00
|
|
|
|
</div>
|
2012-06-17 14:50:33 +03:00
|
|
|
|
<?php
|
|
|
|
|
if (!is_null ($serie))
|
|
|
|
|
{
|
|
|
|
|
?>
|
|
|
|
|
<div class="entrySection">
|
|
|
|
|
<div class="buttonEffect pad6">
|
|
|
|
|
<a href="index.php<?php echo str_replace ("&", "&", $serie->getUri ()) ?>"><?php echo localize("series.title") ?></a>
|
|
|
|
|
</div>
|
2012-06-18 15:12:12 +03:00
|
|
|
|
<?php echo str_format (localize ("content.series.data"), $book->seriesIndex, htmlspecialchars ($serie->name)) ?>
|
2012-06-17 14:50:33 +03:00
|
|
|
|
</div>
|
|
|
|
|
<?php
|
|
|
|
|
}
|
|
|
|
|
?>
|
2012-12-03 17:05:13 +02:00
|
|
|
|
<div class="entrySection">
|
|
|
|
|
<span><?php echo localize("config.Language.label") ?></span>
|
|
|
|
|
<?php echo $book->getLanguages () ?>
|
|
|
|
|
</div>
|
2012-06-02 09:48:07 +03:00
|
|
|
|
</div>
|
|
|
|
|
<div class="clearer" />
|
|
|
|
|
<hr />
|
2012-06-11 22:30:25 +03:00
|
|
|
|
<div><?php echo localize("content.summary") ?></div>
|
2012-09-30 16:38:09 +03:00
|
|
|
|
<div class="content" style="max-width:700px;"><?php echo $book->getComment (false) ?></div>
|
2012-06-02 09:48:07 +03:00
|
|
|
|
<hr />
|
|
|
|
|
</div>
|