<?php
/*
* 项目: iOrange(橘子)
* 作者: 离家出走(yzxh24)
* Email: yzxh24@gmail.com
* 主页: www.iorange.cc
*/
/* vim: set ts=4 sw=4: */
class IndexAction extends DownloadAction
{
    public function run()
    {
        $bookId = S::gp('bid', 'G', 2);
        $type = S::gp('type', 'G');

        $sql = "SELECT bookid,bookname,bookinfo FROM ".Book::table()." WHERE `bookid` = '{$bookId}'";
        $book = $this->db()->setQueryString($sql)->find(true);

        $this->getController()->render('index', array('type'=>$type,'book'=>$book));
    }
}
