<?php
/*
* 项目: iOrange(橘子)
* 作者: 离家出走(yzxh24)
* Email: yzxh24@gmail.com
* 主页: www.iorange.cc
*/
/* vim: set ts=4 sw=4: */
class ThreadWidget extends Widget
{
    public $fid;
    
    public function run()
    {
        $permissions = Members::single()->getPermissions($this->getOwner()->uid());
        $isAttPost = $permissions['isattpost'];
        $isVotePost = $permissions['isvotepost'];
        $isSellPost = $permissions['issellpost'];
        $sellPrice = $permissions['sellprice'];
        $isRewardPost = $permissions['isrewardpost'];
        $rewardPrice = $permissions['rewardprice'];

        $this->render('thread', array(
                'fid' => $this->fid,
                'isAttPost' => $isAttPost,
                'isVotePost' => $isVotePost,
                'isSellPost' => $isSellPost,
                'sellPrice' => $sellPrice,
                'isRewardPost' => $isRewardPost,
                'rewardPrice' => $rewardPrice,
            )
        );
    }
}