Merge almost everything. a lot to test.
This commit is contained in:
commit
639d1bf8b0
45 changed files with 800 additions and 338 deletions
57
index.php
57
index.php
|
@ -24,11 +24,12 @@
|
|||
$withToolbar = false;
|
||||
if (!isset($_COOKIE['toolbar'])) $withToolbar = true;
|
||||
|
||||
header ("Content-Type:application/xhtml+xml");
|
||||
header ("Content-Type:application/xhtml+xml;charset=utf-8");
|
||||
$page = getURLParam ("page", Base::PAGE_INDEX);
|
||||
$query = getURLParam ("query");
|
||||
$qid = getURLParam ("id");
|
||||
$n = getURLParam ("n", "1");
|
||||
$database = GetUrlParam (DB);
|
||||
|
||||
$currentPage = Page::getPage ($page, $qid, $query, $n);
|
||||
$currentPage->InitializeContent ();
|
||||
|
@ -52,13 +53,15 @@
|
|||
<meta http-equiv="imagetoolbar" content="no" />
|
||||
<meta name="viewport" content="width=device-width, height=device-height, user-scalable=no" />
|
||||
<title><?php echo htmlspecialchars ($currentPage->title) ?></title>
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="fancybox/jquery.fancybox.pack.js?v=2.1.3"></script>
|
||||
<script type="text/javascript" src="<?php echo getUrlWithVersion("js/jquery.sortElements.js") ?>"></script>
|
||||
<script type="text/javascript" src="<?php echo getUrlWithVersion("js/jquery-1.9.1.min.js") ?>"></script>
|
||||
<script type="text/javascript" src="<?php echo getUrlWithVersion("js/jquery.cookies.js") ?>"></script>
|
||||
<link rel="related" href="feed.php" type="application/atom+xml;profile=opds-catalog" title="<?php echo $config['cops_title_default']; ?>" />
|
||||
<?php if ($config['cops_use_fancyapps'] == 1) { ?>
|
||||
<script type="text/javascript" src="<?php echo getUrlWithVersion("resources/fancybox/jquery.fancybox.pack.js") ?>"></script>
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo getUrlWithVersion("resources/fancybox/jquery.fancybox.css") ?>" media="screen" />
|
||||
<?php } ?>
|
||||
<script type="text/javascript" src="<?php echo getUrlWithVersion("js/jquery.sortElements.js") ?>"></script>
|
||||
<link rel="related" href="<?php echo $config['cops_full_url'] ?>feed.php" type="application/atom+xml;profile=opds-catalog" title="<?php echo $config['cops_title_default']; ?>" />
|
||||
<link rel="icon" type="image/vnd.microsoft.icon" href="<?php echo $currentPage->favicon ?>" />
|
||||
<link rel="stylesheet" type="text/css" href="fancybox/jquery.fancybox.css?v=2.1.3" media="screen" />
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo getUrlWithVersion("style.css") ?>" media="screen" />
|
||||
<link rel="stylesheet" href="//normalize-css.googlecode.com/svn/trunk/normalize.css" />
|
||||
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300italic,800,300,400italic,600,600italic,700,700italic,800italic' rel='stylesheet' type='text/css' />
|
||||
|
@ -89,7 +92,6 @@
|
|||
nextEffect : 'none'
|
||||
<?php if ($isEink) echo ", openEffect : 'none', closeEffect : 'none', helpers : {overlay : null}"; ?>
|
||||
});
|
||||
<?php } ?>
|
||||
|
||||
$(".fancyabout").fancybox({
|
||||
'type' : 'ajax',
|
||||
|
@ -98,6 +100,7 @@
|
|||
nextEffect : 'none'
|
||||
<?php if ($isEink) echo ", openEffect : 'none', closeEffect : 'none', helpers : {overlay : null}"; ?>
|
||||
});
|
||||
<?php } ?>
|
||||
|
||||
$(".headright").click(function(){
|
||||
if ($("#tool").is(":hidden")) {
|
||||
|
@ -109,6 +112,7 @@
|
|||
}
|
||||
});
|
||||
|
||||
<?php if ($page != Base::PAGE_BOOK_DETAIL) { ?>
|
||||
$(".bookdetail").click(function(){
|
||||
var url = $(this).find("a").attr("href");
|
||||
<?php if ($config['cops_use_fancyapps'] == 0) { ?>
|
||||
|
@ -124,6 +128,7 @@
|
|||
<?php } ?>
|
||||
return false;
|
||||
});
|
||||
<?php } ?>
|
||||
});
|
||||
|
||||
<?php
|
||||
|
@ -148,25 +153,26 @@
|
|||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="loading">
|
||||
<p><img src="images/ajax-loader.gif" alt="waiting" /> Please Wait</p>
|
||||
</div>
|
||||
<div class="container">
|
||||
<header>
|
||||
<a class="headleft" href="<?php echo $_SERVER["SCRIPT_NAME"] ?>">
|
||||
<img src="<?php echo getUrlWithVersion("images/home.png") ?>" alt="Home" />
|
||||
<a class="headleft" href="<?php echo $_SERVER["SCRIPT_NAME"]; if ($page != Base::PAGE_INDEX && !is_null ($database)) echo "?" . addURLParameter ("", DB, $database); ?>">
|
||||
<img src="<?php echo getUrlWithVersion("images/home.png") ?>" alt="<?php echo localize ("home.alternate") ?>" />
|
||||
</a>
|
||||
<img class="headright" id="searchImage" src="<?php echo getUrlWithVersion("images/setting64.png") ?>" alt="Settings and menu" />
|
||||
<h1><?php echo htmlspecialchars ($currentPage->title) ?></h1>
|
||||
</header>
|
||||
<aside id="tool" <?php if ($withToolbar) echo 'style="display: none"' ?>>
|
||||
<div style="float: left; width: 60%">
|
||||
<form action="index.php?page=9" method="get">
|
||||
<form action="index.php" method="get">
|
||||
<div style="float: right">
|
||||
<input type="image" src="images/search32.png" alt="Search" />
|
||||
<input type="image" src="images/search32.png" alt="<?php echo localize ("search.alternate") ?>" />
|
||||
</div>
|
||||
<div class="stop">
|
||||
<input type="hidden" name="current" value="<?php echo $page ?>" />
|
||||
<input type="hidden" name="page" value="9" />
|
||||
<?php if (!is_null ($database)) { ?>
|
||||
<input type="hidden" name="<?php echo DB ?>" value="<?php echo $database ?>" />
|
||||
<?php } ?>
|
||||
<input type="text" name="query" />
|
||||
</div>
|
||||
</form>
|
||||
|
@ -174,7 +180,7 @@
|
|||
<?php if ($currentPage->containsBook ()) { ?>
|
||||
<div style="float: right; width: 35%">
|
||||
<div style="float: right">
|
||||
<img id="sort" src="images/sort32.png" alt="Sort" />
|
||||
<img id="sort" src="images/sort32.png" alt="<?php echo localize ("sort.alternate") ?>" />
|
||||
</div>
|
||||
<div class="stop">
|
||||
<select id="sortchoice">
|
||||
|
@ -184,8 +190,8 @@
|
|||
<option value="sp"><?php echo localize("content.published") ?></option>
|
||||
</select>
|
||||
<select id="sortorder">
|
||||
<option value="asc">Asc</option>
|
||||
<option value="desc">Desc</option>
|
||||
<option value="asc"><?php echo localize("search.sortorder.asc") ?></option>
|
||||
<option value="desc"><?php echo localize("search.sortorder.desc") ?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -193,14 +199,15 @@
|
|||
</aside>
|
||||
<div id="content" style="display: none;"></div>
|
||||
<section>
|
||||
<?php
|
||||
if ($page == Base::PAGE_BOOK_DETAIL)
|
||||
{
|
||||
<?php
|
||||
if ($page == Base::PAGE_BOOK_DETAIL) {
|
||||
include ("bookdetail.php");
|
||||
} else if ($page == Base::PAGE_ABOUT) {
|
||||
readfile ("about.xml");
|
||||
}
|
||||
foreach ($currentPage->entryArray as $entry) {
|
||||
if (get_class ($entry) != "EntryBook") {
|
||||
?>
|
||||
?>
|
||||
<article>
|
||||
<div class="frontpage">
|
||||
<?php foreach ($entry->linkArray as $link) { if ($link->type != Link::OPDS_NAVIGATION_TYPE) { continue; } ?> <a href="<?php echo $link->hrefXhtml () ?>">
|
||||
|
@ -270,7 +277,9 @@
|
|||
?>
|
||||
</section>
|
||||
<footer>
|
||||
<a class="fancyabout" href="about.html"><img src="<?php echo getUrlWithVersion("images/info.png") ?>" alt="Home" /></a>
|
||||
<a class="fancyabout" href="<?php if ($config['cops_use_fancyapps'] == 1) { echo "about.xml"; } else { echo $_SERVER["SCRIPT_NAME"] . str_replace ("&", "&", addURLParameter ("?page=16", DB, $database)); } "><img src="<?php echo getUrlWithVersion("images/info.png") ?>" alt="<?php echo localize ("about.title") ?>" /></a>
|
||||
|
||||
</a>
|
||||
<?php
|
||||
if ($currentPage->isPaginated ()) {
|
||||
?>
|
||||
|
@ -279,7 +288,7 @@
|
|||
<?php
|
||||
if (!is_null ($prevLink)) {
|
||||
?>
|
||||
<a href="<?php echo $prevLink->hrefXhtml () ?>" ><img src="<?php echo getUrlWithVersion("images/previous.png") ?>" alt="Previous" /></a>
|
||||
<a href="<?php echo $prevLink->hrefXhtml () ?>" ><img src="<?php echo getUrlWithVersion("images/previous.png") ?>" alt="<?php echo localize ("paging.previous.alternate") ?>" /></a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
@ -287,7 +296,7 @@
|
|||
<?php
|
||||
if (!is_null ($nextLink)) {
|
||||
?>
|
||||
<a href="<?php echo $nextLink->hrefXhtml () ?>" ><img src="<?php echo getUrlWithVersion("images/next.png") ?>" alt="Next" /></a>
|
||||
<a href="<?php echo $nextLink->hrefXhtml () ?>" ><img src="<?php echo getUrlWithVersion("images/next.png") ?>" alt="<?php echo localize ("paging.next.alternate") ?>" /></a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue