Skip to content

Commit

Permalink
Merge the html5 branch. fix #45
Browse files Browse the repository at this point in the history
  • Loading branch information
seblucas committed May 21, 2013
2 parents 859c7f9 + 32279af commit 99f0c63
Show file tree
Hide file tree
Showing 18 changed files with 1,103 additions and 413 deletions.
13 changes: 13 additions & 0 deletions about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<h1>Authors</h1>
<h2>COPS is developped and maintained by Sébastien Lucas.</h2>

<p>See full history on <a href="https://github.com/seblucas">Github</a> to check all authors.<br />
COPS use some external librairies, check README for the details.</p>

<h2>Copyright</h2>
<p>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.<br />
The complete content of license is provided in file COPYING within distribution and also available <a href="http://www.gnu.org/licenses/gpl-2.0.html">online</a>.</p>

<h2>Contact</h2>
<p>For more info please visit <a href="http://blog.slucas.fr/en/oss/calibre-opds-php-server">COPS Home Page</a></p>
<p>You can also check <a href="http://www.mobileread.com/forums/showthread.php?t=170903">COPS's topic on MobileRead forum</a>.</p>
20 changes: 6 additions & 14 deletions about.xml
Original file line number Diff line number Diff line change
@@ -1,29 +1,21 @@
<div class="bookdetail">
<div class="entryTitle">Authors</div>
<div class="content" style="max-width:700px;">
<div class="bookpopup" style="max-width:700px;">
<h1>About COPS</h1>
<h2>Authors</h2>
<p>COPS is developped and maintained by Sébastien Lucas.</p>

<p>See full history on <a href="https://github.com/seblucas">Github</a> to check all authors.</p>

<p>COPS use some external librairies, check README for the details.</p>
</div>
<div class="entryTitle">Copyright</div>
<div class="content" style="max-width:700px;">
<h2>Copyright</h2>
<p>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.</p>

<p>The complete content of license is provided in file COPYING within distribution and also available <a href="http://www.gnu.org/licenses/gpl-2.0.html">online</a>.</p>
</div>
<div class="entryTitle">Contact</div>
<div class="content" style="max-width:700px;">
<h2>Contact</h2>
<p>For more info please visit <a href="http://blog.slucas.fr/en/oss/calibre-opds-php-server">COPS Home Page</a></p>

<p>You can also check <a href="http://www.mobileread.com/forums/showthread.php?t=170903">COPS's topic on MobileRead forum</a>.</p>
</div>
<div class="entryTitle">Thanks</div>
<div class="content" style="max-width:700px;">
<h2>Thanks</h2>
<p>Thanks a lot to Kovid Goyal for <a href="http://calibre-ebook.com">Calibre</a>.</p>

<p>And many thanks to all those who helped test COPS.</p>
</div>

