-
Notifications
You must be signed in to change notification settings - Fork 0
/
vehicles.php
executable file
·228 lines (200 loc) · 10.4 KB
/
vehicles.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
<?php session_start(); require('connectToDatabase.php');
if(isset($_SESSION['email']))
{
$sql = $connection->prepare('SELECT * FROM Clients WHERE email = :email');
$sql->bindParam(":email",$_SESSION["email"]);
$sql->execute();
$result = $sql->fetch();
$isUserApproved = $result["Approuve"];
}
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<title>Carbook - Free Bootstrap 4 Template by Colorlib</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://fonts.googleapis.com/css?family=Poppins:200,300,400,500,600,700,800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/open-iconic-bootstrap.min.css">
<link rel="stylesheet" href="css/animate.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/magnific-popup.css">
<link rel="stylesheet" href="css/aos.css">
<link rel="stylesheet" href="css/ionicons.min.css">
<link rel="stylesheet" href="css/bootstrap-datepicker.css">
<link rel="stylesheet" href="css/jquery.timepicker.css">
<link rel="stylesheet" href="css/flaticon.css">
<link rel="stylesheet" href="css/icomoon.css">
<link rel="stylesheet" href="css/style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="moment.js"></script>
<script>
// set an element
let startDate = moment().format('YYYY-MM-DD');
moment().add(10, 'days').calendar();
let endDate = moment().format('YYYY-MM-DD');
console.log(startDate, endDate);
$(function() {$('input[name="daterange"]').daterangepicker({opens: 'left'}, function(start, end, label)
{
startDate = start.format('YYYY-MM-DD') ;
endDate = end.format('YYYY-MM-DD') ;
let result = $.get("ajaxphp/findVehicles.php?model="+$("#vehiclesSearchBar").val()+"&startDate="+startDate+"&endDate="+endDate, function(data, status)
{
$("#carlist").html(data);
});
});
});
$(document).ready(function()
{
$("#vehiclesSearchBar").keyup(function(){
let result = $.get("ajaxphp/findVehicles.php?model="+$("#vehiclesSearchBar").val()+"&startDate="+startDate+"&endDate="+endDate, function(data, status)
{
$("#carlist").html(data);
}
);
});
});
</script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark ftco_navbar bg-dark ftco-navbar-light" id="ftco-navbar">
<div class="container">
<a class="navbar-brand" href="index.php">Fe<span>nicia</span></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#ftco-nav" aria-controls="ftco-nav" aria-expanded="false" aria-label="Toggle navigation">
<span class="oi oi-menu"></span> Menu
</button>
<div class="collapse navbar-collapse" id="ftco-nav">
<ul class="navbar-nav ml-auto">
<li class="nav-item active"><a href="index.php" class="nav-link">Accueil</a></li>
<li class="nav-item"><a href="vehicles.php" class="nav-link">Véhicules</a></li>
<?php if(isset($_SESSION["isAdmin"]) and $_SESSION["isAdmin"] == 1){ ?>
<li class="nav-item"><a href="panel.php" class="nav-link">Panel d'administration des véhicules</a></li>
<li class="nav-item"><a href="applications.php" class="nav-link">Dossiers en attente</a></li>
<?php } ?>
<?php if(!isset($_SESSION['email'])){ ?> <li class="nav-item"><a href="login.php" class="nav-link">Se connecter</a></li> <?php }
else { ?>
<li class="nav-item"><a href="profile.php" class="nav-link">Mon profil</a></li>
<li class="nav-item"><a href="logout.php" class="nav-link">Se déconnecter</a></li>
<?php } ?>
</ul>
</div>
</div>
</nav>
<!-- END nav -->
<section class="hero-wrap hero-wrap-2 js-fullheight" style="background-image: url('images/bg_3.jpg');" data-stellar-background-ratio="0.5">
<div class="overlay"></div>
<div class="container">
<div class="row no-gutters slider-text js-fullheight align-items-end justify-content-start">
<div class="col-md-9 ftco-animate pb-5">
<p class="breadcrumbs"><span class="mr-2"><a href="index.php">Accueil <i class="ion-ios-arrow-forward"></i></a></span> <span>Tarifs <i class="ion-ios-arrow-forward"></i></span><p>
<h1 class="mb-3 bread">Tarifs</h1>
<form>
<div class="input-group rounded">
<input id="vehiclesSearchBar" type="search" class="form-control rounded" placeholder="Rechercher un véhicule par modèle ou par marque" aria-label="Search" aria-describedby="search-addon"/>
<input type="text" name="daterange" value="01/01/2022 - 01/15/2050" />
<i class="fas fa-search"></i>
</span>
</div>
</form>
</div>
</div>
</div>
</section>
<section class="ftco-section ftco-cart">
<div class="container">
<div class="row">
<div class="col-md-12 ftco-animate">
<div class="car-list">
<table class="table" id="carlist">
</table>
</div>
</div>
</div>
</div>
</section>
<footer class="ftco-footer ftco-bg-dark ftco-section">
<div class="container">
<div class="row mb-5">
<div class="col-md">
<div class="ftco-footer-widget mb-4">
<h2 class="ftco-heading-2"><a href="#" class="logo">Car<span>book</span></a></h2>
<p>Nous croyons qu'il faut rendre la location de voitures facile, pratique et abordable pour tous.Nous nous engageons à offrir à nos clients la meilleure expérience possible.</p>
<ul class="ftco-footer-social list-unstyled float-md-left float-lft mt-5">
<li class="ftco-animate"><a href="#"><span class="icon-twitter"></span></a></li>
<li class="ftco-animate"><a href="#"><span class="icon-facebook"></span></a></li>
<li class="ftco-animate"><a href="#"><span class="icon-instagram"></span></a></li>
</ul>
</div>
</div>
<div class="col-md">
<div class="ftco-footer-widget mb-4 ml-md-5">
<h2 class="ftco-heading-2">Informations</h2>
<ul class="list-unstyled">
<li><a href="#" class="py-2 d-block">About</a></li>
<li><a href="#" class="py-2 d-block">Services</a></li>
<li><a href="#" class="py-2 d-block">Term and Conditions</a></li>
<li><a href="#" class="py-2 d-block">Best Price Guarantee</a></li>
<li><a href="#" class="py-2 d-block">Privacy & Cookies Policy</a></li>
</ul>
</div>
</div>
<div class="col-md">
<div class="ftco-footer-widget mb-4">
<h2 class="ftco-heading-2">Support client</h2>
<ul class="list-unstyled">
<li><a href="#" class="py-2 d-block">FAQ</a></li>
<li><a href="#" class="py-2 d-block">Payment Option</a></li>
<li><a href="#" class="py-2 d-block">Booking Tips</a></li>
<li><a href="#" class="py-2 d-block">How it works</a></li>
<li><a href="#" class="py-2 d-block">Contact Us</a></li>
</ul>
</div>
</div>
<div class="col-md">
<div class="ftco-footer-widget mb-4">
<h2 class="ftco-heading-2">Vous avez une question ?</h2>
<div class="block-23 mb-3">
<ul>
<li><span class="icon icon-map-marker"></span><span class="text">203 Fake St. Mountain View, San Francisco, California, USA</span></li>
<li><a href="#"><span class="icon icon-phone"></span><span class="text">+2 392 3929 210</span></a></li>
<li><a href="#"><span class="icon icon-envelope"></span><span class="text">[email protected]</span></a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 text-center">
<p><!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. -->
Copyright ©<script>document.write(new Date().getFullYear());</script> All rights reserved | This template is made with <i class="icon-heart color-danger" aria-hidden="true"></i> by <a href="https://colorlib.com" target="_blank">Colorlib</a>
<!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. --></p>
</div>
</div>
</div>
</footer>
<!-- loader -->
<div id="ftco-loader" class="show fullscreen"><svg class="circular" width="48px" height="48px"><circle class="path-bg" cx="24" cy="24" r="22" fill="none" stroke-width="4" stroke="#eeeeee"/><circle class="path" cx="24" cy="24" r="22" fill="none" stroke-width="4" stroke-miterlimit="10" stroke="#F96D00"/></svg></div>
<script src="js/jquery.min.js"></script>
<script src="js/jquery-migrate-3.0.1.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.easing.1.3.js"></script>
<script src="js/jquery.waypoints.min.js"></script>
<script src="js/jquery.stellar.min.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script src="js/jquery.magnific-popup.min.js"></script>
<script src="js/aos.js"></script>
<script src="js/jquery.animateNumber.min.js"></script>
<script src="js/bootstrap-datepicker.js"></script>
<script src="js/jquery.timepicker.min.js"></script>
<script src="js/scrollax.min.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBVWaKrjvy3MaE7SQ74_uJiULgl1JY0H2s&sensor=false"></script>
<script src="js/google-map.js"></script>
<script src="js/main.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/jquery/latest/jquery.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" />
</body>
</html>