The new interface is completely in Ajax. Feel a lot faster. re #73

Uses pushState / popState to keep browser history correct and allow using back in the browser.
This commit is contained in:
Sébastien Lucas 2013-06-15 08:03:22 +02:00
parent c7c6524cce
commit a509e3389d
5 changed files with 186 additions and 197 deletions

31
getJSON.php Normal file
View file

@ -0,0 +1,31 @@
<?php
/**
* COPS (Calibre OPDS PHP Server) HTML main script
*
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
* @author Sébastien Lucas <sebastien@slucas.fr>
*
*/
require_once ("config.php");
require_once ("base.php");
require_once ("author.php");
require_once ("serie.php");
require_once ("tag.php");
require_once ("language.php");
require_once ("customcolumn.php");
require_once ("book.php");
header ("Content-Type:application/json;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 ();
echo json_encode ($currentPage->getContentArray ());
?>