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

        try
        {
            $post = Posts::single()->getOne($pid);
        }
        catch (Exception $exce)
        {
            throw new iSystemException($exce->getMessage());
        }

        $thread = $this->getExistsThread($post['tid']);
        $allows = $this->getAllows($thread);

        $this->getController()->render('lite', array('thread'=>$thread, 'post'=>$post, 'allows' => $allows));
    }
}
