list.ejs
7.16 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
<!DOCTYPE html>
<html leng="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>가수와 작곡가의 만남 - <%= 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" />
<link href="/css/board.css" rel="stylesheet" />
</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>
<div class ="wrap">
<div class="list_board">
<a class="board_btn" href="/board/list/notice">
공지사항
</a>
<a class="board_btn" href="/board/list/composer">
작곡가 구인
</a>
<a class="board_btn" href="/board/list/singer">
가수 구인
</a>
<a class="board_btn" href="/board/list/free">
자유게시판
</a>
<a class="board_btn" href="/board/list/suggestion">
건의사항
</a>
</div>
<div class="container px-5 my-5">
<h1><%= title %></h1>
<%
var addr;
%>
<%
switch(title){
case '공지사항':
addr = 'notice';
break;
case '작곡가 구인':
addr = 'composer';
break;
case '가수 구인':
addr = 'singer';
break;
case '자유게시판':
addr = 'free';
break;
case '건의사항':
addr = 'suggestion';
break;
%>
<%
}
%>
<table border="1">
<tr>
<td>번호</td>
<td>작성자</td>
<td>제목</td>
<td>조회수</td>
<td>수정일</td>
<td>등록일</td>
</tr>
<%
for(var i = (page * page_num)- page_num; i < (page * page_num); i++) {
if(i > length){
i++;
}else{
var data = rows[i]
%>
<tr>
<td><%=data.idx%></td>
<td><%=data.nickname%></td>
<td><a href="/board/read/<%=addr%>/<%=data.idx%>"><%=data.title%></a></td>
<td><%=data.hit%></td>
<td><%=data.modidate%></td>
<td><%=data.regdate%></td>
</tr>
<% }
}
%>
<tr>
<td colspan="6">
<%
for(var j = 0; j < rows.length/page_num ; j++){
%>
[<a href="/board/list/<%=addr%>/<%= j + 1 %>"><%= j+1 %></a>]
<%
}
%>
</td>
</tr>
</table>
<nav class="navbar">
<a class="btn btn-outline-primary me-2" href="/board/write/<%=addr%>">글쓰기</a>
</nav>
</div>
</div>
<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>