This repository was 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
Expand file tree
/
Copy pathresidents-complains.php
More file actions
227 lines (220 loc) · 13.4 KB
/
residents-complains.php
File metadata and controls
227 lines (220 loc) · 13.4 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
225
226
227
<?php include_once 'functions/authentication.php'; ?>
<?php include_once 'functions/dashboard-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>
<?php include_once 'functions/dashboard-counter.php' ?>
<div class="container 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">Total </span>
<h4 class="fw-bold card-subtitle">Pending</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">Total</span>
<h4 class="fw-bold card-subtitle">Resolve</h4>
<h4 class="display-5 fw-bold card-title"><?php get_resolve(); ?></h4>
<p>PSPRIS - System</p>
</div>
</div>
</div>
</div>
</div>
<section class="py-4 py-xl-5">
<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 Residents</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">respondent</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/view-complains.php"; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</section>
<div class="modal fade" role="dialog" tabindex="-1" id="confirmation">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form action="functions/remove-complain.php" method="post">
<input type="hidden" name="resident_id">
<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>
</form>
</div>
</div>
</div>
<div class="modal fade" role="dialog" tabindex="-1" id="update-complain">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Complaint Info.</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-2">
<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. John">
</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">
<p><strong>Email </strong><span class="text-danger">*</span></p><input class="form-control" type="email" name="email" placeholder="user@domain.com">
</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">
<p><strong>Sex</strong><span class="text-danger">*</span></p><input class="form-control" type="text" required="" name="sex" placeholder="Ex. Male">
</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="sex" placeholder="Ex. Resolve">
</div>
<div class="form-group mb-3">
<p><strong>Complain</strong><span class="text-danger">*</span></p><textarea class="form-control" type="text" required="" placeholder="Ex. Juan is noisy" name="complain"></textarea>
</div>
<div class="justify-content-center d-flex form-group mb-3">
<div id="submit-btn-2">
<div class="row">
<div class="col"><button class="btn btn-primary" type="submit" style="width: 28em;">Add Complain</button></div>
</div>
</div>
</div>
</form>
</div>
<div class="col">
<h3 id="fail-2" class="text-center text-danger d-none"><br>Form not Submitted <a href="contact.php">Try Again</a><br><br></h3>
<h3 id="success-1" 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>
<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);
});
});
</script>
</body>
</html>