AdminAction::editPost PHP Méthode

editPost() public méthode

后台编辑帖子
public editPost ( )
    public function editPost()
    {
        $this->assign('pageTitle', '编辑帖子');
        // 初始化微吧列表管理菜单
        $this->pageTab[] = array('title' => '微吧列表', 'tabHash' => 'index', 'url' => U('weiba/Admin/index'));
        //$this->pageTab[] = array('title'=>'添加微吧','tabHash'=>'addWeiba','url'=>U('weiba/Admin/addWeiba'));
        $this->pageTab[] = array('title' => '微吧分类', 'tabHash' => 'weibaCate', 'url' => U('weiba/Admin/weibaCate'));
        $this->pageTab[] = array('title' => '帖子列表', 'tabHash' => 'postList', 'url' => U('weiba/Admin/postList'));
        $this->pageTab[] = array('title' => '编辑帖子', 'tabHash' => 'editPost', 'url' => U('weiba/Admin/editPost', array('post_id' => $_GET['post_id'])));
        $this->pageTab[] = array('title' => '帖子回收站', 'tabHash' => 'postRecycle', 'url' => U('weiba/Admin/postRecycle'));
        // 列表key值 DOACTION表示操作
        $this->pageKeyList = array('post_id', 'title', 'content', 'recommend', 'digest', 'top');
        $this->opt['recommend'] = array('1' => L('PUBLIC_SYSTEMD_TRUE'), '0' => L('PUBLIC_SYSTEMD_FALSE'));
        $this->opt['digest'] = array('1' => L('PUBLIC_SYSTEMD_TRUE'), '0' => L('PUBLIC_SYSTEMD_FALSE'));
        $this->opt['top'] = array('0' => L('PUBLIC_SYSTEMD_FALSE'), '1' => '吧内置顶', '2' => '全局置顶');
        $post_id = intval($_GET['post_id']);
        $data = D('weiba_post')->where('post_id=' . $post_id)->find();
        // 表单URL设置
        $this->savePostUrl = U('weiba/Admin/doEditPost');
        $this->notEmpty = array('title', 'content');
        $this->onsubmit = 'admin.checkEditPost(this)';
        $this->displayConfig($data);
    }