-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.php
278 lines (258 loc) · 11.6 KB
/
index.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
<!DOCTYPE html>
<html>
<?php
session_start();
require 'connection.php';
$conn = Connect();
?>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Patna Car Rental</title>
<link rel="shortcut icon" type="image/png" href="assets/img/P.png">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/fonts/font-awesome.min.css">
<link rel="stylesheet" href="assets/css/user.css">
<link rel="stylesheet" href="assets/w3css/w3.css">
<link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,700,400italic,700italic" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
</head>
<body id="page-top" data-spy="scroll" data-target=".navbar-fixed-top">
<!-- Navigation -->
<nav class="navbar navbar-custom navbar-fixed-top" role="navigation" style="color: black">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse">
<i class="fa fa-bars"></i>
</button>
<a class="navbar-brand page-scroll" href="index.php">
PATNA CAR RENTAL </a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<?php
if(isset($_SESSION['login_client'])){
?>
<div class="collapse navbar-collapse navbar-right navbar-main-collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.php">Home</a>
</li>
<li>
<a href="#"><span class="glyphicon glyphicon-user"></span> Welcome <?php echo $_SESSION['login_client']; ?></a>
</li>
<li>
<ul class="nav navbar-nav navbar-right">
<li><a href="#" class="dropdown-toggle active" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="glyphicon glyphicon-user"></span> Control Panel <span class="caret"></span> </a>
<ul class="dropdown-menu">
<li> <a href="entercar.php">Add Car</a></li>
<li> <a href="enterdriver.php"> Add Driver</a></li>
<li> <a href="clientview.php">View</a></li>
</ul>
</li>
</ul>
</li>
<li>
<a href="logout.php"><span class="glyphicon glyphicon-log-out"></span> Logout</a>
</li>
</ul>
</div>
<?php
}
else if (isset($_SESSION['login_customer'])){
?>
<div class="collapse navbar-collapse navbar-right navbar-main-collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.php">Home</a>
</li>
<li>
<a href="#"><span class="glyphicon glyphicon-user"></span> Welcome <?php echo $_SESSION['login_customer']; ?></a>
</li>
<ul class="nav navbar-nav">
<li><a href="#" class="dropdown-toggle active" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> Garagge <span class="caret"></span> </a>
<ul class="dropdown-menu">
<li> <a href="prereturncar.php">Return Now</a></li>
<li> <a href="mybookings.php"> My Bookings</a></li>
</ul>
</li>
</ul>
<li>
<a href="logout.php"><span class="glyphicon glyphicon-log-out"></span> Logout</a>
</li>
</ul>
</div>
<?php
}
else {
?>
<div class="collapse navbar-collapse navbar-right navbar-main-collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.php">Home</a>
</li>
<li>
<a href="clientlogin.php">Client</a>
</li>
<li>
<a href="customerlogin.php">Customer</a>
</li>
<li>
<a href="faq/index.php"> FAQ </a>
</li>
</ul>
</div>
<?php }
?>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<div class="bgimg-1">
<header class="intro">
<div class="intro-body">
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<h1 class="brand-heading" style="color: white">PATNA CAR RENTAL</h1>
<p class="intro-text">
Online car rental service
</p>
<a href="#sec2" class="btn btn-circle page-scroll blink">
<i class="fa fa-angle-double-down animated"></i>
</a>
</div>
</div>
</div>
</div>
</header>
</div>
<div id="sec2" style="color: #777;background-color:white;text-align:center;padding:50px 80px;text-align: justify;">
<h3 style="text-align:center;">Currently Available Cars</h3>
<br>
<section class="menu-content">
<?php
$sql1 = "SELECT * FROM cars WHERE car_availability='yes'";
$result1 = mysqli_query($conn,$sql1);
if(mysqli_num_rows($result1) > 0) {
while($row1 = mysqli_fetch_assoc($result1)){
$car_id = $row1["car_id"];
$car_name = $row1["car_name"];
$ac_price = $row1["ac_price"];
$ac_price_per_day = $row1["ac_price_per_day"];
$non_ac_price = $row1["non_ac_price"];
$non_ac_price_per_day = $row1["non_ac_price_per_day"];
$car_img = $row1["car_img"];
?>
<a href="booking.php?id=<?php echo($car_id) ?>">
<div class="sub-menu">
<img class="card-img-top" src="<?php echo $car_img; ?>" alt="Card image cap">
<h5> <?php echo $car_name; ?> </h5>
<h6> AC Fare: <?php echo ("₹" . $ac_price . "/km & ₹" . $ac_price_per_day . "/day"); ?></h6>
<h6> Non-AC Fare: <?php echo ("₹" . $non_ac_price . "/km & ₹" . $non_ac_price_per_day . "/day"); ?></h6>
</div>
</a>
<?php }}
else {
?>
<h1> No cars available :( </h1>
<?php
}
?>
</section>
</div>
<div class="bgimg-2">
<div class="caption">
<span class="border" style="background-color:transparent;font-size:25px;color: #f7f7f7;"></span>
</div>
</div>
<div style="position:relative;">
<div style="color:#ddd;background-color:#282E34;text-align:center;padding:50px 80px;text-align: justify;">
<p>Click here for the latest deals on your bookings</p>
</div>
</div>
<!-- Container (Contact Section) -->
<div class="w3-content w3-container w3-padding-64" id="contact">
<h3 class="w3-center">WHERE WE WORK</h3>
<p class="w3-center"><em>We love your feedback!</em></p>
<div class="w3-row w3-padding-32 w3-section">
<div class="w3-col m4 w3-container">
<!-- Add Google Maps -->
<div id="googleMap" class="w3-round-large w3-greyscale" style="width:100%;height:400px;"></div>
</div>
<div class="w3-col m8 w3-panel">
<div class="w3-large w3-margin-bottom">
<i class="fa fa-map-marker fa-fw w3-hover-text-black w3-xlarge w3-margin-right"></i> Patna, India<br>
<i class="fa fa-phone fa-fw w3-hover-text-black w3-xlarge w3-margin-right"></i> Phone: +91 8132044768<br>
<i class="fa fa-envelope fa-fw w3-hover-text-black w3-xlarge w3-margin-right"></i> Email: aminnikhil073@gmail.com<br>
</div>
<p>New to Patna ? Drop Your Details and Leave it on us We'll Revert</p>
<form action="action_page.php" method="POST">
<div class="w3-row-padding" style="margin:0 -16px 8px -16px">
<div class="w3-half">
<input class="w3-input w3-border" type="text" placeholder="Name" required name="name">
</div>
<div class="w3-half">
<input class="w3-input w3-border" type="text" placeholder="Email" required name="e_mail">
</div>
</div>
<input class="w3-input w3-border" type="text" placeholder="Message" required name="message">
<button class="w3-button w3-black w3-right w3-section" type="submit">
<i class="fa fa-paper-plane"></i> SEND MESSAGE
</button>
</form>
</div>
</div>
</div>
<footer class="site-footer">
<div class="container">
<hr>
<div class="row">
<div class="col-sm-6">
<h5>© 2018 Patna Car Rental</h5>
</div>
<div class="col-sm-6 social-icons">
<a href="#" target="_blank"><i class="fa fa-facebook"></i></a>
<a href="#" target="_blank"><i class="fa fa-twitter"></i></a>
<a href="#" target="_blank"><i class="fa fa-instagram"></i></a>
<a href="#" target="_blank"><i class="fa fa-google-plus"></i></a>
</div>
</div>
</div>
</footer>
<script>
function myMap() {
myCenter = new google.maps.LatLng(25.614744, 85.128489);
var mapOptions = {
center: myCenter,
zoom: 12,
scrollwheel: true,
draggable: true,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("googleMap"), mapOptions);
var marker = new google.maps.Marker({
position: myCenter,
});
marker.setMap(map);
}
</script>
<script>
function sendGaEvent(category, action, label) {
ga('send', {
hitType: 'event',
eventCategory: category,
eventAction: action,
eventLabel: label
});
};
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCCuoe93lQkgRaC7FB8fMOr_g1dmMRwKng&callback=myMap" type="text/javascript"></script>
<script src="assets/js/jquery.min.js"></script>
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
<!-- Plugin JavaScript -->
<script src="assets/js/jquery.easing.min.js"></script>
<!-- Custom Theme JavaScript -->
<script src="assets/js/theme.js"></script>
</body>
</html>