<?php
/**
 * Theme Name: 仿hao123小说主题
 * Theme URI: http://www.duguai.com/
 * Description:
 * Author: 骑驴觅驴
 * Version: 1.0
 */
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7">
<title><?php option_info( 'site.name'); ?></title>
<meta name="keywords" content="<?php option_info('site.keyowrds'); ?>"/>
<meta name="description" content="<?php option_info('site.intro'); ?>"/>
<link href="<?php stylesheet_url('css/common.css'); ?>" rel="stylesheet">
<link href="<?php stylesheet_url('css/index.css'); ?>" rel="stylesheet">
<link href="<?php stylesheet_url('css/indexbox.css'); ?>" rel="stylesheet">
<base target="_blank">
</head>
<body>
<?php load_template('header.php'); ?>
<div class="class_wraptop">
	<p><strong>猜你喜欢的小说</strong><?php book_may_like_index(); ?></p>
</div>
<div class="indexboxone clearfix">
	<div class="indexboxonel">
		<div id="consone">
		<?php $categories = (array) get_categories(); foreach ($categories as $key => $category): ?>
		<?php echo get_box_one($category->category_id, $key); ?>
		<?php endforeach; ?>
		</div>
		<div class="indexonelr" id="tabsone">
			<ul>
			<?php foreach ($categories as $key => $category): ?>
				<li<?php echo $key == 0 ? ' class="cur"' : ''; ?>><?php category_name($category->category_id); ?></li>
			<?php endforeach; ?>
			</ul>
		</div>
	</div>
	<?php //get_box_one(); ?>
	<div class="indexboxoner">
		<div class="rtit" id="tabstwo">
			<h3>编辑推荐</h3>
			<ul>
				<li class="cur">日</li>
				<li>周</li>
				<li>月</li>
			</ul>
		</div>
		<div id="constwo">
			<div class="rcenter">
			<?php $books = book_get_recommend(0, 'day'); ?>
			<?php if (isset($books[0])) : $book = $books[0]; ?>
				<div class="figure clearfix">
					<a href="<?php book_link(); ?>"><img src="<?php book_cover(); ?>"></a>
					<div class="figurer">
						<h4><a href="<?php book_link(); ?>"><?php book_name(); ?></a></h4>
						<span><?php book_excerpt(0, true, 22); ?></span><a href="<?php book_link(); ?>" class="green">阅读&gt;&gt;</a>
					</div>
				</div>
				<ul class="clearfix">
				<?php $_books = array_slice($books, 1, 10); ?>
				<?php foreach ($_books as $book) : ?>
					<li><a href="<?php category_link(get_book_category_id()); ?>" class="i1">[<?php category_name(get_book_category_id()); ?>]</a><a href="<?php book_link(); ?>" class="i2"><?php book_name(); ?></a></li>
				<?php endforeach; ?>
				</ul>
			<?php endif; ?>
			</div>
			<div class="rcenter hidden">
			<?php $books = book_get_recommend(0, 'week'); ?>
			<?php if (isset($books[0])) : $book = $books[0]; ?>
				<div class="figure clearfix">
					<a href="<?php book_link(); ?>"><img src="<?php book_cover(); ?>"></a>
					<div class="figurer">
						<h4><a href="<?php book_link(); ?>"><?php book_name(); ?></a></h4>
						<span><?php book_excerpt(0, true, 22); ?></span><a href="<?php book_link(); ?>" class="green">阅读&gt;&gt;</a>
					</div>
				</div>
				<ul class="clearfix">
				<?php $_books = array_slice($books, 1, 10); ?>
				<?php foreach ($_books as $book) : ?>
					<li><a href="<?php category_link(get_book_category_id()); ?>" class="i1">[<?php category_name(get_book_category_id()); ?>]</a><a href="<?php book_link(); ?>" class="i2"><?php book_name(); ?></a></li>
				<?php endforeach; ?>
				</ul>
			<?php endif; ?>
			</div>
			<div class="rcenter hidden">
			<?php $books = book_get_recommend(0, 'month'); ?>
			<?php if (isset($books[0])) : $book = $books[0]; ?>
				<div class="figure clearfix">
					<a href="<?php book_link(); ?>"><img src="<?php book_cover(); ?>"></a>
					<div class="figurer">
						<h4><a href="<?php book_link(); ?>"><?php book_name(); ?></a></h4>
						<span><?php book_excerpt(0, true, 22); ?></span><a href="<?php book_link(); ?>" class="green">阅读&gt;&gt;</a>
					</div>
				</div>
				<ul class="clearfix">
				<?php $_books = array_slice($books, 1, 10); ?>
				<?php foreach ($_books as $book) : ?>
					<li><a href="<?php category_link(get_book_category_id()); ?>" class="i1">[<?php category_name(get_book_category_id()); ?>]</a><a href="<?php book_link(); ?>" class="i2"><?php book_name(); ?></a></li>
				<?php endforeach; ?>
				</ul>
			<?php endif; ?>
			</div>
		</div>
	</div>
