<?php
$title = $bookname . '最新章节-'.$bookname.'TXT下载-' . $author . '-' . $typename.'小说-'.setting('webname');
$keywords = $bookname.'VIP章节,'.$bookname.'最新章节,'.$bookname.'TXT下载';
$description = $bookname.'由'.setting('webname').'会员（'.$author.'）连载，该小说情节跌宕起伏、扣人心弦是一本难得的情节与文笔俱佳的好书，'.setting('webhost').'免费提供'.$bookname.'vip章节阅读和txt电子书免费下载。';
?>
<?php include_once tpl('header');?>
<!-- 导航条 -->
<div class="dh">
	当前位置：<a href="<?php echo url('index');?>" class="home">首页</a>-><a href="<?php echo url('booktype', array('tid'=>$typeid));?>"><?php echo $typename;?></a></div>
<!-- end -->
<div class="clear"></div>
<div class="brbr"></div>

<!-- 小说简介 -->
<div class="bookshow">
	<div class="book_left">
		<div class="book_img"><img src="<?php echo bookCover($bookid);?>" class="book_cover" alt="<?php echo $bookname;?>" /></div>
		<div class="book_nav">
			<ul>
				<li><a href="<?php echo url('chapter',array('bid'=>$bookid));?>">点击阅读</a></li>
				<li><a href="<?php echo url('system',array('s'=>'member','a'=>'favorite','bid'=>$bookid));?>">加入书架</a></li>
				<li><a href="<?php echo url('system',array('s'=>'member','a'=>'looklist','bid'=>$bookid));?>">接上次看</a></li>
				<li><a href="<?php echo url('system',array('s'=>'download','bid'=>$bookid));?>">TXT下载</a></li>
				<li><a href="<?php echo url('system',array('s'=>'download','bid'=>$bookid));?>">JAR下载</a></li>
			</ul>
		</div>
	</div>
	<div class="book_right">
		
		<div class="book_name"><h1>《<?php echo $bookname;?>》</h1></div>
		<div class="book_info">
			<h2>作者：<?php echo $author;?></h2>
			<h2>分类：<?php echo $typename;?></h2>
			<h2>状态：<?php echo $status ? '完成' : '连载';?></h2>
			<h2>最后更新：<?php echo $lastupdate;?></h2>
		</div>
		
		<div class="clear"></div>
		<div class="info">
			<?php echo str_replace("<br/><br/>", "<br/>", analyzeText($bookinfo));?>
		</div>
        <?php if ($keyWords):?><div>标签：<?php echo $keyWords;?></div><?php endif;?>
		<div>最新章节：<a href="<?php echo url('read',array('bid'=>$bookid,'cid'=>$book['wlastchapterid']));?>" id="lastchapter"><?php echo $book['wlastchaptername'];?></a></div>
	</div>
	
</div>
<!-- end -->

<div class="clear"></div>
<div class="brbr"></div>


<!-- 留言 -->
<div class="comment">
	<div class="comment-item">
		<div class="comment-title"><b><?php echo $bookname;?></b>最新更新章节 <?php echo ilink('更多>>', url('chapter',array('bid'=>$bookid)));?></div>
		<div id="newlist">
			<ul>
			<?php foreach ($newList as $new):?>
				<li><a href="<?php echo url('read',array('bid'=>$bookid,'cid'=>$new['chapterid']));?>"><?php echo $new['chaptername'];?></a></li>
			<?php endforeach;?>
			</ul>
		</div>
		<div class="clear"></div>
		<div class="brbr"></div>
		<div class="comment-title"><b><?php echo $bookname;?></b>热门书评</div>
		<?php if (!empty($posts)):?>
			<?php foreach ($posts as $post):?>
			<div class="comment-c">
			<div class="face"><img src="<?php echo getImageFile('image_64_64.gif');?>" /></div>
				<div class="comment-content"><?php echo $post['message'];?></div>
		    	<span>发表人：<?php echo filter_content(userName($post['uid']));?> 时间：<?php echo $post['createdate'];?></span>
	    	</div>
	    	<?php endforeach;?>
		<?php endif;?>
		<?php if ($iorange_id):?>
		<div class="comment-c" style="margin-top: 20px;">
			<textarea style="width: 507px; height: 135px;" rows="" cols="" name="content" id="content"></textarea>
			<br/>
			<input type="submit" value="发表" name="user_login" class="btn-submit" tabindex="4" style="margin-top:6px;">
		</div>
		<?php endif;?>
	</div>
	
	<div class="category">
	<div class="left">
		<div class="title">
			<h2 style="margin-left:8px;">分类推荐</h2>
		</div>
		<div class="commend-item">
			<ul>
				<?php foreach ($randBooks as $rand):?>
					<li><a href="<?php echo url('bookshow', array('bid'=>$rand['bookid']));?>"><?php echo $rand['bookname'];?></a></li>
				<?php endforeach;?>
			</ul>
		</div>
	</div>
			
		</div>
	</div>
</div>
<!-- Baidu Button BEGIN -->
<script type="text/javascript" id="bdshare_js" data="type=slide&amp;img=0&amp;uid=15713" ></script>
<script type="text/javascript" id="bdshell_js"></script>
<script type="text/javascript">
	document.getElementById("bdshell_js").src = "http://share.baidu.com/static/js/shell_v2.js?t=" + new Date().getHours();
</script>
<!-- Baidu Button END -->
<?php include_once tpl('footer');?>