This repository has been archived by the owner on Aug 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
residents-profile.php
291 lines (278 loc) · 16.8 KB
/
residents-profile.php
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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
<?php include_once 'functions/authentication.php'; ?>
<?php include_once 'functions/resident-profile-complains-counter.php'; ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<title>Home - Pongapong San Pablo Resident Information System</title>
<meta name="description" content="PSPRIS - Pongapong San Pablo Resident Information System">
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/Lato.css">
<link rel="stylesheet" href="assets/fonts/fontawesome-all.min.css">
<link rel="stylesheet" href="assets/fonts/font-awesome.min.css">
<link rel="stylesheet" href="assets/fonts/fontawesome5-overrides.min.css">
<link rel="stylesheet" href="assets/css/Application-Form.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.2/css/theme.bootstrap_4.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css">
<link rel="stylesheet" href="assets/css/Login-Form-Basic-icons.css">
<link rel="stylesheet" href="assets/css/Ludens---1-Index-Table-with-Search--Sort-Filters-v20.css">
<link rel="stylesheet" href="assets/css/Pricing-Free-Paid-badges.css">
<link rel="stylesheet" href="assets/css/Table-With-Search-search-table.css">
<link rel="stylesheet" href="assets/css/Table-With-Search.css">
</head>
<body>
<nav class="navbar navbar-light navbar-expand-md sticky-top bg-white">
<div class="container-fluid"><a class="navbar-brand" href="dashboard.php">Pongapong San Pablo Resident Information System</a><button data-bs-toggle="collapse" class="navbar-toggler" data-bs-target="#navcol-2"><span class="visually-hidden">Toggle navigation</span><span class="navbar-toggler-icon"></span></button>
<div class="collapse navbar-collapse" id="navcol-2">
<ul class="navbar-nav">
<li class="nav-item"><a class="nav-link" href="residents-complains.php">Complains</a></li>
<li class="nav-item"><a class="nav-link" href="residents.php">Residents</a></li>
<li class="nav-item"><a class="nav-link" href="residents-decease.php">Decease Residents</a></li>
<li class="nav-item"><a class="nav-link" href="residents-transfered.php">Transfered Residents</a></li>
</ul>
<ul class="navbar-nav ms-auto">
<li class="nav-item"><a class="nav-link active" href="functions/sign-out.php"><button class="btn btn-outline-primary" type="button">Logout</button></a></li>
</ul>
</div>
</div>
</nav>
<header class="text-center text-white masthead" style="background: url('assets/img/bg-pspris.jpg')no-repeat center center;background-size: cover;height: 25em;">
<div class="overlay"></div>
<div class="container">
<div class="row">
<div class="col-xl-9 mx-auto position-relative">
<h1 class="mb-5">PSPRIS - System</h1>
</div>
</div>
</div>
</header>
<section class="py-4 py-xl-5">
<div class="row gy-4 row-cols-1 row-cols-md-2 row-cols-xl-3 d-xl-flex">
<div class="col">
<div class="card border-info border-2 mb-4">
<div class="card-body text-center p-4"><span class="badge rounded-pill bg-info position-absolute top-0 start-50 translate-middle text-uppercase">Active </span>
<h4 class="fw-bold card-subtitle">Active Complains</h4>
<h4 class="display-5 fw-bold card-title"><?php get_active(); ?></h4>
<p>PSPRIS - System</p>
</div>
</div>
</div>
<div class="col">
<div class="card border-danger border-2 mb-4">
<div class="card-body text-center p-4"><span class="badge rounded-pill bg-danger position-absolute top-0 start-50 translate-middle text-uppercase">Total</span>
<h4 class="fw-bold card-subtitle">Complains</h4>
<h4 class="display-5 fw-bold card-title"><?php get_total(); ?></h4>
<p>PSPRIS - System</p>
</div>
</div>
</div>
<div class="col">
<div class="card border-success border-2 mb-4">
<div class="card-body text-center p-4"><span class="badge rounded-pill bg-success position-absolute top-0 start-50 translate-middle text-uppercase">Resolve</span>
<h4 class="fw-bold card-subtitle">Resolved Complains</h4>
<h4 class="display-5 fw-bold card-title"><?php get_resolve(); ?></h4>
<p>PSPRIS - System</p>
</div>
</div>
</div>
</div>
<?php include_once "functions/resident-profile.php"; ?>
<div class="container-fluid">
<div class="card" id="TableSorterCard">
<div class="card-header py-3">
<div class="row table-topper align-items-center">
<div class="col-12 col-sm-5 col-md-6 text-start" style="margin: 0px;padding: 5px 15px;">
<p class="text-primary m-0 fw-bold">List of Complainants</p>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="table-responsive">
<table class="table table-striped table tablesorter" id="ipi-table">
<thead class="thead-dark">
<tr>
<th class="text-center">ID</th>
<th class="text-center">FIRSTNAME</th>
<th class="text-center">LASTNAME</th>
<th class="text-center">EMAIL</th>
<th class="text-center">PHONE</th>
<th class="text-center">ADDRESS</th>
<th class="text-center">SEX</th>
<th class="text-center">complain</th>
<th class="text-center filter-false sorter-false">OPTION</th>
<th class="text-center">Status</th>
<th class="text-center">DATE</th>
</tr>
</thead>
<tbody class="text-center">
<?php include_once "functions/resident-complains.php"; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</section>
<footer class="bg-light footer">
<div class="container">
<div class="row">
<div class="col-lg-6 text-center text-lg-start my-auto h-100">
<ul class="list-inline mb-2">
<li class="list-inline-item"><a href="#">About</a></li>
<li class="list-inline-item"><span>⋅</span></li>
<li class="list-inline-item"><a href="#">Contact</a></li>
<li class="list-inline-item"><span>⋅</span></li>
<li class="list-inline-item"><a href="#">Terms of Use</a></li>
<li class="list-inline-item"><span>⋅</span></li>
<li class="list-inline-item"><a href="#">Privacy Policy</a></li>
</ul>
<p class="text-muted small mb-4 mb-lg-0">© Pongapong San Pablo Resident Information System 2023. All Rights Reserved.</p>
</div>
<div class="col-lg-6 text-center text-lg-end my-auto h-100">
<ul class="list-inline mb-0">
<li class="list-inline-item"><a href="#"><i class="fa fa-facebook fa-2x fa-fw"></i></a></li>
<li class="list-inline-item"><a href="#"><i class="fa fa-twitter fa-2x fa-fw"></i></a></li>
<li class="list-inline-item"><a href="#"><i class="fa fa-instagram fa-2x fa-fw"></i></a></li>
</ul>
</div>
</div>
</div>
</footer>
<div class="modal fade" role="dialog" tabindex="-1" id="update-resident">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Update Resident</h4><button class="btn-close" type="button" aria-label="Close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body">
<section>
<div class="container">
<form id="application-form-3">
<div class="form-group mb-3">
<div class="row">
<div class="col">
<p><strong>First Name</strong> <span class="text-danger">*</span></p><input class="form-control" type="text" required="" name="firstname" placeholder="Ex. Juan">
</div>
<div class="col">
<p><strong>Last Name</strong> <span class="text-danger">*</span></p><input class="form-control" type="text" required="" name="lastname" placeholder="Ex. Smith">
</div>
</div>
</div>
<div class="form-group mb-3">
<div class="row">
<div class="col">
<p><strong>Date Of Birth</strong> <span class="text-danger">*</span></p><input class="form-control" type="date" required="" name="birthdate">
</div>
</div>
</div>
<div class="form-group mb-3">
<p><strong>Email </strong><span class="text-danger">*</span></p><input class="form-control" type="email" name="email" placeholder="[email protected] (Optional)">
</div>
<div class="form-group mb-3">
<p><strong>Phone Number </strong><span class="text-danger">*</span></p><input class="form-control" type="number" name="phone" placeholder="63+ 00 000 0000" required="">
</div>
<div class="form-group mb-3">
<p><strong>Address </strong><span class="text-danger">*</span></p><input class="form-control" type="text" required="" name="address" placeholder="Ex. Room No-361, 33/1, 3rd Floor">
</div>
<div class="form-group mb-3">
<div class="row">
<div class="col">
<p><strong>Sex</strong></p><input class="form-control" type="text" required="" name="sex" placeholder="Ex. Male">
</div>
<div class="col">
<p><strong>Age</strong></p><input class="form-control" type="text" required="" name="age" placeholder="Ex. 18">
</div>
</div>
</div>
<div class="form-group mb-3">
<p><strong>Status</strong><span class="text-danger">*</span></p><input class="form-control" type="text" required="" name="status" placeholder="Ex. Deceased">
</div>
<div class="justify-content-center d-flex form-group mb-3">
<div id="submit-btn-3">
<div class="row">
<div class="col"><button class="btn btn-primary" type="submit" style="width: 28em;">Add Resident</button></div>
</div>
</div>
</div>
</form>
</div>
<div class="col">
<h3 id="fail-3" class="text-center text-danger d-none"><br>Form not Submitted <a href="contact.php">Try Again</a><br><br></h3>
<h3 id="success-3" class="text-center text-success d-none"><br>Form Submitted Successfully <a href="contact.php">Send Another Response</a><br><br></h3>
</div>
</section>
</div>
<div class="modal-footer"><button class="btn btn-light" type="button" data-bs-dismiss="modal">Close</button></div>
</div>
</div>
</div>
<div class="modal fade" role="dialog" tabindex="-1" id="confirmation">
<div class="modal-dialog" role="document">
<form action="functions/remove-complain.php" method="post">
<input type="hidden" name="resident_id">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Remove Complain</h4><button class="btn-close" type="button" aria-label="Close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body">
<p>Are you sure you want to remove this complain?</p>
</div>
<div class="modal-footer"><button class="btn btn-light" type="button" data-bs-dismiss="modal">Close</button><button class="btn btn-danger" type="submit">Remove</button></div>
</div>
</div>
</form>
</div>
<div class="modal fade" role="dialog" tabindex="-1" id="resolve-complain">
<div class="modal-dialog" role="document">
<form action="functions/resolve-complain.php" method="post">
<input type="hidden" name="resident_id">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Resolve Complain</h4><button class="btn-close" type="button" aria-label="Close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body">
<p>Are you sure you want to resolve this complain?</p>
</div>
<div class="modal-footer"><button class="btn btn-light" type="button" data-bs-dismiss="modal">Close</button><button class="btn btn-warning" type="submit">Resolve</button></div>
</div>
</form>
</div>
</div>
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
<script src="assets/js/bs-init.js"></script>
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/sweetalert.min.js"></script>
<script>
const url = window.location.href;
if (url.indexOf("#success") > -1) {
swal("Success", "Pongapong San Pablo Resident Information System", "success");
}
if (url.indexOf("#error") > -1) {
swal("Error", "Pongapong San Pablo Resident Information System", "error");
}
</script>
<script>
$('button[data-bs-target="#confirmation"]').on('click', function() {
// Get the user ID from the data attribute.
var resident_id = $(this).data('resident-id');
console.log(resident_id);
// Set the value of all input fields with the name "userid" to the user ID.
$('input[name="resident_id"]').each(function() {
$(this).val(resident_id);
});
});
$('button[data-bs-target="#resolve-complain"]').on('click', function() {
// Get the user ID from the data attribute.
var resident_id = $(this).data('resident-id');
console.log(resident_id);
// Set the value of all input fields with the name "userid" to the user ID.
$('input[name="resident_id"]').each(function() {
$(this).val(resident_id);
});
});
</script>
</body>
</html>