Location: PHPKode > projects > PHP-Comics > php-comics/book.php
<?php
	include_once('inc/inc.php');
?>
<html>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="-1">
<link rel="stylesheet" type="text/css" href="css/main.css" />
<link rel="stylesheet" type="text/css" href="css/book.css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/book.js"></script>
<title>PHP-Comics : Comic : <?=str_replace(array(".cbr",".cbz",".rar",".zip"),"",$_GET['book'])?></title>
</head><body>
<div id="loading">
	<img src="img/ajax-loader.gif" />
</div>
<div id="comicbookpage">

</div>
<div id="prev_page"><a href="javascript:prev_page();">&lt; &lt;Prev Page</a></div>
<div id="next_page"><a href="javascript:next_page();">Next Page &gt; &gt;</a></div>
<div id="comic_options">
<?php
if ($_GET['path'] != '' && $_GET['book'] != '') {
	$path = stripslashes($_GET['path']);
	$book = stripslashes($_GET['book']);
	$filename = ("$path/$book");
	$filepath = '';
	$tempbook = addslashes($book);
	$temppath = addslashes($path);
	$bookmark = DB::QueryResult("SELECT Page FROM Bookmark bm, Book b, Folder f,Users U WHERE bm.Book = b.ID AND U.ID = $_SESSION[UID] AND bm.UID = U.ID AND b.Folder = f.ID AND b.Name = '$tempbook' AND f.Path = '$temppath'",'Page');
} else {
	die("Error: no book selected!");
}
$list = img::pagelist($filename);

echo "<select name='page' id='pageinfo' onChange='get_page();'>";
if ((preg_match('/cbr$/i',$filename)) || (preg_match('/rar$/i',$filename)))
{
	foreach ($list as $file)
	{
			$i = rawurlencode($file);
			echo "<option class='pagename' ".($bookmark == $i ? "selected='selected'" : '')." value='".$i ."'>".$file."</option>";
	}
}
elseif ((preg_match('/cbz$/i',$filename))||(preg_match('/zip$/i',$filename)))
{

	foreach($list as $key=>$value)
	{
			echo "<option class='pagename' ".($bookmark == $value ? "selected='selected'" : '')." value='". $value."'>".$key."</option>";
	}
}
	print '</select>';
	print '<input type="hidden" id="comic" name="comic" value="'.rawurlencode($_GET['book']).'"/>';
	print '<input type="hidden" id="path" name="path" value= "'.rawurlencode($_GET['path']).'"/>';
	print '<input type="hidden" id="windowsize" name="windowsize" value="1024" />'
?>
</div>
<div id='clearfooter'></div>
<div id='footer'>
<a href="index.php?path=<?=rawurlencode(preg_replace("#/[^/]*$#",'',$filename)) ?>" target="_top">Return to Index</a>
</div>
</body>
</html>
Return current item: PHP-Comics