{dede:include filename="head.htm"/}

## 排行榜

Ranking
排行榜时时更新，为书友们提供最新的小说排行信息！

### 全网小说点击榜

- 总
- 月
- 周

{dede:php} global $dsql; $n=1; $s=""; $query = "SELECT a.typeimg,a.typename,a.typedir,a.bookclick,a.booksize,a.tuijian,a.zuozhe,b.typedir as zuozhedir,c.typename as retypename,c.typedir as retypedir FROM dede_arctype a left join dede_arctype b on(b.typename=a.zuozhe and b.reid=45) left join dede_arctype c on(c.id=a.reid) WHERE a.reid not in(0,45) order by bookclick desc limit 0,10"; $dsql->SetQuery($query); $dsql->Execute(); while($row=$dsql->GetArray()){ if($n==1) { $s.='
- '; } else { $s.='
- '; } $s.='
  '.$row['bookclick'].''.$row['typename'].'
    类型：['.str_replace("·","",$row['retypename']).']

    作者：'.$row["zuozhe"].'

    字数：'.$row["booksize"].'

    总点击：'.$row["bookclick"].'

    总推荐：'.$row["tuijian"].'

    ['.$row['typename'].'txt下载]

'; $n++; } $s.='

查看更多……

'; $n=1; $query = "SELECT a.typeimg,a.typename,a.typedir,a.bookclickm,a.tuijianm,a.booksize,a.zuozhe,b.typedir as zuozhedir,c.typename as retypename,c.typedir as retypedir FROM dede_arctype a left join dede_arctype b on(b.typename=a.zuozhe and b.reid=45) left join dede_arctype c on(c.id=a.reid) WHERE a.reid not in(0,45) order by bookclickm desc limit 0,10"; $dsql->SetQuery($query); $dsql->Execute(); while($row=$dsql->GetArray()){ if($n==1) { $s.='
- '; } else { $s.='
- '; } $s.='
  '.$row['bookclickm'].''.$row['typename'].'
    类型：['.str_replace("·","",$row['retypename']).']

    作者：'.$row["zuozhe"].'

    字数：'.$row["booksize"].'

    月点击：'.$row["bookclickm"].'

    月推荐：'.$row["tuijianm"].'

    ['.$row['typename'].'txt下载]

'; $n++; } $s.='

查看更多……

'; $n=1; $query = "SELECT a.typeimg,a.typename,a.typedir,a.bookclickw,a.tuijianw,a.booksize,a.zuozhe,b.typedir as zuozhedir,c.typename as retypename,c.typedir as retypedir FROM dede_arctype a left join dede_arctype b on(b.typename=a.zuozhe and b.reid=45) left join dede_arctype c on(c.id=a.reid) WHERE a.reid not in(0,45) order by bookclickw desc limit 0,10"; $dsql->SetQuery($query); $dsql->Execute(); while($row=$dsql->GetArray()){ if($n==1) { $s.='
- '; } else { $s.='
- '; } $s.='
  '.$row['bookclickw'].''.$row['typename'].'
    类型：['.str_replace("·","",$row['retypename']).']

    作者：'.$row["zuozhe"].'

    字数：'.$row["booksize"].'

    周点击：'.$row["bookclickw"].'

    周推荐：'.$row["tuijianw"].'

    ['.$row['typename'].'txt下载]

'; $n++; } $s.='

查看更多……

### 全网小说推荐榜

- 总
- 月
- 周

'; $n=1; $query = "SELECT a.typeimg,a.typename,a.typedir,a.bookclick,a.tuijian,a.booksize,a.zuozhe,b.typedir as zuozhedir,c.typename as retypename,c.typedir as retypedir FROM dede_arctype a left join dede_arctype b on(b.typename=a.zuozhe and b.reid=45) left join dede_arctype c on(c.id=a.reid) WHERE a.reid not in(0,45) order by tuijian desc limit 0,10"; $dsql->SetQuery($query); $dsql->Execute(); while($row=$dsql->GetArray()){ if($n==1) { $s.='
- '; } else { $s.='
- '; } $s.='
  '.$row['tuijian'].''.$row['typename'].'
    类型：['.str_replace("·","",$row['retypename']).']

    作者：'.$row["zuozhe"].'

    字数：'.$row["booksize"].'

    总点击：'.$row["bookclick"].'

    总推荐：'.$row["tuijian"].'

    ['.$row['typename'].'txt下载]

'; $n++; } $s.='

查看更多……

'; $n=1; $query = "SELECT a.typeimg,a.typename,a.typedir,a.bookclickm,a.tuijianm,a.booksize,a.zuozhe,b.typedir as zuozhedir,c.typename as retypename,c.typedir as retypedir FROM dede_arctype a left join dede_arctype b on(b.typename=a.zuozhe and b.reid=45) left join dede_arctype c on(c.id=a.reid) WHERE a.reid not in(0,45) order by tuijianm desc limit 0,10"; $dsql->SetQuery($query); $dsql->Execute(); while($row=$dsql->GetArray()){ if($n==1) { $s.='
- '; } else { $s.='
- '; } $s.='
  '.$row['tuijianm'].''.$row['typename'].'
    类型：['.str_replace("·","",$row['retypename']).']

    作者：'.$row["zuozhe"].'

    字数：'.$row["booksize"].'

    月点击：'.$row["bookclickm"].'

    月推荐：'.$row["tuijianm"].'

    ['.$row['typename'].'txt下载]

'; $n++; } $s.='

查看更多……

'; $n=1; $query = "SELECT a.typeimg,a.typename,a.typedir,a.bookclickw,a.tuijianw,a.booksize,a.zuozhe,b.typedir as zuozhedir,c.typename as retypename,c.typedir as retypedir FROM dede_arctype a left join dede_arctype b on(b.typename=a.zuozhe and b.reid=45) left join dede_arctype c on(c.id=a.reid) WHERE a.reid not in(0,45) order by tuijianw desc limit 0,10"; $dsql->SetQuery($query); $dsql->Execute(); while($row=$dsql->GetArray()){ if($n==1) { $s.='
- '; } else { $s.='
- '; } $s.='
  '.$row['tuijianw'].''.$row['typename'].'
    类型：['.str_replace("·","",$row['retypename']).']

    作者：'.$row["zuozhe"].'

    字数：'.$row["booksize"].'

    周点击：'.$row["bookclickw"].'

    周推荐：'.$row["tuijianw"].'

    ['.$row['typename'].'txt下载]

'; $n++; } $s.='

查看更多……

### 全网小说字数榜

- 总

'; $n=1; $query = "SELECT a.typeimg,a.typename,a.typedir,a.bookclick,a.tuijian,a.booksize,a.zuozhe,b.typedir as zuozhedir,c.typename as retypename,c.typedir as retypedir FROM dede_arctype a left join dede_arctype b on(b.typename=a.zuozhe and b.reid=45) left join dede_arctype c on(c.id=a.reid) WHERE a.reid not in(0,45) order by booksize desc limit 0,10"; $dsql->SetQuery($query); $dsql->Execute(); while($row=$dsql->GetArray()){ if($n==1) { $s.='
- '; } else { $s.='
- '; } $s.='
  '.$row['booksize'].''.$row['typename'].'
    类型：['.str_replace("·","",$row['retypename']).']

    作者：'.$row["zuozhe"].'

    字数：'.$row["booksize"].'

    点击：'.$row["bookclick"].'

    推荐：'.$row["tuijian"].'

    ['.$row['typename'].'txt下载]

'; $n++; } $s.='

查看更多……
'; $query = "SELECT * FROM dede_arctype WHERE reid=0 and id<>45 order by sortrank limit 0,6"; $dsql->SetQuery($query); $dsql->Execute(); $a=4; while($row=$dsql->GetArray()){ $reid[$a]=$row['id']; $retypename[$a]=$row['typename']; $a++; } for($m=4;$m<$a;$m++) { $s.='

### '.$retypename[$m].'小说排行榜

- 总
- 月
- 周

'; $n=1; $query = "SELECT a.typeimg,a.typename,a.typedir,a.bookclick,a.tuijian,a.booksize,a.zuozhe,b.typedir as zuozhedir,c.typename as retypename,c.typedir as retypedir FROM dede_arctype a left join dede_arctype b on(b.typename=a.zuozhe and b.reid=45) left join dede_arctype c on(c.id=a.reid) WHERE a.reid=".$reid[$m]." order by a.tuijian+a.bookclick desc limit 0,10"; $dsql->SetQuery($query); $dsql->Execute(); while($row=$dsql->GetArray()){ $paixu=$row["bookclick"]+$row["tuijian"]; if($n==1) { $s.='
- '; } else { $s.='
- '; } $s.='
  '.$paixu.''.$row['typename'].'
    类型：['.str_replace("·","",$row['retypename']).']

    作者：'.$row["zuozhe"].'

    字数：'.$row["booksize"].'

    总点击：'.$row["bookclick"].'

    总推荐：'.$row["tuijian"].'

    ['.$row['typename'].'txt下载]

'; $n++; } $s.='

查看更多……

'; $n=1; $query = "SELECT a.typeimg,a.typename,a.typedir,a.bookclickm,a.tuijianm,a.booksize,a.zuozhe,b.typedir as zuozhedir,c.typename as retypename,c.typedir as retypedir FROM dede_arctype a left join dede_arctype b on(b.typename=a.zuozhe and b.reid=45) left join dede_arctype c on(c.id=a.reid) WHERE a.reid=".$reid[$m]." order by a.tuijianm+a.bookclickm desc limit 0,10"; $dsql->SetQuery($query); $dsql->Execute(); while($row=$dsql->GetArray()){ $paixu=$row["bookclickm"]+$row["tuijianm"]; if($n==1) { $s.='
- '; } else { $s.='
- '; } $s.='
  '.$paixu.''.$row['typename'].'
    类型：['.str_replace("·","",$row['retypename']).']

    作者：'.$row["zuozhe"].'

    字数：'.$row["booksize"].'

    月点击：'.$row["bookclickm"].'

    月推荐：'.$row["tuijianm"].'

    ['.$row['typename'].'txt下载]

'; $n++; } $s.='

查看更多……

'; $n=1; $query = "SELECT a.typeimg,a.typename,a.typedir,a.bookclickw,a.tuijianw,a.booksize,a.zuozhe,b.typedir as zuozhedir,c.typename as retypename,c.typedir as retypedir FROM dede_arctype a left join dede_arctype b on(b.typename=a.zuozhe and b.reid=45) left join dede_arctype c on(c.id=a.reid) WHERE a.reid=".$reid[$m]." order by a.tuijianw+a.bookclickw desc limit 0,10"; $dsql->SetQuery($query); $dsql->Execute(); while($row=$dsql->GetArray()){ $paixu=$row["bookclickw"]+$row["tuijianw"]; if($n==1) { $s.='
- '; } else { $s.='
- '; } $s.='
  '.$paixu.''.$row['typename'].'
    类型：['.str_replace("·","",$row['retypename']).']

    作者：'.$row["zuozhe"].'

    字数：'.$row["booksize"].'

    周点击：'.$row["bookclickw"].'

    周推荐：'.$row["tuijianw"].'

    ['.$row['typename'].'txt下载]

'; $n++; } $s.='

查看更多……
'; } echo $s; {/dede:php}

## 小说作家推荐

{dede:php} global $dsql ; $dsql->safeCheck = false; $n=1; $s=""; $query = "SELECT COUNT(a.id) AS ano,a.zuozhe AS zuozhe,b.typeimg,b.description,b.typedir,b.tuijian,SUM(a.bookclick) AS bookclick,SUM(a.booksize) AS booksize,SUM(a.tuijian) AS booktuijian FROM dede_arctype b JOIN (SELECT ROUND(RAND() * ((SELECT MAX(id) FROM `dede_arctype`)-(SELECT MIN(id) FROM `dede_arctype`))+(SELECT MIN(id) FROM `dede_arctype`)) AS id) AS t2 LEFT JOIN dede_arctype a ON(a.zuozhe=b.typename) WHERE b.reid=45 AND b.id>t2.id GROUP BY b.typename order by booktuijian desc limit 10"; $dsql->SetQuery($query); $dsql->Execute(); while($row=$dsql->GetArray()){ if($n==1) { $zuozhe=$row['zuozhe']; $newbook = $dsql->GetOne("SELECT typename,typedir FROM dede_arctype where zuozhe='$zuozhe' order by overdate"); $newbookname = $newbook['typename']; $newbooktypeidr = $newbook['typedir']; $s.= "
- ".$row['zuozhe']."".$row['ano']."/".$row['booksize']."
- 作品数:".$row['ano']."
  总字数:".$row['booksize']."
  总点击:".$row['bookclick']."
  作家推荐:".$row['tuijian']."
  作品推荐:".$row['booktuijian']."
  新书:".$newbookname."
"; } else { $s.= "
- ".$row['zuozhe']."".$row['ano']."/".$row['booksize']."
"; } $n++; } $s.='

## 热门新书推荐

'; $n=1; $query = "SELECT a.typeimg,a.typename,a.description,a.typedir,a.bookclick,a.tuijian,a.zuozhe,b.typedir as zuozhedir,c.typename as retypename,c.typedir as retypedir FROM dede_arctype a left join dede_arctype b on(b.typename=a.zuozhe and b.reid=45) left join dede_arctype c on(c.id=a.reid) WHERE a.reid<>45 and a.reid<>0 and a.booksize<300000 order by a.bookclick+a.tuijian desc limit 0,10"; $dsql->SetQuery($query); $dsql->Execute(); while($row=$dsql->GetArray()){ $bt=$row['bookclick']+$row['tuijian']; if($n==1) { $s.="
- ".$row['typename']."".$bt."
- 作者:".$row['zuozhe']."
  类型:".$row['retypename']."
  点/推:".$row['bookclick']."/".$row['tuijian']."

  简介：".cn_substr(html2text($row['description']),50)."……

"; } else { $s.="
- ".$row['typename']."".$bt."
"; } $n++; } $s.='

## 热门完本推荐

'; $n=1; $query = "SELECT a.typeimg,a.typename,a.description,a.typedir,a.bookclick,a.tuijian,a.zuozhe,b.typedir as zuozhedir,c.typename as retypename,c.typedir as retypedir FROM dede_arctype a left join dede_arctype b on(b.typename=a.zuozhe and b.reid=45) left join dede_arctype c on(c.id=a.reid) WHERE a.reid not in(0,45) and a.overdate<>'0' order by a.bookclick+a.tuijian desc limit 0,10"; $dsql->SetQuery($query); $dsql->Execute(); while($row=$dsql->GetArray()){ $bt=$row['bookclick']+$row['tuijian']; if($n==1) { $s.="
- ".$row['typename']."".$bt."
- 作者:".$row['zuozhe']."
  类型:".$row['retypename']."
  点/推:".$row['bookclick']."/".$row['tuijian']."

  简介：".cn_substr(html2text($row['description']),50)."……

"; } else { $s.="
- ".$row['typename']."".$bt."
"; } $n++; } echo $s; {/dede:php}

{dede:include filename="footer.htm"/}
{dede:myad name='tongji'/}