<?php
/*
* 项目: iOrange(橘子)
* 作者: 离家出走(yzxh24)
* Email: yzxh24@gmail.com
* 主页: www.iorange.cc
*/
/* vim: set ts=4 sw=4: */
class DeleteAction extends ForumAction
{
    public function run()
    {
        $this->isManager();
        
        $tid = S::gp('tid','G',2);
	    $this->db()->delete(BookStick::table())->where(array('id'=>$tid))->q();
	    updateForumStick($this->id());

	    $message[] = '置顶贴删除成功';
	    $message[] = '返回'.ilink('管理',url('system',array('s'=>'forum','c'=>'manage','id'=>$this->id()))).'.'.ilink('书会',url('system',array('s'=>'forum','id'=>$this->id())));
        $this->showMessage($message);
    }
}