3 * COPS (Calibre OPDS PHP Server) main script
5 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
6 * @author Sébastien Lucas <sebastien@slucas.fr>
10 require_once ("config.php");
11 require_once ("base.php");
12 require_once ("author.php");
13 require_once ("serie.php");
14 require_once ("tag.php");
15 require_once ("book.php");
16 require_once ("OPDS_renderer.php");
18 header ("Content-Type:application/xml");
19 $page = getURLParam ("page", Base::PAGE_INDEX);
20 $query = getURLParam ("query");
21 $n = getURLParam ("n", "1");
23 $page = Base::PAGE_OPENSEARCH_QUERY;
24 $qid = getURLParam ("id");
26 $OPDSRender = new OPDSRenderer ();
29 case Base::PAGE_OPENSEARCH :
30 echo $OPDSRender->getOpenSearch ();
33 $currentPage = Page::getPage ($page, $qid, $query, $n);
34 $currentPage->InitializeContent ();
35 echo $OPDSRender->render ($currentPage);