<?php
/*
* 项目: iOrange(橘子)
* 作者: 离家出走(yzxh24)
* Email: yzxh24@gmail.com
* 主页: www.iorange.cc
*/
/* vim: set ts=4 sw=4: */
class IndexAction extends BaseAction
{
    public function run()
    {
        $prop = $this->getController()->getProp('wa');
        
        $count = $this->db()->getValue('SELECT COUNT(*) FROM '.Wacomment::table());
        $comments = $this->db()->select()->from(Wacomment::table())->desc('id')->limit(5)->find();
        
        $this->getController()->render('index',array(
                'prop' => $prop,
                'count' => $count,
                'comments' => $comments,
            )
        );
    }
}