-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEntryORExit.php
More file actions
192 lines (167 loc) · 6.33 KB
/
EntryORExit.php
File metadata and controls
192 lines (167 loc) · 6.33 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
<?php
include("includes/dbconfig.php");
?>
<?php
if(isset($_SESSION['user'])){
$name = $_SESSION['name'] ?? '';
$email = $_SESSION['email'] ?? '';
if(isset($_POST['submit'])) {
$status = $_POST['track'];
$query = "UPDATE finalstudent SET status = :status WHERE email = :email";
$query_run = $conn->prepare($query);
$data = [
':status' => $status,
':email' => $email
];
$query_execute = $query_run->execute($data);
if($query_execute) {
header("Location: myprofile.php");
$_SESSION['status'] = 33;
}
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Hostel Control Management</title>
<link rel="stylesheet" href="assets/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/style.css?v=1">
<link rel="stylesheet" href="assets/css/responsive.css?v=1">
<link rel="icon" type="image/x-icon" href="assets/images/hostel.png">
<link rel="stylesheet" href="assets/css/jquery.mCustomScrollbar.min.css">
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.css" media="screen">
<style>
.registration-form {
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.registration-form h2 {
text-align: center;
}
.both {
display:flex;
align-items: center;
justify-content: center;
}
.form-group input, textarea {
width: 100%;
padding: 8px;
box-sizing: border-box;
border: 1px solid #ccc;
border-radius: 4px;
}
.form-group button {
background-color: #000;
color: #fff;
padding: 10px;
border: none;
border-radius: 4px;
cursor: pointer;
width: 100%;
}
.form-group button:hover {
background-color: #fe0000;
}
.book_room {
width:500px;
}
@media (max-width: 1527px) {
.registration-form {
width: 500px;
}
}
@media (max-width: 1300px) {
.registration-form {
width: 400px;
}
}
@media (max-width: 1060px) {
.registration-form {
width: 300px;
}
}
@media (max-width: 700px) {
.registration-form {
width: 500px;
}
.both {
flex-direction: column;
}
}
@media (max-width: 500px) {
#register {
display: block;
width: 100%;
height: 27px;
margin-top: -67px;
margin-left: -61px;
padding-top: 0px;
}
.registration-form {
width: 300px;
}
.book_room {
width:100%;
}
}
</style>
</head>
<body class="main-layout" style="overflow-x: hidden;">
<div class="loader_bg">
<div class="loader">
<img src="assets/images/loading.gif" alt="#" />
</div>
</div>
<?php include("includes/header.php"); ?>
<div class="back_re">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="title">
<h2>Entry or Exit</h2>
</div>
</div>
</div>
</div>
</div>
<div class="both">
<div class="about">
<div class="container-fluid">
<div class="row">
<form class="book_now" method="POST" action="">
<div class="col-md-12">
<span style="display:inline;">Name : </span>
<input class="online_book" type="text" name="name" value="<?php echo htmlspecialchars($name); ?>" readonly>
</div>
<div class="col-md-12">
<span style="display:inline;">Email :</span>
<input class="online_book" type="email" name="email" value="<?php echo htmlspecialchars($email); ?>" readonly>
</div>
<div class="col-md-12">
<span style="display:inline;">Entry or Exit :</span>
<label> <input type="radio" name="track" checked value="yes"> Entry </label>
<label> <input type="radio" name="track" value="no"> Exit </label>
</div>
<div class="col-md-12">
<button type="submit" class="book_btn" name="submit">Submit</button>
</div>
</form>
</div>
</div>
</div>
</div>
<?php include("includes/footer.php"); ?>
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/jquery-3.0.0.min.js"></script>
<script src="assets/js/jquery.mCustomScrollbar.concat.min.js"></script>
<script src="assets/js/custom.js"></script>
</body>
</html>