파일명 : bbsRead.jsp

-------------------------------------------------------

<%@ page contentType="text/html; charset=utf-8"%>
<%@ include file="./ssi.jsp" %>
<%
int bbsno = Integer.parseInt(request.getParameter("bbsno"));

// 데이터베이스에서 글번호에 해당하는 글을 SELECT
bbsDTO = bbsDAO.read(bbsno); 

String wname = bbsDTO.getWname();
String subject = bbsDTO.getSubject();
String content = bbsDTO.getContent();
String regdate = bbsDTO.getRegdate();
int viewcnt = bbsDTO.getCnt();
int grpno = bbsDTO.getGrpno();
int indent = bbsDTO.getIndent();
%>
<html>
<head>
<title>bbsRead.jsp</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<script language="javascript">

// 목록으로 이동
function goList(f){
    f.action="./bbsList.jsp";
    f.submit();   
}

// 글 수정
function goUpdate(f){
    f.action="./bbsUpdateForm.jsp";
    f.submit();
}

// 글 삭제
function goDelete(f){
    f.action="./bbsDeleteForm.jsp";
    f.submit();
}

// 답변
function goReply(f){
    f.action="./bbsReplyForm.jsp";
    f.submit();
}
</script>
</head>

<body>

<center>
** 글 상세보기 ** <br>
<table border=1>
<tr align=left>
 <td>작성자:</td>
    <td><%=wname%></td>
</tr>
<tr align=left>
 <td>제목:</td>
    <td><%=subject%></td>
</tr>
<tr align=left>
 <td>내용:</td>
    <td><textarea name="content" rows="5" cols="30"><%=content%></textarea></td>
</tr>
<tr align=left>
 <td>조회수:</td>
    <td><%=viewcnt%></td>
</tr>
<tr align=left>
 <td>작성일:</td>
    <td><%=regdate%></td>
</tr>
</table>
<br>

<!----- 글 수정, 글 삭제, 답변 관련 폼 ----->   
<form name="bbsfrm" id="bbsfrm" method="post">
<input type="button" name="btnList" value="목록"
           onclick="goList(this.form)">
<input type="button" name="btnUpdate" value="수정" 
           onclick="goUpdate(this.form)">
<input type="button" name="btnDelete" value="삭제"
           onclick="goDelete(this.form)">
<input type="button" name="btnReply" value="답변"
           onclick="goReply(this.form)"> 
<input type="hidden" name="bbsno" value="<%=bbsno%>">
</form>

</center>
</body>
</html>

 

-------------------------------------------------------

 

+ Recent posts