<?php
/*
* 项目: iOrange(橘子)
* 作者: 离家出走(yzxh24)
* Email: yzxh24@gmail.com
* 主页: www.iorange.cc
*/
/* vim: set ts=4 sw=4: */
class TopAction extends ForumAction
{
    public function run()
    {
        $sql = "SELECT * FROM `".BookForum::table()."` WHERE bookid NOT IN (13089,16212) ORDER BY (monthmcount + monthposts + monthdigests * 20 + monthadvance * 50) DESC, monthmcount DESC LIMIT 10";
	    $forums = $this->db()->setQueryString($sql)->find();
	    
	    $this->getController()->render('top', array(
	            'forums' => $forums,
	        )
	    );
    }
}