1 |
<%@ include file="header.jsp" %> |
---|
2 |
<%@ page contentType="text/html; charset=euc-kr" %> |
---|
3 |
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> |
---|
4 |
|
---|
5 |
<script language="javascript"> |
---|
6 |
function saveMemo() { |
---|
7 |
if (document.memoForm.content.value == '') { |
---|
8 |
alert('메모 내용을 입력해 주세요'); |
---|
9 |
document.memoForm.content.focus(); |
---|
10 |
return; |
---|
11 |
} |
---|
12 |
document.memoForm.action = '<c:url value="/memo/insertMemo.do"/>'; |
---|
13 |
document.memoForm.submit(); |
---|
14 |
} |
---|
15 |
function deleteMemo(memoId) { |
---|
16 |
document.memoForm.memoId.value = memoId; |
---|
17 |
document.memoForm.action = '<c:url value="/memo/deleteMemo.do"/>'; |
---|
18 |
document.memoForm.submit(); |
---|
19 |
} |
---|
20 |
</script> |
---|
21 |
|
---|
22 |
<table class="table_default" border="0" cellpadding="3" cellspacing="1" width="100%" align="center" bgcolor="#949EA5"> |
---|
23 |
<tr height="30"> |
---|
24 |
<td bgcolor="#7B869A" align="right" width="20%"><font color="#FFFFFF"><b>제 목</b></font></td> |
---|
25 |
<td bgcolor="#FFFFFF" colspan="3"><c:out value="${board.title}"/></td> |
---|
26 |
</tr> |
---|
27 |
<tr height="30"> |
---|
28 |
<td bgcolor="#7B869A" align="right" width="20%"><font color="#FFFFFF"><b>작성일</b></font></td> |
---|
29 |
<td bgcolor="#FFFFFF" width="30%"><fmt:formatDate value="${board.insertDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td> |
---|
30 |
<td bgcolor="#7B869A" align="right" width="20%"><font color="#FFFFFF"><b>작성자</b></font></td> |
---|
31 |
<td bgcolor="#FFFFFF" width="30%"><c:out value="${board.userId}"/></td> |
---|
32 |
</tr> |
---|
33 |
<tr height="30"> |
---|
34 |
<td bgcolor="#7B869A" align="right" width="20%"><font color="#FFFFFF"><b>조회수</b></font></td> |
---|
35 |
<td bgcolor="#FFFFFF" width="30%"><c:out value="${board.visited}"/></td> |
---|
36 |
<td bgcolor="#7B869A" align="right" width="20%"><font color="#FFFFFF"><b>추천수</b></font></td> |
---|
37 |
<td bgcolor="#FFFFFF" width="30%"><c:out value="${board.recom}"/></td> |
---|
38 |
</tr> |
---|
39 |
<tr> |
---|
40 |
<td bgcolor="#7B869A" align="right"><font color="#FFFFFF"><b>내 용</b></font></td> |
---|
41 |
<td bgcolor="#FFFFFF" colspan="3"><c:out value="${board.content}"/></td> |
---|
42 |
</tr> |
---|
43 |
<tr height="30"> |
---|
44 |
<td bgcolor="#FFFFFF" colspan="4" align="center"> |
---|
45 |
[ <a href="<c:url value="/board/listBoard.do"/>">리스트</a> ] |
---|
46 |
[ <a href="<c:url value="/board/recomBoard.do?boardId=${board.boardId}"/>">글추천</a> ] |
---|
47 |
<c:if test="${userSession.user.userId == board.userId}"> |
---|
48 |
[ <a href="<c:url value="/board/deleteBoard.do?boardId=${board.boardId}"/>">글삭제</a> ] |
---|
49 |
</c:if> |
---|
50 |
<c:if test="${userSession.user.userId != board.userId}"> |
---|
51 |
[ 글삭제 ] |
---|
52 |
</c:if> |
---|
53 |
<c:if test="${userSession.user.userId == board.userId}"> |
---|
54 |
[ <a href="<c:url value="/board/editBoardForm.do?boardId=${board.boardId}"/>">글수정</a> ] |
---|
55 |
</c:if> |
---|
56 |
<c:if test="${userSession.user.userId != board.userId}"> |
---|
57 |
[ 글수정 ] |
---|
58 |
</c:if> |
---|
59 |
</td> |
---|
60 |
</tr> |
---|
61 |
</table> |
---|
62 |
|
---|
63 |
<br/> |
---|
64 |
|
---|
65 |
<form name="memoForm"> |
---|
66 |
<input type="hidden" name="boardId" value="<c:out value="${board.boardId}"/>"> |
---|
67 |
<input type="hidden" name="memoId"> |
---|
68 |
<table class="table_default" border="0" cellpadding="3" cellspacing="1" width="100%" align="center" bgcolor="#949EA5"> |
---|
69 |
<tr height="30"> |
---|
70 |
<td bgcolor="#7B869A" width="100" align="center"><font color="#FFFFFF" align="center"><b>메모</b></font></td> |
---|
71 |
<td bgcolor="#FFFFFF"><input type="text" name="content" size="80" maxlength="80"></td> |
---|
72 |
<td bgcolor="#FFFFFF" align="right">[ <a href="<c:url value="javascript:saveMemo()"/>">저장</a> ]</td> |
---|
73 |
</tr> |
---|
74 |
<tr height="30"> |
---|
75 |
<td bgcolor="#FFFFFF" colspan="3"> |
---|
76 |
<table cellpadding="3" cellspacing="3" width="100%"> |
---|
77 |
<c:forEach var="memo" items="${memoList}"> |
---|
78 |
<tr height="30"> |
---|
79 |
<td class="list_content"> |
---|
80 |
<c:out value="${memo.userId}"/>(<fmt:formatDate value="${memo.insertDate}" pattern="yyyy-MM-dd HH:mm:ss"/>) |
---|
81 |
... <c:out value="${memo.content}"/> |
---|
82 |
<c:if test="${userSession.user.userId == memo.userId}"> |
---|
83 |
[ <a href="<c:url value="javascript:deleteMemo(${memo.memoId})"/>">삭제</a> ] |
---|
84 |
</c:if> |
---|
85 |
<c:if test="${userSession.user.userId != memo.userId}"> |
---|
86 |
[ 삭제 ] |
---|
87 |
</c:if> |
---|
88 |
</td> |
---|
89 |
<tr> |
---|
90 |
</c:forEach> |
---|
91 |
</table> |
---|
92 |
</td> |
---|
93 |
</tr> |
---|
94 |
</table> |
---|
95 |
</form> |
---|
96 |
|
---|
97 |
|
---|
98 |
<%@ include file="footer.jsp" %> |
---|