read.ejs
9.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<!DOCTYPE html>
<html>
<head>
<title>묵호 - <%= row.title %></title>
<!-- Favicon-->
<link rel="icon" type="image/x-icon" href="../assets/favicon.ico" />
<!-- Bootstrap icons-->
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css" rel="stylesheet" type="text/css" />
<!-- Google fonts-->
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css" />
<!-- Core theme CSS (includes Bootstrap)-->
<link href="/css/styles.css?after" rel="stylesheet" />
<script src="https://code.jquery.com/jquery-3.6.0.slim.js" integrity="sha256-HwWONEZrpuoh951cQD1ov2HUK5zA5DwJ1DNUXaM6FsY=" crossorigin="anonymous"></script>
<link href="https://vjs.zencdn.net/7.10.2/video-js.css" rel="stylesheet" />
<script src="https://vjs.zencdn.net/7.10.2/video.min.js"></script>
<link href="https://unpkg.com/@silvermine/videojs-quality-selector/dist/css/quality-selector.css" rel="stylesheet">
<script src="https://unpkg.com/@silvermine/videojs-quality-selector/dist/js/silvermine-videojs-quality-selector.min.js"></script>
<style>
.video-js .vjs-big-play-button {
background-color: #B37D5B;
opacity: .6;
}
</style>
</head>
<body>
<!-- Navigation-->
<nav class="navbar navbar-light bg-light static-top">
<div class="container">
<a class="navbar-brand" href="/main">묵호의 놀이터</a>
<ul class="nav col-12 col-md-auto mb-2 justify-content-center mb-md-0">
<li><a href="/about" class="nav-link px-2 link-dark">About</a></li>
<li><a href="/board" class="nav-link px-2 link-dark">게시판</a></li>
<li><a href = "javascript:;" onclick = "window.open('/chat','파일 업로드','width=500, height=801, toolbar=no,location=yes,status=no,menubar=no,scrollbars=yes,resizable=no');" class="nav-link px-2 link-dark">채팅</a></li>
<li><a href="http://khuhub.khu.ac.kr/2017104034/Singer-Composer" target="_blank" class="nav-link px-2 link-dark">사이트 git</a></li>
</ul>
<div class="user">
<a href = "/profile"> <%=nickname%></a><a>님 안녕하세요</a>
<a class="btn btn-primary" href="/logout">로그아웃</a>
</div>
</div>
</nav>
<%
var addr;
%>
<div class="container px-5 my-5">
<h1><%= title %></h1>
<%
switch(title){
case '공지사항 글 상세':
addr = 'notice';
break;
case '작곡가 구인 글 상세':
addr = 'composer';
break;
case '가수 구인 글 상세':
addr = 'singer';
break;
case '자유게시판 글 상세':
addr = 'free';
break;
case '건의사항 글 상세':
addr = 'suggestion';
break;
%>
<%
}
%>
<script>
function submit2(frm){
frm.action="/board/delete/<%=addr%>";
frm.submit();
return true;
}
</script>
<form action="/board/update/<%=addr%>" method="post">
<table border="1">
<input type="hidden" name="idx" value="<%=row.idx%>"/>
<tr>
<td>작성자</td>
<td><%=row.nickname%></td>
</tr>
<tr>
<td>제목</td>
<td><input type="text" name="title" id="title" value="<%=row.title%>" required/></td>
</tr>
<tr>
<td>내용</td>
<td><textarea name="content" id="content" cols="30" rows="10" required><%=row.content%></textarea></td>
</tr>
<tr>
<td>사진 및 동영상</td>
<td>
<div class="bx_group">
<a class = "bx_content">
<%
for(var i=0; i<picarr_length;i++){
var picdata = picarr[i]
%>
<img src="<%=picdata%>" width = "250" height = "250" alt="...">
<%
}
%>
<%
for(var i=0; i<vidarr_length;i++){
var viddata = vidarr[i]
%>
<video id="video_<%=i%>" class="video-js vjs-big-play-button vjs-big-play-centered vjs-fluid" controls preload="auto" width="1000" height="450" data-setup='{}'>
<source src="<%=viddata%>" type="video/mp4" label="720P" selected="true">
</video>
<%
}
%>
</a>
</div>
</td>
</tr>
<tr>
<td>변경일</td>
<td><%=row.modidate%></td>
</tr>
<tr>
<td>등록일</td>
<td><%=row.regdate%></td>
</tr>
<tr>
<td>조회수</td>
<td><%=row.hit+1%></td>
</tr>
<tr>
<td colspan="3">
<button type="submit">글 수정</button>
<button type="summit" onclick="return submit2(this.form);">글 삭제</button>
<a href="/board/list/<%=addr%>">
<input type="button" value="목록">
</a>
</td>
</tr>
</table>
</form>
</div>
<div class="container px-5 my-5">
<h1>댓글</h1>
<script>
function submit3(frm){
frm.action="/board/read/<%=addr%>/commentdelete";
frm.submit();
return true;
}
function deleteit(buttonID){
}
</script>
<form action="/board/read/<%=addr%>/commentwrite" method="post">
<table border="1">
<input type="hidden" name="idx" value="<%=row.idx%>"/>
<tr>
<td>닉네임</td>
<td>내용</td>
</tr>
<%
for(var i=0; i<comment_length; i++){
var data = comment[i]
%>
<tr>
<td><%=data.nickname%></td>
<td><%=data.comment%></td>
<td>
<form method ="post">
<input type="hidden" name="idxcomment" value="<%=data.idx%>"/>
<button type="button" onclick="return submit3(this.form);">댓글 삭제</button>
</form>
</td>
</tr>
<%
}
%>
<tr>
<td><%=nickname%></td>
<td><textarea name="comment" id="comment" cols="30" rows="2" required></textarea></td>
<td colspan="2">
<button type="submit">댓글 쓰기</button>
</td>
</tr>
</table>
</form>
</div>
<!-- Footer-->
<footer class="footer bg-light">
<div class="container">
<div class="row">
<div class="col-lg-6 h-100 text-center text-lg-start my-auto">
<ul class="list-inline mb-2">
<li class="list-inline-item"><a href="/about">About</a></li>
<li class="list-inline-item">⋅</li>
<li class="list-inline-item"><a href="http://khuhub.khu.ac.kr/2017104034/Singer-Composer" target="_blank">사이트 git</a></li>
<li class="list-inline-item">⋅</li>
<li class="list-inline-item"><a href="http://ce.khu.ac.kr/">경희대학교 컴퓨터공학과</a></li>
<li class="list-inline-item">⋅</li>
<li class="list-inline-item"><a href="http://geo.khu.ac.kr/">경희대학교 지리학과</a></li>
</ul>
<p class="text-muted small mb-4 mb-lg-0">© Mukho 2021. All Rights Reserved.</p>
</div>
<div class="col-lg-6 h-100 text-center text-lg-end my-auto">
<ul class="list-inline mb-0">
<li class="list-inline-item me-4">
<a href="#!"><i class="bi-facebook fs-3"></i></a>
</li>
<li class="list-inline-item me-4">
<a href="#!"><i class="bi-twitter fs-3"></i></a>
</li>
<li class="list-inline-item">
<a href="#!"><i class="bi-instagram fs-3"></i></a>
</li>
</ul>
</div>
</div>
</div>
</footer>
</body>
</html>