</div>
6 changes: 4 additions & 2 deletions base.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,10 @@ public function InitializeContent ()
}
} else {
array_push ($this->entryArray, Author::getCount());
array_push ($this->entryArray, Serie::getCount());
array_push ($this->entryArray, Tag::getCount());
$series = Serie::getCount();
if (!is_null ($series)) array_push ($this->entryArray, $series);
$tags = Tag::getCount();
if (!is_null ($tags)) array_push ($this->entryArray, $tags);
foreach ($config['cops_calibre_custom_column'] as $lookup) {
$customId = CustomColumn::getCustomId ($lookup);
if (!is_null ($customId)) {
Expand Down
74 changes: 27 additions & 47 deletions bookdetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,8 @@
$book->getLinkArray ();

?>
<?php
if (isset ($page) && $page == Base::PAGE_BOOK_DETAIL) {
?>
<div class="bookdetail">
<?php
} else {
?>
<div class="bookpopup">
<?php
}
?>
<div class="booke">
<div class="cover">
<article class="bookpopup">
<span class="cover">
<?php
if ($book->hasCover) {
?>
Expand All @@ -39,21 +28,19 @@
<?php
}
?>
</div>
<div class="download">
</span>
<?php
foreach ($book->getDatas() as $data)
{
?>
<div class="button buttonEffect"><a href="<?php echo $data->getHtmlLink () ?>"><?php echo $data->format ?></a></div>
<h2 class="download"><a href="<?php echo $data->getHtmlLink () ?>"><?php echo $data->format ?></a></h2>
<?php
}
?>
</div>
<div class="entryTitle"><a rel="bookmark" href="<?php echo $book->getDetailUrl (true) ?>"><img src="<?php echo getUrlWithVersion("images/Link.png") ?>" alt="<?php echo localize ("permalink.alternate") ?>" /></a><?php echo htmlspecialchars ($book->title) ?></div>
<div class="entrySection">
<span><?php echo localize("authors.title") ?></span>
<div class="buttonEffect pad6">
<h1><a rel="bookmark" href="<?php echo $book->getDetailUrl (true) ?>"><img src="<?php echo getUrlWithVersion("images/Link.png") ?>" alt="<?php echo localize ("permalink.alternate") ?>" /></a><?php echo htmlspecialchars ($book->title) ?></h1>
<p class="popupless">
<h3><?php echo localize("authors.title") ?>: </h3>

<?php
$i = 0;
foreach ($authors as $author) {
Expand All @@ -63,14 +50,13 @@
<?php
}
?>
</div>
</div>
</p>
<?php
if (count ($tags) > 0) {
?>
<div class="entrySection">
<span><?php echo localize("tags.title") ?></span>
<div class="buttonEffect pad6">
<p class="popupless">
<h3><?php echo localize("tags.title") ?>: </h3>

<?php
$i = 0;
foreach ($tags as $tag) {
Expand All @@ -80,44 +66,38 @@
<?php
}
?>
</div>
</div>
</p>
<?php
}
if (!is_null ($serie))
{
?>
<div class="entrySection">
<div class="buttonEffect pad6">
<a href="<?php $link = new LinkNavigation ($serie->getUri ()); echo $link->hrefXhtml () ?>"><?php echo localize("series.title") ?></a>
</div>
<p class="popupless">
<h3><a href="index.php<?php $link = new LinkNavigation ($serie->getUri ()); echo $link->hrefXhtml () ?>"><?php echo localize("series.title") ?></a>: </h3>
<?php echo str_format (localize ("content.series.data"), $book->seriesIndex, htmlspecialchars ($serie->name)) ?>
</div>
</p>
<?php
}
if ($book->getPubDate() != "")
{
?>
<div class="entrySection">
<span><?php echo localize("pubdate.title") ?></span>
<p class="popupless">
<h3><?php echo localize("pubdate.title") ?>: </h3>
<?php echo $book->getPubDate() ?>
</div>
</p>
<?php
}
if ($book->getLanguages () != "")
{
?>
<div class="entrySection">
<span><?php echo localize("config.Language.label") ?></span>
<p class="popupless">
<h3><?php echo localize("config.Language.label") ?>: </h3>
<?php echo $book->getLanguages () ?>
</div>
<?php
</p>
<?php
}
?>
</div>
<div class="clearer" ></div>
<hr />
<div><?php echo localize("content.summary") ?></div>
<div class="content" <?php if (!isset ($page)) echo 'style="max-width:700px;"' ?>><?php echo $book->getComment (false) ?></div>
<hr />
</div>
<br />
<h4><?php echo localize("content.summary") ?></h4>
<div <?php if (!isset ($page)) echo 'style="max-width:700px;"' ?> ><?php echo $book->getComment (false) ?></div>
</article>
88 changes: 42 additions & 46 deletions checkconfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
require_once ("config.php");
require_once ("base.php");

header ("Content-Type:application/xhtml+xml");
header ("Content-Type:text/html; charset=UTF-8");

$err = getURLParam ("err", -1);
$error = NULL;
Expand All @@ -21,78 +21,74 @@
}

?>
<!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">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<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" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>COPS Configuration Check</title>
<link rel="stylesheet" type="text/css" href="<?php echo getUrlWithVersion("style.css") ?>" media="screen" />
</head>
<body>
<div class="container">
<div class="head">
<header>
<div class="headcenter">
<p>COPS Configuration Check</p>
<h1>COPS Configuration Check</h1>
</div>
</div>
<div class="clearer" />
</header>
<div id="content" style="display: none;"></div>
<div class="entries">
<section>
<?php
if (!is_null ($error)) {
?>
<div class="entry">
<div class="entryTitle">You've been redirected because COPS is not configured properly</div>
<div class="entryContent"><?php echo $error ?></div>
</div>
<article class="frontpage">
<h2>You've been redirected because COPS is not configured properly</h2>
<h4><?php echo $error ?></h4>
</article>
<?php
}
?>
<div class="entry">
<div class="entryTitle">Check if GD is properly installed and loaded</div>
<div class="entryContent">
<article class="frontpage">
<h2>Check if GD is properly installed and loaded</h2>
<h4>
<?php
if (extension_loaded('gd') && function_exists('gd_info')) {
echo "OK";
} else {
echo "Please install the php5-gd extension and make sure it's enabled";
}
?>
</div>
</div>
<div class="entry">
<div class="entryTitle">Check if Sqlite is properly installed and loaded</div>
<div class="entryContent">
</h4>
</article>
<article class="frontpage">
<h2>Check if Sqlite is properly installed and loaded</h2>
<h4>
<?php
if (extension_loaded('pdo_sqlite')) {
echo "OK";
} else {
echo "Please install the php5-sqlite extension and make sure it's enabled";
}
?>
</div>
</div>
<div class="entry">
<div class="entryTitle">Check if libxml is properly installed and loaded</div>
<div class="entryContent">
</h4>
</article>
<article class="frontpage">
<h2>Check if libxml is properly installed and loaded</h2>
<h4>
<?php
if (extension_loaded('libxml')) {
echo "OK";
} else {
echo "Please make sure libxml is enabled";
}
?>
</div>
</div>
</h4>
</article>
<?php
$i = 0;
foreach (Base::getDbList () as $name => $database) {
?>
<div class="entry">
<div class="entryTitle">Check if Calibre database file exists and is readable</div>
<div class="entryContent">
<article class="frontpage">
<h2>Check if Calibre database file exists and is readable</h2>
<?php
if (is_readable (Base::getDbFileName ($i))) {
echo "{$name} OK";
Expand All @@ -107,11 +103,10 @@
</ul>";
}
?>
</div>
</div>
<div class="entry">
<div class="entryTitle">Check if Calibre database file can be opened with PHP</div>
<div class="entryContent">
</article>
<article class="frontpage">
<h2>Check if Calibre database file can be opened with PHP</h2>
<h4>
<?php
try {
$db = new PDO('sqlite:'. Base::getDbFileName ($i));
Expand All @@ -120,11 +115,11 @@
echo "{$name} If the file is readable, check your php configuration. Exception detail : " . $e;
}
?>
</div>
</div>
<div class="entry">
<div class="entryTitle">Check if Calibre database file contains at least some of the needed tables</div>
<div class="entryContent">
</h4>
</article>
<article class="frontpage">
<h2>Check if Calibre database file contains at least some of the needed tables</h2>
<h4>
<?php
try {
$db = new PDO('sqlite:'. Base::getDbFileName ($i));
Expand All @@ -138,10 +133,11 @@
echo "{$name} If the file is readable, check your php configuration. Exception detail : " . $e;
}
?>
</div>
</div>
</h4>
</article>
<?php $i++; } ?>
</div>
</section>
<footer></footer>
</div>
</body>
</html>
Expand Down
Binary file modified images/home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/info.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/next.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/previous.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/search32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/setting64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/sort32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 99f0c63

Please sign in to comment.