* */ 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"); require_once ("resources/doT-php/doT.php"); // If we detect that an OPDS reader try to connect try to redirect to feed.php if (preg_match("/(MantanoReader|FBReader|Stanza|Aldiko|Moon+ Reader)/", $_SERVER['HTTP_USER_AGENT'])) { header("location: feed.php"); exit (); } $page = getURLParam ("page", Base::PAGE_INDEX); $query = getURLParam ("query"); $qid = getURLParam ("id"); $n = getURLParam ("n", "1"); $database = GetUrlParam (DB); // Access the database ASAP to be sure it's readable, redirect if that's not the case. // It has to be done before any header is sent. if (is_array ($config['calibre_directory']) && is_null ($database)) { $i = 0; foreach (array_keys ($config['calibre_directory']) as $key) { $test = Base::getDb ($i); Base::clearDb (); $i++; } } else { $test = Base::getDb (); } $texteDebug = "Top "; header ("Content-Type:text/html;charset=utf-8"); ?>