-
Notifications
You must be signed in to change notification settings - Fork 0
/
carlist.php
335 lines (313 loc) · 15.7 KB
/
carlist.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
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
<?php
session_start();
?>
<!DOCTYPE html>
<html lang="zxx">
<head>
<meta charset="UTF-8">
<meta name="description" content="Ashion Template">
<meta name="keywords" content="Ashion, unica, creative, html">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>WOW - Car List</title>
<!-- Google Font -->
<link href="https://fonts.googleapis.com/css2?family=Cookie&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap"
rel="stylesheet">
<!-- Css Styles -->
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="css/font-awesome.min.css" type="text/css">
<link rel="stylesheet" href="css/elegant-icons.css" type="text/css">
<link rel="stylesheet" href="css/jquery-ui.min.css" type="text/css">
<link rel="stylesheet" href="css/magnific-popup.css" type="text/css">
<link rel="stylesheet" href="css/owl.carousel.min.css" type="text/css">
<link rel="stylesheet" href="css/slicknav.min.css" type="text/css">
<link rel="stylesheet" href="css/style.css" type="text/css">
</head>
<body>
<!-- Page Preloder -->
<div id="preloder">
<div class="loader"></div>
</div>
<!-- -->
<!-- Offcanvas Menu Begin -->
<div class="offcanvas-menu-overlay"></div>
<div class="offcanvas-menu-wrapper">
<div class="offcanvas__close">+</div>
<ul class="offcanvas__widget">
<li><span class="icon_search search-switch"></span></li>
</ul>
<div class="offcanvas__logo">
<a href="./index.php"><img src="img/logo.jpg" alt=""></a>
</div>
<div id="mobile-menu-wrap"></div>
<div class="offcanvas__auth">
<?php
if (isset($_SESSION['name']))
{
print "Welcome, ".$_SESSION['name'];
}
?>
</div>
</div>
<!-- Offcanvas Menu End -->
<!-- Header Section Begin -->
<header class="header">
<div class="container-fluid">
<div class="row">
<div class="col-xl-3 col-lg-2">
<div class="header__logo">
<a href="./index.php"><img src="img/logo.jpg" alt=""></a>
</div>
</div>
<div class="col-xl-6 col-lg-7">
<nav class="header__menu">
<center>
<ul>
<li ><a href="./index.php">Home</a></li>
<li><a href="#">About Us</a></li>
<li class="active"><a href="carlist.php?filter=">Car List</a></li>
<li><a href="./shop.html">Contact</a></li>
<li><a href="./blog.html">Gallery</a></li>
</ul>
</center>
</nav>
</div>
<div class="col-lg-3">
<div class="header__right">
<div class="header__right__auth">
<?php
if (isset($_SESSION['name']))
{
print "Welcome, ".$_SESSION['name'];
}
?>
</div>
<ul class="header__right__widget">
<li><span class="icon_search search-switch"></span></li>
</ul>
</div>
</div>
</div>
<div class="canvas__open">
<i class="fa fa-bars"></i>
</div>
</div>
</header>
<!-- Header Section End -->
<!-- Breadcrumb Begin -->
<div class="breadcrumb-option">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="breadcrumb__links">
<a href="./index.php"><i class="fa fa-home"></i> Home</a>
<span>Car List</span>
</div>
</div>
</div>
</div>
</div>
<!-- Breadcrumb End -->
<?php
$conn = new mysqli('localhost','root','','pds') or die(mysqli_error());
$search="";
// if($_GET["filter"]) {
// $search = $_GET["filter"];
// }
?>
<!-- Shop Section Begin -->
<section class="shop spad">
<div class="container">
<div class="row">
<div class="col-lg-3 col-md-3">
<div class="shop__sidebar">
<div class="sidebar__categories">
<div class="section-title">
<h4>Categories</h4>
</div>
<div class="categories__accordion">
<div class="accordion" id="accordionExample">
<div class="card">
<div class="card-heading">
<a data-toggle="collapse" data-target="#collapseTwo">Rental Cars</a>
</div>
<div id="collapseTwo" class="collapse" data-parent="#accordionExample">
<div class="card-body">
<ul>
<li><a href="carlist.php?filter=Small Car">Small Car</a></li>
<li><a href="carlist.php?filter=Mid-Size Car">Mid-Size Car</a></li>
<li><a href="carlist.php?filter=Luxury Car">Luxury Car</a></li>
<li><a href="carlist.php?filter=SUV">SUV</a></li>
<li><a href="carlist.php?filter=Premium SUV">Premium SUV</a></li>
</ul>
</div>
</div>
</div>
</div>
</div></div>
<div class="sidebar__filter">
<form method="get">
<div class="section-title">
<h4>Shop by price</h4>
</div>
<?php
$_SESSION['minamount'] = 499;
$_SESSION['maxamount'] = 4899;
if (!empty($_GET['min_price'])) {
$_SESSION['minamount'] = $_GET['min_price'];
}
if (!empty($_GET['max_price'])) {
$_SESSION['maxamount'] = $_GET['max_price'];
}
?>
<div class="filter-range-wrap">
<div class="price-range ui-slider ui-corner-all ui-slider-horizontal ui-widget ui-widget-content"
data-min="<?php echo $_SESSION['minamount']; ?>" data-max="<?php echo $_SESSION['maxamount'] ?>"></div>
<div class="range-slider">
<div class="price-input">
<p>Price:</p>
<input type="" id="minamount" name="min_price" value="<?php echo $_SESSION['minamount']; ?>">
<input type="" id="maxamount" name="max_price" value="<?php echo $_SESSION['maxamount']; ?>">
<input type="hidden" value="" name="filter"/>
</div>
</div>
</div>
<a href="carlist.php?filter="><input type="submit" class="btn-submit" value="Filter" style="border-radius: 10px; background-color: #ca1515; border:0px; color: white;text-align: left; padding:5px;" /></a>
</form>
</div>
<?php
$conn=mysqli_connect('localhost','root','','pds') or die(mysqli_error());
$res = mysqli_query($conn, "select * from ccn_vehicle");
$count = mysqli_num_rows($res);
?>
</div>
</div>
<div class="col-lg-9 col-md-9">
<div class="row">
<?php
while ($row = mysqli_fetch_array($res)) {
?>
<div class="col-lg-4 col-md-6">
<div class="product__item">
<?php
?>
<!-- <div class="product-listing-content">
<h5>Toyota Fortuner</h5>
<p class="list-price">$800 Per Day</p>
<ul>
<li><i class="fa fa-user" aria-hidden="true"></i>4 seats</li>
<li><i class="fa fa-calendar" aria-hidden="true"></i>2019 model</li>
<li><i class="fa fa-car" aria-hidden="true"></i>Petrol</li>
<li><i class="fa fa-tachometer" aria-hidden="true"></i>20 miles/day</li>
<li><i class="fa fa-usd" aria-hidden="true"></i>20 om fees/mile</li>
</ul>
<a href="#" >View Details <span class="angle_arrow"><i class="fa fa-angle-right" style="color: black " aria-hidden="true"></i></span></a>
</div> -->
<div class="product__item__pic set-bg"data-setbg="<?php echo $row["vimage1"]; ?>">
<form method="POST" action="cardetails.php?vin=<?php echo htmlentities($row['vin']);?>">
<ul class="product__hover">
<li ><a href="<?php echo $row["vimage1"]; ?>" style="background-color:#ca1515; color:white;" class="image-popup"><span class="arrow_expand" ></span></a></li>
<li>
<a href=""><input type="submit" id="atc" value="Add to Cart" style="border-radius: 10px; background-color: #ca1515; border:0px; color: white;text-align: left;" /></a>
</li>
</ul>
</div>
<div class="product__item__text">
<h6><?php echo $row["veh_make"].' '.$row["veh_model"]; ?></h6>
<div class="product__price">$800 Per Day<?php echo $row["price"]; ?></div>
<ul>
<i class="fa fa-user" aria-hidden="true"></i>4 seats
<i class="fa fa-calendar" aria-hidden="true"></i>2019 model
<i class="fa fa-car" aria-hidden="true"></i>Petrol
<i class="fa fa-tachometer" aria-hidden="true"></i>20 miles/day
<i class="fa fa-usd" aria-hidden="true"></i>20 om fees/mile
</ul>
<a href="#" >View Details <span class="angle_arrow"><i class="fa fa-angle-right" style="color: black " aria-hidden="true"></i></span></a>
<!-- <div class="pro-qty">
<input type="text" name="<?php echo $row["code"]; ?>_quantity" value="1">
</div> -->
</div>
</form>
</div>
</div>
<?php } ?>
<script>
function add_cart() {
var x = document.getElementById('add_cart_form').value;
x[0].submit();
}function func(e) {console.log(e.target.value);}
</script>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Shop Section End -->
<footer class="footer">
<div class="container">
<div class="row">
<div class="col-lg-4 col-md-6 col-sm-7">
<div class="footer__about">
<div class="footer__logo">
<a href="./index.php"><img src="img/logo.jpg" alt=""></a>
</div>
<p>Your ultimate destination for car rental needs, offering a versatile selection of vehicles to suit every preference and requirement</p>
<div class="footer__payment">
<a href="#"><img src="img/payment/payment-1.png" alt=""></a>
<a href="#"><img src="img/payment/payment-2.png" alt=""></a>
<a href="#"><img src="img/payment/payment-3.png" alt=""></a>
<a href="#"><img src="img/payment/payment-4.png" alt=""></a>
<a href="#"><img src="img/payment/payment-5.png" alt=""></a>
</div>
</div>
</div>
<div class="col-lg-2 col-md-3 col-sm-5">
<div class="footer__widget">
</div>
</div>
</div>
</footer>
<!-- Footer Section End -->
<!-- Search Begin -->
<div class="search-model">
<div class="h-100 d-flex align-items-center justify-content-center">
<div class="search-close-switch">+</div>
<form class="search-model-form" action="search-result.php?filter=" method="POST">
<input type="text" id="search-input" placeholder="Search here....." name='search-input'>
</form>
</div>
</div>
<!-- Search End -->
<script type="text/javascript">
$(function() {
$( "#range-slider" ).slider({
range: true,
minamount: 499,
maxamount: 4899,
values: [ <?php echo $minamount; ?>, <?php echo $maxamount; ?> ],
slide: function( event, ui ) {
$( "#amount" ).html( "$" + ui.values[ 0 ] + " - $" + ui.values[ 1 ] );
$( "#minamount" ).val(ui.values[ 0 ]);
$( "#maxamount" ).val(ui.values[ 1 ]);
}
});
$( "#amount" ).html( "$" + $( "#range-slider" ).slider( "values", 0 ) +
" - $" + $( "#range-slider" ).slider( "values", 1 ) );
});
</script>
<!-- Js Plugins -->
<script src="js/jquery-3.3.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.magnific-popup.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
<script src="js/mixitup.min.js"></script>
<script src="js/jquery.countdown.min.js"></script>
<script src="js/jquery.slicknav.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script src="js/jquery.nicescroll.min.js"></script>
<script src="js/main.js"></script>
</body>
</html>