-
Notifications
You must be signed in to change notification settings - Fork 2
/
manage.php
281 lines (220 loc) · 9.1 KB
/
manage.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
<?php
include("connection.php");
if(isset($_POST['pass_id'])){
$id = $_POST['pass_id'];
$password = $_POST['password'];
$result = mysqli_query("select * from pass where id = '$id'");
$row = mysqli_fetch_array($result);
if($row['password']!=$password)
{
header("Location: manage2.php");
}
$body="initial";
} else {
$id="";
$body="none";
}
?>
<html>
<head>
<title>Cloud Based Bus Pass System</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:200,300,400,700,900|Display+Playfair:200,300,400,700">
<link rel="stylesheet" href="fonts/icomoon/style.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/magnific-popup.css">
<link rel="stylesheet" href="css/jquery-ui.css">
<link rel="stylesheet" href="css/owl.carousel.min.css">
<link rel="stylesheet" href="css/owl.theme.default.min.css">
<link rel="stylesheet" href="css/bootstrap-datepicker.css">
<link rel="stylesheet" href="fonts/flaticon/font/flaticon.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/build/mediaelementplayer.min.css">
<link rel="stylesheet" href="css/aos.css">
<link rel="stylesheet" href="css/style.css">
<style>
.pass_body{
display: <?php echo $body; ?>;
}
@media print {
.print {
display: none;
}
footer{
display: none;
}
}
</style>
</head>
<body>
<div class="site-wrap">
<div class="site-mobile-menu">
<div class="site-mobile-menu-header">
<div class="site-mobile-menu-close mt-3">
<span class="icon-close2 js-menu-toggle"></span>
</div>
</div>
<div class="site-mobile-menu-body"></div>
</div>
<header class="site-navbar py-1" role="banner">
<div class="container">
<div class="row align-items-center">
<div class="col-6 col-xl-2">
<h1 class="mb-0"><a href="index.html" class="text-black h2 mb-0">Travelers</a></h1>
</div>
<div class="col-10 col-md-8 d-none d-xl-block">
<nav class="site-navigation position-relative text-right" role="navigation">
<ul class="site-menu js-clone-nav mx-auto d-none d-lg-block">
<li class="active">
<a href="index.html">Home</a>
</li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact</a></li>
<li><a href="manage.php">Manage Pass</a></li>
<li><a href="bus_details.html">Bus Details</a></li>
</ul>
</nav>
</div>
</div>
</div>
</header>
<div class="site-blocks-cover inner-page-cover print" style="background-image: url(images/hero_bg_2.jpg);" data-aos="fade" data-stellar-background-ratio="0.5">
<div class="container">
<div class="row align-items-center justify-content-center text-center">
<div class="col-md-8" data-aos="fade-up" data-aos-delay="400">
<h1 class="text-white font-weight-light">Manage Pass</h1>
<div><a href="index.html">Home</a> <span class="mx-2 text-white">•</span> <span class="text-white">Mange Pass</span></div>
</div>
</div>
</div>
</div>
<left>
<form class="print" action="manage.php" method="post" style="margin-top:75px; margin-left: 75px">
ID: <input type="text" id="pass_id" style="height:35px; margin-right: 15px;" name="pass_id" value="<?php echo $id; ?>" required>
PASSWORD: <input type="password" id="pass_id" style="height:35px;" name="password" required> <input type="submit" class="btn btn-primary py-1 px-5 text-white" value="Search">
</form>
</left>
<br/>
<div class="pass_body">
<div class="site-section bg-light">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="p-4 mb-3 bg-white">
<p class="mb-0 font-weight-bold" style="float: left;">Id    </p>
<p class="mb-4">
<?php
echo $row['id'];
?>
</p>
<p class="mb-0 font-weight-bold" style="float: left;">Name    </p>
<p class="mb-4">
<?php
echo $row['name'];
?>
</p>
<p class="mb-0 font-weight-bold" style="float: left;">Mobile    </p>
<p class="mb-4">
<?php
echo $row['contact'];
?>
</p>
<p class="mb-0 font-weight-bold" style="float: left;">Email Address    </p>
<p class="mb-4">
<?php
echo $row['email'];
?>
</p>
<div>
<p class="mb-0 font-weight-bold" style="float: left;">Valid Till    </p>
<p class="mb-4">
<?php
echo $row['date'];
?>
</p>
<form class="print" action="renew.php" method="post">
<input type="hidden" name="id" value="<?php echo $id; ?>">
<input type="date" style="margin-right: 75px; width:200px; height:35px" min="<?php echo $row['date']; ?>" required name="new_date">
<input type="submit" class="btn btn-primary py-1 px-5 text-white" style="width: 200px" value="Renew Pass">
</form>
</div>
<p class="mb-0 font-weight-bold" style="float: left;">From - To    </p>
<p class="mb-4">
GLA University -
<?php
echo $row['dest'];
?>
</p>
<p class="mb-0 font-weight-bold" style="float: left;">Amount Paid    </p>
<p class="mb-4">
<?php
echo $row['paid'];
?>
</p>
<table>
<tr>
<td>
<form class="print" action="suspend.php" method="post">
<input type="hidden" name="id" value="<?php echo $id; ?>">
<input type="submit" style="width: 200px" class="btn btn-primary py-1 px-5 text-white" value="Suspend Pass">
</form>
</td>
<td>
<button class="print btn btn-primary py-1 px-5 text-white" style="width: 200px; margin-bottom:15px; margin-left: 75px;" onclick="window.print()">Print Pass</button>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<footer class="site-footer">
<div class="container">
<div class="row">
<div class="col-lg-4">
<div class="mb-5">
<h3 class="footer-heading mb-4">About Travelers</h3>
<p>Provides student a pass for their daily life to travel to/from GLA University, Mathura</p>
</div>
</div>
<div class="col-lg-4 mb-5 mb-lg-0" style="margin-left: auto;">
<div class="row mb-5">
<div class="col-md-12">
<h3 class="footer-heading mb-4">Navigations</h3>
</div>
<div class="col-md-6 col-lg-6">
<ul class="list-unstyled">
<li><a href="#">Home</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="row pt-5 mt-5 text-center">
<div class="col-md-12">
<p>
Copyright ©<script>document.write(new Date().getFullYear());</script> All rights reserved
</p>
</div>
</div>
</div>
</footer>
</div>
<script src="js/jquery-3.3.1.min.js"></script>
<script src="js/jquery-migrate-3.0.1.min.js"></script>
<script src="js/jquery-ui.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script src="js/jquery.stellar.min.js"></script>
<script src="js/jquery.countdown.min.js"></script>
<script src="js/jquery.magnific-popup.min.js"></script>
<script src="js/bootstrap-datepicker.min.js"></script>
<script src="js/aos.js"></script>
<script src="js/main.js"></script>
</body>
</html>