Пример #1
0
    //답글인 경우는 원본의 게시글 아이디(새글인 경우는 0)
    $postid = (int) $_GET['post_id'];
    $puid = (int) $_GET['poster_uid'];
    $pg_inx = (int) $_GET['pg_inx'];
    $t_idx = $_GET['t_idx'];
    //게시글 작성자 아이디(수정인 경우만 넘어옴)
    //수정인 경우는 자신의 글인지 체크
    if ($wType == 3) {
        $uid = (int) $_SESSION['uid'];
        //if ($uid == 0) throw new Exception('Invalid Session.');
        //if ($uid != $puid && $_SESSION[DBWork::adminKey] == 9001) throw new Exception('Invalid request');
    }
    //답글이나 수정인 경우는 원본의 내용을 얻어온다.
    //2 or 3
    if ($wType > 1) {
        $brdPost = $brdWork->requestPost2(1);
        //수정, 답글용으로 얻어온다.
        if ($brdPost == null) {
            throw new Exception('Board error.');
        }
    }
    $brdWork->destoryWork();
} catch (Exception $e) {
    $brdWork->destoryWork();
    echo $e->getMessage();
    exit;
}
//-----------------------------------------------
//	답글이나 수정인 경우는 원본의 내용을 셋팅한다.
//-----------------------------------------------
//답글