-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathadministration_dashboard.jsp
241 lines (203 loc) · 12.5 KB
/
administration_dashboard.jsp
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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="java.sql.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html class="no-js" lang="zxx">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>ComplainEase</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="manifest" href="site.webmanifest">
<link rel="shortcut icon" type="image/x-icon" href="assets/img/favicon.ico">
<!-- CSS here -->
<link rel="stylesheet" href="assets/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/owl.carousel.min.css">
<link rel="stylesheet" href="assets/css/slicknav.css">
<link rel="stylesheet" href="assets/css/flaticon.css">
<link rel="stylesheet" href="assets/css/progressbar_barfiller.css">
<link rel="stylesheet" href="assets/css/gijgo.css">
<link rel="stylesheet" href="assets/css/animate.min.css">
<link rel="stylesheet" href="assets/css/animated-headline.css">
<link rel="stylesheet" href="assets/css/magnific-popup.css">
<link rel="stylesheet" href="assets/css/fontawesome-all.min.css">
<link rel="stylesheet" href="assets/css/themify-icons.css">
<link rel="stylesheet" href="assets/css/slick.css">
<link rel="stylesheet" href="assets/css/nice-select.css">
<link rel="stylesheet" href="assets/css/style.css">
</head>
<body>
<%
if(session.getAttribute("administration") == null) // check if administration is already logged in to the system
{
response.sendRedirect("administration_login.jsp"); // if not logged in, take administration to login page
}
%>
<!-- ? Preloader Start -->
<div id="preloader-active">
<div class="preloader d-flex align-items-center justify-content-center">
<div class="preloader-inner position-relative">
<div class="preloader-circle"></div>
<div class="preloader-img pere-text">
<img src="assets/img/logo/logo2_footer.png" height="100px" alt="">
</div>
</div>
</div>
</div>
<!-- Preloader Start -->
<header>
<!-- Header Start -->
<div class="header-area header-transparent">
<div class="main-header ">
<div class="header-bottom header-sticky">
<div class="container-fluid">
<div class="row align-items-center">
<!-- Logo -->
<div class="col-xl-2 col-lg-2">
<div class="logo">
<a href="index.jsp"><img src="assets/img/logo/logo2_footer.png" height="100px" alt=""></a>
</div>
</div>
<div class="col-xl-10 col-lg-10">
<div class="menu-wrapper d-flex align-items-center justify-content-end">
<!-- Main-menu -->
<div class="main-menu d-none d-lg-block">
<nav>
<ul id="navigation">
<li class="active"><a href="administration_dashboard.jsp">Home</a></li>
<li><a href="./study-material.html">Cases</a>
</li>
<!-- Button -->
<li class="button-header"><a href="administration_logout.jsp" class="btn btn3">Log Out</a></li>
</ul>
</nav>
</div>
</div>
</div>
<!-- Mobile Menu -->
<div class="col-12">
<div class="mobile_menu d-block d-lg-none"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Header End -->
</header>
<main>
<!--? slider Area Start-->
<section class="slider-area ">
<div class="slider-active">
<!-- Single Slider -->
<div class="single-slider slider-height d-flex align-items-center" width="1000px">
<div class="container">
<div class="row">
<div class="col-xl-6 col-lg-7 col-md-12">
<div class="hero__caption">
<h1 data-animation="fadeInLeft" data-delay="0.2s">Welcome<br>
<% out.println(session.getAttribute("administration")); %>
</h1>
</main>
<div class="section-top-border" width="10000px">
<h3 class="mb-30 request">Requests:</h3>
<div class="progress-table" width="5000px">
<form class="form-default" action="" method="POST">
<div class="table-head">
<div class="roll_no">Description</div>
<div class="name">Address</div>
<div class="accept">Proof</div>
</div>
<%@ page import="java.sql.*" %>
<%@ page import="java.io.*" %>
<%@ page import="java.util.Base64" %>
<%
String url = "jdbc:mysql://your_mysql_server:3306/your_database";
String user = "your_username";
String password = "your_password";
try {
Class.forName("com.mysql.jdbc.Driver");
Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/complaint","root","");
Statement statement = connection.createStatement();
ResultSet resultSet = statement.executeQuery("SELECT * FROM problems");
while (resultSet.next()) {
String dept = resultSet.getString("dept");
String address = resultSet.getString("Location");
String des = resultSet.getString("des");
Blob blob = resultSet.getBlob("image");
byte[] imageData = blob.getBytes(1, (int) blob.length());
String base64Image = Base64.getEncoder().encodeToString(imageData);
%>
<div class="ml-500">
<div class="table-row">
<div class="roll_no"> <%= address %> </div>
<div class="roll_no"> <%= des %></p></div>
<img src="data:image/jpeg;base64,<%= base64Image %>" alt="Image" width="120px"/>
<div class="accept"><input type="checkbox" name="ad" value="<%= resultSet.getInt(1)%>"></div>
</div>
<%
}
connection.close();
} catch (ClassNotFoundException | SQLException e) {
e.printStackTrace();
}
%>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<div class="form-input pt-30 request">
<input class="genric-btn primary-border" type="submit" name="accept" value="Accept Request">
</div>
<div class="form-input pt-30 request">
<input class="genric-btn primary-border" type="submit" name="reject" value="Delete Requests">
</div>
<!-- Scroll Up -->
<div id="back-top">
<a title="Go to Top" href="#"> <i class="fas fa-level-up-alt"></i></a>
</div>
<!-- JS here -->
<script src="./assets/js/vendor/modernizr-3.5.0.min.js"></script>
<!-- Jquery, Popper, Bootstrap -->
<script src="./assets/js/vendor/jquery-1.12.4.min.js"></script>
<script src="./assets/js/popper.min.js"></script>
<script src="./assets/js/bootstrap.min.js"></script>
<!-- Jquery Mobile Menu -->
<script src="./assets/js/jquery.slicknav.min.js"></script>
<!-- Jquery Slick , Owl-Carousel Plugins -->
<script src="./assets/js/owl.carousel.min.js"></script>
<script src="./assets/js/slick.min.js"></script>
<!-- One Page, Animated-HeadLin -->
<script src="./assets/js/wow.min.js"></script>
<script src="./assets/js/animated.headline.js"></script>
<script src="./assets/js/jquery.magnific-popup.js"></script>
<!-- Date Picker -->
<script src="./assets/js/gijgo.min.js"></script>
<!-- Nice-select, sticky -->
<script src="./assets/js/jquery.nice-select.min.js"></script>
<script src="./assets/js/jquery.sticky.js"></script>
<!-- Progress -->
<script src="./assets/js/jquery.barfiller.js"></script>
<!-- counter , waypoint,Hover Direction -->
<script src="./assets/js/jquery.counterup.min.js"></script>
<script src="./assets/js/waypoints.min.js"></script>
<script src="./assets/js/jquery.countdown.min.js"></script>
<script src="./assets/js/hover-direction-snake.min.js"></script>
<!-- contact js -->
<script src="./assets/js/contact.js"></script>
<script src="./assets/js/jquery.form.js"></script>
<script src="./assets/js/jquery.validate.min.js"></script>
<script src="./assets/js/mail-script.js"></script>
<script src="./assets/js/jquery.ajaxchimp.min.js"></script>
<!-- Jquery Plugins, main Jquery -->
<script src="./assets/js/plugins.js"></script>
<script src="./assets/js/main.js"></script>
</body>
</html>