<?php
if(!defined('InEmpireCMS'))
{
	exit();
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title><?=$pagetitle?> - <?=$public_r[sitename]?></title>
<link href="<?=$public_r[newsurl]?>skin/v3/t.css" rel="stylesheet" />
</head> 
<body>
<?php 
include(ECMS_PATH.'inpage/topnav.html');
include(ECMS_PATH.'inpage/head.html');
include(ECMS_PATH.'inpage/menu.html');
?>
<div class="w990">
  <div class="weizhi">
    <div class="wznav black">
      <h5>当前位置：<a href="<?=$public_r[newsurl]?>"><?=$public_r[sitename]?></a> > <?=$pagetitle?></h5>
    </div>
<?php 
include(ECMS_PATH.'inpage/search.html');
?>
    <div class="clear"></div>
  </div>
  <div class="fleft">
    <ul>
	  <li><a href="paihang.php" <?=ClssStyle($type,0,0)?>>总点击榜</a></li>
	  <li><a href="paihang.php?type=1" <?=ClssStyle($type,1,1)?>>总推荐榜</a></li>
	  <li><a href="paihang.php?type=2" <?=ClssStyle($type,2,2)?>>总下载榜</a></li>
	  <li><a href="paihang.php?type=3" <?=ClssStyle($type,3,1)?>>总评论榜</a></li>
	  <li><a href="paihang.php?type=4" <?=ClssStyle($type,4,2)?>>新书日点击榜</a></li>
	  <li><a href="paihang.php?type=5" <?=ClssStyle($type,5,1)?>>新书周点击榜</a></li>
	  <li><a href="paihang.php?type=6" <?=ClssStyle($type,6,2)?>>新书月点击榜</a></li>
	  <li><a href="paihang.php?type=7" <?=ClssStyle($type,7,1)?>>新书年点击榜</a></li>
	  <li><a href="../top/" class="se">今日阅读排行</a></li>
	</ul>
  </div>
  <div class="fright">
    <div class="cyhd">
		<h3><?=$pagetitle?></h3>
    </div>
	<div class="cycon">
	  <table cellspacing=0 cellpadding=0 border=0 width=100% class=ttop>
	  <tr>
	    <th width="50" class="first">排名</th>
		<th>书名</th>
		<th class="tc" width=30%>作者</th>
		<th class="last" width=20%><?=$typename?></th>		
	  </tr>
<?php

//显示
$sql=$empire->query($query);
$i=1;
  while($r=$empire->fetch($sql))
  {
	  $hdline='';
	  $bintro='';
	  $wn='';
	  $kse='hui';
	  $bi=$empire->fetch1("select id,classid,wid,checked from {$dbtbpre}ecms_bookname_index where id=$r[id] limit 1");
	  $bookname='<a href="'.$r[titleurl].'" title="'.$r[title].'" target="_blank">'.$r[title].'</a>';
	  if($bi[wid]){
		$wn='<a href="'.$public_r[newsurl].'writer/'.$bi[wid].'/" title="'.GetWname($bi[wid]).'作品集" target="_blank">'.GetWname($bi[wid]).'</a>';
	  }
	  if($r[titlepic]){
		  $fengm=$r[titlepic];
	  }else{
		  $fengm=$public_r[newsurl].'e/data/images/notimg.gif';
	  }
	  $ttt=$i++;	  
	  if($ttt<4){
		  $hdline=' class="hideline"';
		  $kse='red';
		  $bintro='
		  <tr class="item-tr">
		    <td colspan="4">
			  <div class="item-info clearfix">
				<a target="_blank" class="item-img" href="'.$r[titleurl].'"><img src="'.$fengm.'"></a>
				<p class="item-text"><a target="_blank" href="'.$r[titleurl].'">'.$r[smalltext].'</a></p>
            </div>
		  </td>
	    </tr>
		  ';
	  }
?>
      <tr<?=$hdline?>>
		<td class="first"><span class="shuzi2 <?=$kse?>"><?=$ttt?></span></td>
		<td class="keyword"><?=$bookname?></td>
		<td class="tc"><?=$wn?></td>
		<td class="last"><div class="hit"><?=$r[$ziduan]?></div></td>
      </tr>
	  <?=$bintro?>
<?
}
?>
      </table>
	</div>
  </div>
  <div class="clear"></div>

</div>

<?php 
include(ECMS_PATH.'inpage/foot.html');
?>
</body>
</html>