File: index.php

Recommend this page to a friend!
  Classes of Karl Holz  >  eKatab PHP ePub Reader  >  index.php  >  Download  
File: index.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: eKatab PHP ePub Reader
Display ebooks in the epub format on Web pages
Author: By
Last change:
Date: 4 years ago
Size: 2,044 bytes


Class file image Download
function make_books($glob=array(), $ext='epub') {
    foreach (
$glob as $b) {
    require_once 'eKatab/eKatab.class.php';
    new eKatab("
$file=basename($b, '.'.$ext).'.php';
        if (!
is_file($file)) { file_put_contents($file, $p); }
'<li><a data-ajax="false" href="'.rawurlencode($file).'" data-transition="flip">'.basename($b, '.'.$ext)."</a></li>";


<!DOCTYPE html>
<html xmlns="">
    <title>eKatab ebook Reader</title>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" href="css/" />
    <script src="js/jquery.js"></script>
    <script src="js/"></script>
    <script type="text/javascript">
jQuery(function ($) {

    <div data-role="page" data-theme="b" id="$rest">
     <div data-role="header" data-position="fixed"><h1 class="title">eBooks Avalible</h1></div>
     <div data-role="content" id="html">

      <div id="epub1" data-role="collapsible" data-collapsed="false" data-theme="a" data-content-theme="b">
         <h3>ePub ebooks </h3>
         <ul data-role="listview" data-inset="true">
      <?php make_books(glob('*.epub'), 'epub'); ?>

    <div id="ibooks" data-role="collapsible" data-collapsed="true" data-theme="a" data-content-theme="b">
     <h3>iBooks (ibooks) ebooks, not fully supported</h3>
     <ul data-role="listview" data-inset="true">
      <?php make_books(glob('*.ibooks'), 'ibooks'); ?>

    <div id="ipa" data-role="collapsible" data-collapsed="true" data-theme="a" data-content-theme="b">
     <h3>iPhone app (epub) ebooks</h3>
     <backquote>These books are no longer avalible in the Apps store, stopped working properly in iOS6</backquote>
     <ul data-role="listview" data-inset="true">
      <?php make_books(glob('*.ipa'), 'ipa'); ?>


For more information send a message to info at phpclasses dot org.