-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsec_eva.jsp
More file actions
206 lines (198 loc) · 8.67 KB
/
sec_eva.jsp
File metadata and controls
206 lines (198 loc) · 8.67 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
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page import="java.io.PrintWriter"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!-- DAO 호출 -->
<jsp:useBean id="ResultDAO" class="result.ResultDAO" />
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width" , initial-scale="1">
<link rel="stylesheet" href="css/bootstrap.css">
<!-- 부트스트립 css 추가하기 -->
<link rel="stylesheet" href="./css/bootstrap.min.css">
<!-- 커스텀 css 추가하기 -->
<link rel="stylesheet" href="./css/custom.css">
<title>취약점 진단 프로그램</title>
</head>
<body>
<style>
#mainfooter{
position:absolute;
bottom:0;
width:100%;
height:70px;
}
#dataaction{
text-align:left;
}
td{
valign:middle;
}
.btn-primary{
background-color:#848484;
border-color:#848484
}
</style>
<script src="./js/jquery.min.js"></script>
<!-- 파퍼 자바스크립트 추가하기 -->
<script src="./js/popper.js"></script>
<!-- 부트스트랩 자바스크립트 추가하기 -->
<script src="./js/bootstrap.min.js"></script>
<%
String userID = null;
if (session.getAttribute("userID") != null) {
userID = (String) session.getAttribute("userID");
}
%>
<nav class="navbar navbar-default">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed"
data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"
aria-expanded="false">
<span class="icon-bar"></span> <span class="icon-bar"></span> <span
class="icon-bar"></span>
</button>
<a class="navbar-brand" href="main.jsp">산업제어시스템 사이버 침해사고 대응체계 프로그램</a>
</div>
<div class="collapse navbar-collapse"
id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a href="main.jsp">메인</a></li>
<li><a href="asset_list.jsp">자산 리스트</a></li>
<li><a href="asset_eva.jsp">자산 평가</a></li>
<li class="active"><a href="sec_eva.jsp">보안성 평가 결과</a></li>
<li><a href="emergency_case.jsp">비상사건 관리</a></li>
<!-- <li><a href="scenario.jsp">시나리오 리스트</a></li>-->
<li><a href="scenario_eva.jsp">시나리오 관리</a></li>
<li><a href="infringement.jsp">침해대응 훈련</a></li>
</ul>
<%
if (userID == null) {
%>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown"><a href="#" class="dropdown-toggle"
data-toggle="dropdown" role="button" aria-haspopup="true"
aria-expanded="false">접속하기<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="login.jsp">로그인</a></li>
<li><a href="join.jsp">회원가입</a></li>
</ul></li>
</ul>
<%
} else {
%>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown"><a href="#" class="dropdown-toggle"
data-toggle="dropdown" role="button" aria-haspopup="true"
aria-expanded="false">회원관리<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="logoutAction.jsp">로그아웃</a></li>
</ul></li>
</ul>
<%
}
%>
</div>
</nav>
<br><br>
<div class="container" style="width:80%;">
<br><br>
<!-- 자산 선택 화면 -->
<button
style="display: inline-block; float: left; border: 1px solid black; padding: 3px; text-align: center; text-margin: auto; width: 100px; height: 44px;">
<a href="sec_eva.jsp">가압경수로</br>
2차계통</a>
</button>
<button onclick="div_ctrl();"
style="display: inline-block; float: left; border: 1px solid white; padding: 3px; text-align: center; text-margin: auto; width: 100px; height: 44px;">
터빈계통 </br>제어기기</a>
</button>
<script>
function div_ctrl() {
document.getElementById("evaluation_table").style.display = "block";
document.getElementById("selectBtn").style.display = "block";
}
</script>
<button onclick="div_plc();"
style="display: inline-block; float: left; border: 1px solid white; padding: 3px; text-align: center; text-margin: auto; width: 100px; height: 44px;">
지진감시계통 PLC</a>
</button>
<script>
function div_plc() {
document.getElementById("evaluation_table").style.display = "block";
document.getElementById("selectBtn").style.display = "block";
}
function rowSpan(tableId, columnNo){
var temp = document.getElementById(tableId);
var rows = temp.getElementsByTagName("TR");
var previous = -1;
for (var i = 1; i < rows.length; i++) {
if (i > 1){
var compare = (previous < 0) ? (i - 1) : previous ;
var preCol = rows[ compare ].getElementsByTagName("TD")[columnNo];
var curCol = rows[i].getElementsByTagName("TD")[columnNo];
if (preCol.innerHTML == curCol.innerHTML){
preCol.rowSpan = preCol.rowSpan + 1;
curCol.style.display = 'none';
previous = compare;
}else{
previous = -1;
}
}
}
}
</script>
<!-- 표 삽입 -->
<div class="row">
<table width="100" class="table table-striped" id="List" style="text-align: center; border: 1px solid #dddddd; overflow: scroll;">
<thead>
<tr>
<th width="4%" valign="middle" style="background-color: #eeeeee; text-align: center;">통제분야</th>
<th width="1%" style="background-color: #eeeeee; text-align: center;">No.</th>
<th width="7%" style="background-color: #eeeeee; text-align: center;">통제항목</th>
<th width="19%" style="background-color: #eeeeee; text-align: center;">점검항목</th>
<th width="5%" style="background-color: #eeeeee; text-align: center;">근거자료<br>(관리적)</th>
<th width="5%" style="background-color: #eeeeee; text-align: center;">근거자료<br>(물리적)</th>
<th width="9%" style="background-color: #eeeeee; text-align: center;">점검방법</th>
<th width="5%"style="background-color: #eeeeee; text-align: center;">평가결과</th>
<th width="18%" style="background-color: #eeeeee; text-align: center;">보안조치사항</th>
</tr>
</thead>
<tbody>
<c:forEach var="data" items="${ResultDAO.getResult() }">
<tr>
<!-- jstl -->
<td>${data.control_field}</td>
<td>${data.control_item_no}</td>
<td>${data.control_item}</td>
<td id="dataaction">${data.check_item}</td>
<td>${data.management}</td>
<td>${data.physics}</td>
<td>${data.method}</td>
<td>${data.result}</td>
<td id="dataaction">${data.action}</td>
</tr>
</c:forEach>
</tbody>
</table>
<script>rowSpan("List",0), rowSpan("List",1), rowSpan("List",2)</script>
</div>
<div align="right">
<!-- Result DB에 데이터 저장 -->
<button id="save" onclick="return sec_button()"> <a href="save.jsp">저장</a></button>
<script type="text/javascript">
function sec_button() {
return confirm("저장이 완료되었습니다") }
</script>
</div>
</div>
<footer id="mainfooter">
<span>ㅤㅤ ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ COPYRIGHT ⓒ
2019 HelloSecurity. All Rights Reserved</span>
</footer>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="js/bootstrap.js"></script>
</body>
</html>