<?php
#
# read.php (c) 2006 Michael Thompson lMaker@michaelthompson.org
# for the latest info visit http://michaelthompson.org/doc/
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#
?>
<head>
<title>AJAX Book Reader</title>
<script language="javascript" src="/myip.php"></script>
<script src="http://www.google-analytics.com/urchin.js"
type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-248316-1";
urchinTracker();
</script>  
</head>
<body style="
font-family: Verdana;
">
<style>
li.liChap {
  font-size: 8pt;
  padding-top: 4px;
}
a:link { color: #0000ff; text-decoration: none; }
a:visited { color: #0000ff; text-decoration: none; }
a:active { color: #ff0000; text-decoration: none; }
a:hover { background-color: #ffffcc; color: #ff0000; text-decoration: none; }
</style>
<div style="
  font-size: 9pt;
  padding-top: 3px;
  padding-bottom: 3px;
  background-color: #eeeeee;
">
<table width="100%"><tr><td align=left>
<a href="/"><img align=left border=0 src="/images/btnHome.png"></a>
[ <a href="./">Book List</a> ]
</td><td align=right>
<div id=status><!-- status --></div>
</td></tr></table>
</div>
<table width="100%"><tr>
<td align=left valign=top>
<div id=chaps
style="
  background-color: #eeeeee;
">Chapters</div>
</td>
<td width="100%" valign=top>
<div style="
  color: #999999;
  background-color: #eeeeee;
  text-align: center;
  font-size: 14pt;
  font-weight: bold;
" id=title>Title</div>
<table width="100%" style="
  padding: 4px;
  background-color: #fffff0;
  border: inset 2px #000000;
"><tr><td><div id=navbar>navbar</div>
<center><table><tr><td><div id=page>page</div></td></tr></table></center>
</td></tr></table>
<div style="
  text-align: center;
  font-style: italic;
  font-size: 10pt;
  color: #666666;
  background-color: #eeeeee;
  padding-bottom: 8px;
" id=author>Author</div>
</td>
<td valign=top width=165>
<?php @include("ads.inc"); ?>
</td>
</tr></table>
<div id=the_url><!-- here --></div>
<script src="./ajax-reader.js"></script>
<?php
$bookmark 
$HTTP_COOKIE_VARS["bookMark-$book"];
if( 
strlen($bookmark) ) 
$ar explode("|",$bookmark);
  
$chapter $ar[0];
  
$page $ar[1];
}
if( !isset(
$chapter) ) $chapter=0;
if( !isset(
$page) ) $page=0;
print <<<EPR
<script>
fillPage('./pt.php','$book','$chapter','$page','chaps');
</script>
EPR;
?>