<?php
/*
* 项目: iOrange(橘子)
* 作者: 离家出走(yzxh24)
* Email: yzxh24@gmail.com
* 主页: www.iorange.cc
*/
/* vim: set ts=4 sw=4: */
define('IN_IORANGE', true);
require_once 'include/init.php';
$sql = "SELECT B.`bookid`,B.`bookname`,B.`typeid`, B.`status`, T.`typename`
 		 FROM `".Book::table()."` AS B,`".Types::table()."` AS T
 		 WHERE B.typeid=T.typeid 
		 AND B.`view` = 1
 		 ORDER BY B.`bookid` DESC 
 		 LIMIT 20";
$result = $db->query($sql);
while ($row = $db->getArr($result))
{
    $status = $row['status'] == '0' ? '连载' : '完成';
    $newbooks[] = array("bookid" => $row['bookid'] , "bookname" => $row['bookname'] , "status" => $status , "typeid" => $row['typeid'] , "typename" => $row['typename']);
}

include_once tpl('index6');