</div>
<div id="recbigbox">
</div>
<div class="c_tline"></div>
<div class="clearfix class_wrap" style="text-align:center;">
	<img src="<?php active_theme_url(); ?>images/950x90.gif">
</div>
<div class="c_bline"></div>
<div class="wrapone">
	<div class="tabstit" id="tabszxsb">
		<ul>
			<li class="cur">今日热门</li>
			<li>本周热门</li>
			<li>本月热门</li>
			<li>最新入库</li>
			<li class="last">最新全本</li>
		</ul>
	</div>
	<div id="conszxsb">
		<?php $books = book_get_hot(0, 'day'); get_wrap_one($books, ''); // 今日热门 ?>
		<?php $books = book_get_hot(0, 'week'); get_wrap_one($books); // 本周热门 ?>
		<?php $books = book_get_hot(0, 'month'); get_wrap_one($books); // 本月热门 ?>
		<?php $books = get_books('number=12&from_cache=true'); get_wrap_one($books); // 最新入库 ?>
		<?php $books = get_books('number=12&finished=yes&from_cache=true'); get_wrap_one($books); // 最新完本 ?>
	</div>
</div>
<?php //$categories = (array) get_categories(); $categories = array_slice($categories, 0, 6, false); foreach ($categories as $key => $category): ?>
<?php //index_category_list($category->category_id, $key); ?>
<?php //endforeach; ?>
<div class="clearfix wrapone bitems">
	<div id="tabsthree" class="tabstit">
		<ul><li class="cur">最新更新</li></ul>
	</div>
	<div class="recently_list" id="consthree">
		<ul>
		<?php get_books('number=20&from_cache=true&orderby=last_chapter_created'); if (have_books()) : ?>
		<?php $index = 0; while (have_books()) : the_book(); ?>
			<li>
				<span class="recnums_r"><?php echo zeroise(++$index, 2); ?></span>
				<span class="r_spanone"><a href="<?php book_link(); ?>"><?php category_name(get_book_category_id()); ?> | <?php book_name(); ?></a></span>
				<span class="r_spantwo"><i>更新至</i>&nbsp;&nbsp;<a href="<?php book_latest_chapter_link(); ?>"><?php book_latest_chapter_title(); ?></a></span>
				<span class="r_spanthree"><?php echo date('Y/m/d G:i:s', get_book_latest_chapter_created()); ?></span>
				<span class="r_spanfour"><a href="<?php book_chapters_link(); ?>">章节目录</a></span>
				<span class="r_spanfive"><a href="<?php book_first_chapter_link(); ?>">开始阅读&gt;&gt;</a></span>
			</li>
		<?php endwhile; endif; ?>
		</ul>
	</div>
</div>
<div class="link">
	<div class="linktop clearfix">
		<h3>精品小说网站</h3>
	</div>
	<div class="linkbody">
	<?php $links = get_links(); foreach ($links as $key => $link) : ?>
		<a href="<?php link_url(); ?>" targdt=_blank><?php link_name(); ?></a><?php echo isset($links[++$key]) ? '|' : ''; ?>
	<?php endforeach; ?>
	</div>
</div>
<div class="blinebgs"></div>
<?php load_template('footer.php'); ?>
<script type="text/javascript" src="<?php active_theme_url(); ?>jquery-1.4.3.min.js"></script>
<script type="text/javascript" src="<?php active_theme_url(); ?>jquery.boxy.js"></script>
<script type="text/javascript" src="<?php active_theme_url(); ?>jquery.autocomplete.js"></script>
<script type="text/javascript" src="<?php active_theme_url(); ?>common.js"></script>
<script type="text/javascript" src="<?php active_theme_url(); ?>index.js"></script>
</body>
</html>