-
Notifications
You must be signed in to change notification settings - Fork 1
/
feedback.php
161 lines (154 loc) · 9.29 KB
/
feedback.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
<?php
session_start();
if (!isset($_SESSION['rollnumber'])) {
header("Location: login.php");
}
if (isset($_GET['logout'])) {
unset($_SESSION['rollnumber']);
session_destroy();
mysqli_close($db);
header("Location: login.php");
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Feedback Form - Housekeeper Student Dashboard</title>
<?php require("meta.php"); ?>
</head>
<body>
<!-- Side Navigation -->
<?php require("sidenav.php"); ?>
<!-- Main content -->
<div class="main-content">
<!-- Header -->
<div class="header bg-background pb-6 pt-5 pt-md-6">
<div class="container-fluid">
<!-- notification message -->
<?php if (isset($_SESSION['feed_sent'])): ?>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<span class="alert-inner--icon"><i class="ni ni-like-2"></i></span>
<?php echo $_SESSION['feed_sent'];
unset($_SESSION['feed_sent']); ?>
</span>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<?php endif ?>
<?php require("headerstats.php"); ?>
</div>
</div>
<!-- Page content -->
<div class="container-fluid mt--5 pb-6">
<div class="row mt-2">
<div class="col-xl-12 order-xl-1">
<div class="card bg-secondary shadow">
<div class="card-header bg-white border-0">
<h3 class="mb-0">Housekeeping Feedback</h3>
</div>
<div class="card-body pb-5">
<form method="POST" autocomplete="off" action="studenthandler.php">
<div class="pl-lg-4">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="form-control-label" for="input-requestid">Request Id <span
class="text-danger">*</span></label>
<select name="feedReqid" class="form-control" id="input-requestid"
required>
<option selected="true" value="" disabled="disabled">Select Option
</option>
<?php
require("db.php");
// ================== Get Request-ids for feedback Handler =================== //
$rolll = trim($_SESSION['rollnumber']);
$reqids_query = "Select request_id,name from
cleanrequest cr Inner JOIN housekeeper hk on cr.worker_id=hk.worker_id
inner join student s on s.rollnumber = cr.rollnumber
where cr.req_status = 1 and s.rollnumber = '$rolll'";
$reqids_result = mysqli_query($db, $reqids_query);
if (mysqli_num_rows($reqids_result) > 0) {
while ($row = mysqli_fetch_assoc($reqids_result)) {
?>
<option value="<?php echo $row['request_id'] ?>">
<?php echo $row['request_id'] . " - " . $row['name'] ?></option>
<?php }
} ?>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-control-label" for="input-rating">Rate Service <span
class="text-danger">*</span></label>
<select name="feedRating" class="form-control" id="input-rating"
required>
<option selected="true" value="" disabled="disabled">Select Option
</option>
<option value="1">1 Poor Cleaning</option>
<option value="2">2 Not Satisfied</option>
<option value="3">3 Satisfactory</option>
<option value="4">4 Good Cleaning</option>
<option value="5">5 Excellent Work</option>
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label class="form-control-label" for="input-timein">Time In <span
class="text-danger">*</span></label>
<input name="feedTimein" type="time" id="input-timein"
class="form-control form-control-alternative" required>
</div>
</div>
<div class="col-lg-6">
<div class="form-group">
<label class="form-control-label" for="input-timeout">Time Out <span
class="text-danger">*</span></label>
<input name="feedTimeout" type="time" id="input-timeout"
class="form-control form-control-alternative" required>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label class="form-control-label"
for="input-suggestions">Suggestions</label>
<textarea name="feedSuggestion"
class="form-control form-control-alternative" id="input-suggestions"
rows="3"
placeholder="We'd love to here some suggestions.."></textarea>
</div>
</div>
<div class="col-lg-6">
<div class="form-group">
<label class="form-control-label"
for="input-complaints">Complaints</label>
<textarea name="feedComplaints"
class="form-control form-control-alternative" id="input-complaints"
rows="3"
placeholder="Got complaints for housekeeping service?"></textarea>
</div>
</div>
</div>
<button name="feedSubmit" class="btn btn-outline-success" type="submit">
<span class="btn-inner--text">Submit</span>
</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="assets/vendor/jquery/dist/jquery.min.js"></script>
<script src="assets/vendor/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="assets/vendor/bootstrap/dist/js/bootstrap-datepicker.min.js"></script>
<script src="assets/js/argon.min.js"></script>
</body>
</html>