-
Notifications
You must be signed in to change notification settings - Fork 2
/
rentCarForm.php
290 lines (264 loc) · 10.6 KB
/
rentCarForm.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<!-- This file has been downloaded from Bootsnipp.com. Enjoy! -->
<title>Member Rent Car Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet">
<style type="text/css">
@import url('https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css');
@media(min-width:768px) {
body {
margin-top: 50px;
}
/*html, body, #wrapper, #page-wrapper {height: 100%; overflow: hidden;}*/
}
#wrapper {
padding-left: 0;
}
/*#page-wrapper {
width: 100%;
padding: 0;
background-color: #fff;
}*/
@media(min-width:768px) {
#wrapper {
padding-left: 225px;
}
#page-wrapper {
padding: 22px 10px;
}
}
/* Top Navigation */
.top-nav {
padding: 0 15px;
}
.top-nav>li {
display: inline-block;
float: left;
}
.top-nav>li>a {
padding-top: 20px;
padding-bottom: 20px;
line-height: 20px;
color: #fff;
}
.top-nav>li>a:hover,
.top-nav>li>a:focus,
.top-nav>.open>a,
.top-nav>.open>a:hover,
.top-nav>.open>a:focus {
color: #fff;
background-color: #1a242f;
}
.top-nav>.open>.dropdown-menu {
float: left;
position: absolute;
margin-top: 0;
/*border: 1px solid rgba(0,0,0,.15);*/
border-top-left-radius: 0;
border-top-right-radius: 0;
background-color: #fff;
-webkit-box-shadow: 0 6px 12px rgba(0,0,0,.175);
box-shadow: 0 6px 12px rgba(0,0,0,.175);
}
.top-nav>.open>.dropdown-menu>li>a {
white-space: normal;
}
/* Side Navigation */
@media(min-width:768px) {
.side-nav {
position: fixed;
top: 60px;
left: 225px;
width: 225px;
margin-left: -225px;
border: none;
border-radius: 0;
border-top: 1px rgba(0,0,0,.5) solid;
overflow-y: auto;
background-color: #222;
/*background-color: #5A6B7D;*/
bottom: 0;
overflow-x: hidden;
padding-bottom: 40px;
}
.side-nav>li>a {
width: 225px;
border-bottom: 1px rgba(0,0,0,.3) solid;
}
.side-nav li a:hover,
.side-nav li a:focus {
outline: none;
background-color: #1a242f !important;
}
}
.side-nav>li>ul {
padding: 0;
border-bottom: 1px rgba(0,0,0,.3) solid;
}
.side-nav>li>ul>li>a {
display: block;
padding: 10px 15px 10px 38px;
text-decoration: none;
/*color: #999;*/
color: #fff;
}
.side-nav>li>ul>li>a:hover {
color: #fff;
}
.navbar .nav > li > a > .label {
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
position: absolute;
top: 14px;
right: 6px;
font-size: 10px;
font-weight: normal;
min-width: 15px;
min-height: 15px;
line-height: 1.0em;
text-align: center;
padding: 2px;
}
.navbar .nav > li > a:hover > .label {
top: 10px;
}
.navbar-brand {
padding: 5px 15px;
}
body {
background: url("assets/img/hero-bg.jpg") no-repeat center center fixed;
background-size: cover;
}
</style>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
</head>
<body>
<?php
session_start();
if(!isset($_SESSION["email"]) && $_SESSION["password"] != "") {
header("location: index.html");
}
include "user.php";
$userID = $_SESSION["userID"];
$email = getEmail();
$username = getUsername();
$contactNumber = getContactNumber();
include "car.php";
$qry = getCarInformationToRent();
$row = mysqli_fetch_assoc($qry);
$plateNumber = $row["plateNumber"];
$carName = $row["carName"];
$brand = $row["brand"];
$colour = $row["colour"];
$year = $row["year"];
?>
<div id="throbber" style="display:none; min-height:120px;"></div>
<div id="noty-holder"></div>
<div id="wrapper">
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="memberHomepage.php">
<img src="http://placehold.it/200x50&text=HOME" alt="LOGO">
</a>
</div>
<!-- Top Menu Items -->
<ul class="nav navbar-right top-nav">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Member User <b class="fa fa-angle-down"></b></a>
<ul class="dropdown-menu">
<li><a href="profile.php"><i class="fa fa-fw fa-user"></i> Edit Profile</a></li>
<li class="divider"></li>
<li><a href="index.html"><i class="fa fa-fw fa-power-off"></i> Logout</a></li>
</ul>
</li>
</ul>
<!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav side-nav">
<li>
<a href="memberCarList.php"><i class="fa fa-fw fa-car"></i> Car List</a>
</li>
<li>
<a href="memberBookingList.php"><i class="fa fa-fw fa-book"></i> Booking List</a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</nav>
<div id="page-wrapper">
<div class="container-fluid">
<!-- Page Heading -->
<div class="row" id="main">
<div class="col-sm-4 col-md-6 well well-sm" style="background-color: #343A40; color: white; text-align: center; border-radius: 5px; box-shadow: 2px 2px 5px #000000" id="content">
<h1 style="text-shadow: 2px 2px 5px #000000">Location</h1>
<iframe class="mb-4 mb-lg-0" src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d7968.133560232437!2d101.755948!3d3.076843!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0xf4a4c4afb051143a!2sPUBLIC%20AUTO%20WORLD%20SDN%20BHD!5e0!3m2!1sen!2sus!4v1596375673300!5m2!1sen!2sus" frameborder="0" style="border:0; width: 100%; height: 350px;" allowfullscreen></iframe>
</div>
<div class="col-sm-4 col-md-6 well well-sm" style="background-color: #343A40; color: white; text-align: center; border-radius: 5px; box-shadow: 2px 2px 5px #000000">
<h1 style="text-shadow: 2px 2px 5px #000000">Car Information</h1>
<?php
echo '<form action="processCar.php" method="post">';
echo '<p style="text-shadow: 2px 2px 5px #000000; font-size: 24px; padding-right: 7px">Plate: <input class="text-muted" type="text" name="plateNumber" value="'.$plateNumber.'" readonly>';
echo '<p style="text-shadow: 2px 2px 5px #000000; font-size: 24px; padding-right: 19px">Name: <input class="text-muted" type="text" name="carName" value="'.$carName.'" readonly>';
echo '<p style="text-shadow: 2px 2px 5px #000000; font-size: 24px; padding-right: 18px">Brand: <input class="text-muted" type="text" name="brand" value="'.$brand.'" readonly>';
echo '<p style="text-shadow: 2px 2px 5px #000000; font-size: 24px; padding-right: 25px">Colour: <input class="text-muted" type="text" name="colour" value="'.$colour.'" readonly>';
echo '<p style="text-shadow: 2px 2px 5px #000000; font-size: 24px; padding-left: 0px">Year: <input class="text-muted" type="text" name="year" value="'.$year.'" readonly>';
echo '</form>';
?>
</div>
</div>
<!-- /.row -->
<div class="row">
<div class="col-sm-7 col-md-7">
<div class="container">
</div>
</div>
<div class="col-sm-4 col-md-4 well well-sm" style="background-color: #343A40; color: white; text-align: center; border-radius: 5px; box-shadow: 2px 2px 5px #000000">
<h1 style="text-shadow 2px 2px 5px #000000">Rent</h1>
<?php
echo '<form action="processCar.php" method="post" style="color: black">';
echo '<input type="hidden" name="plateNumber" value="'.$plateNumber.'" readonly>';
echo '<input type="hidden" name="carName" value="'.$carName.'" readonly>';
echo '<input type="hidden" name="brand" value="'.$brand.'" readonly>';
echo '<input type="hidden" name="colour" value="'.$colour.'" readonly>';
echo '<input type="hidden" name="year" value="'.$year.'" readonly>';
echo '<input type="date" name="rentDate">';
echo '<input type="hidden" name="userID" value="'.$userID.'" readonly>';
echo '<input type="hidden" name="email" value="'.$email.'" readonly>';
echo '<input type="hidden" name="username" value="'.$username.'" readonly>';
echo '<input type="hidden" name="contactNumber" value="'.$contactNumber.'" readonly>';
echo '<button type="submit" class="btn btn-primary" style="width: 85%; margin-top: 25px" name="rentButton">Rent</button>';
echo '</form>';
?>
</div>
</div>
</div>
<!-- /.container-fluid -->
</div>
<!-- /#page-wrapper -->
</div><!-- /#wrapper -->
<script type="text/javascript">
$(function(){
$('[data-toggle="tooltip"]').tooltip();
$(".side-nav .collapse").on("hide.bs.collapse", function() {
$(this).prev().find(".fa").eq(1).removeClass("fa-angle-right").addClass("fa-angle-down");
});
$('.side-nav .collapse').on("show.bs.collapse", function() {
$(this).prev().find(".fa").eq(1).removeClass("fa-angle-down").addClass("fa-angle-right");
});
})
</script>
</body>
</html>