Compare commits
10 Commits
avisTrajet
...
master
Author | SHA1 | Date |
---|---|---|
Flavien Haas | c139f83edf | 6 years ago |
PALAFFRE Raphaël | 0d256c60ef | 6 years ago |
PALAFFRE Raphaël | 6e0465379e | 6 years ago |
PALAFFRE Raphaël | 77796e4df8 | 6 years ago |
PALAFFRE Raphaël | 13064316fd | 6 years ago |
PALAFFRE Raphaël | 508c84a04f | 6 years ago |
PALAFFRE Raphaël | bd4163c5fa | 6 years ago |
PALAFFRE Raphaël | 7c73030e97 | 6 years ago |
PALAFFRE Raphaël | 598feef1f7 | 6 years ago |
PALAFFRE Raphaël | 65b1254997 | 6 years ago |
@ -1,46 +1,44 @@
|
|||||||
/*
|
/*General*/
|
||||||
Crée par PALAFFRE Raphael
|
|
||||||
Fonction: Lister les avis laisses
|
body {
|
||||||
Page CSS : avis_laisses.css
|
color:black;
|
||||||
*/
|
background-color:white;
|
||||||
|
background-image:url("../ressources/image/background.jpg");
|
||||||
body {
|
background-repeat:no-repeat;
|
||||||
color:black;
|
background-size:100%;
|
||||||
background-color:white;
|
margin: 0;
|
||||||
background-attachment: fixed;
|
font-family: Ubuntu,Helvetica,sans-serif;
|
||||||
background-image:url("../ressources/image/background.jpg");
|
}
|
||||||
background-size:cover;
|
|
||||||
margin: 0;
|
#container{
|
||||||
font-family: Ubuntu,Helvetica,sans-serif;
|
margin : 5% 5% 5% 5%;
|
||||||
}
|
background-color : white;
|
||||||
|
border : 2px solid black;
|
||||||
#container{
|
}
|
||||||
margin : 5% 5% 5% 5%;
|
|
||||||
background-color : white;
|
h1{
|
||||||
border : 2px solid black;
|
text-align : center;
|
||||||
}
|
font-size : 250%;
|
||||||
|
font-weight: bold;
|
||||||
h1{
|
}
|
||||||
text-align : center;
|
|
||||||
font-size : 250%;
|
h2{
|
||||||
font-weight: bold;
|
text-align : center;
|
||||||
}
|
font-size : 150%;
|
||||||
|
font-weight: bold;
|
||||||
h2{
|
}
|
||||||
text-align : center;
|
|
||||||
font-size : 150%;
|
/*Affichage avis*/
|
||||||
font-weight: bold;
|
|
||||||
}
|
#bouton_retour{
|
||||||
|
transform : rotate(45deg);
|
||||||
#bouton_retour{
|
}
|
||||||
transform : rotate(45deg);
|
|
||||||
}
|
.etoile{
|
||||||
|
height:50px;
|
||||||
.etoile{
|
}
|
||||||
height:50px;
|
|
||||||
}
|
.avis_tab{
|
||||||
|
width:85%;
|
||||||
.avis_tab{
|
padding-left:15%;
|
||||||
width:85%;
|
}
|
||||||
padding-left:15%;
|
|
||||||
}
|
|
||||||
|
@ -1,76 +1,81 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
//Importation des fichiers necessaires au fonctionnement
|
||||||
require_once ("../connexionBD.php");
|
session_start();
|
||||||
require_once ("../ressources/user.php");
|
require_once ("../connexionBD.php");
|
||||||
|
require_once ("../ressources/user.php");
|
||||||
//Si on est pas connecté redirection vers la page de connexion
|
|
||||||
if (!isset($_SESSION['mail'])) {
|
//Si on est pas connecté redirection vers la page de connexion
|
||||||
header('Location: ../index.php');
|
if (!isset($_SESSION['mail'])) {
|
||||||
exit();
|
header('Location: ../index.php');
|
||||||
}
|
exit();
|
||||||
$mail = $_SESSION['mail'];
|
}
|
||||||
|
|
||||||
$login = getLogin($db,$mail);
|
//Recuperation de la variables de session
|
||||||
|
$mail = $_SESSION['mail'];
|
||||||
$requete = "SELECT DISTINCT Avis.codetrajet, Utilisateur.login, Avis.commentaire, Avis.dateavis, Avis.note FROM Utilisateur, Avis, Trajet WHERE Avis.codetrajet = Trajet.codetrajet AND Avis.mailemetteur = $1 AND Trajet.mailproposition = Utilisateur.mail;";
|
|
||||||
$result = pg_query_params($db, $requete, array($mail));
|
$login = getLogin($db,$mail);
|
||||||
|
|
||||||
?>
|
|
||||||
|
//Création et envoie de la requete SQL
|
||||||
<!DOCTYPE html>
|
$requete = "SELECT DISTINCT Utilisateur.login, Avis.commentaire, Avis.dateavis, Avis.note FROM Utilisateur, Avis, Trajet WHERE Avis.mailemetteur = $1 AND Avis.mailemetteur = Utilisateur.mail;";
|
||||||
<html lang = "fr">
|
$result = pg_query_params($db, $requete, array($mail));
|
||||||
|
|
||||||
<head>
|
?>
|
||||||
<meta charset = "UTF-8">
|
|
||||||
<link rel = "stylesheet" href = "avis_laisses.css">
|
<!DOCTYPE html>
|
||||||
<link rel="icon" href="../ressources/favicon.ico" />
|
<html lang = "fr">
|
||||||
<link rel="stylesheet" href="../ressources/navbarhtml.css" />
|
|
||||||
<title>Avis Laissés</title>
|
<head>
|
||||||
</head>
|
<meta charset = "UTF-8">
|
||||||
|
<link rel = "stylesheet" href = "avis_laisses.css">
|
||||||
<body>
|
<link rel="icon" href="../ressources/favicon.ico" />
|
||||||
|
<link rel="stylesheet" href="../ressources/navbarhtml.css" />
|
||||||
<?php require_once ("../ressources/navbarhtml.php"); ?>
|
<title>Avis Laissés</title>
|
||||||
|
</head>
|
||||||
<div id = "container">
|
|
||||||
|
<body>
|
||||||
<div id ="entete">
|
|
||||||
<a href = "../tableauBord/tableauBord.php"><img id = "bouton_retour" src = "../ressources/image/return.png" alt = "Bouton retour"></a>
|
<?php require_once ("../ressources/navbarhtml.php"); ?>
|
||||||
<h1 id = "titre">Avis Laissés</h1>
|
|
||||||
<br>
|
<div id = "container">
|
||||||
</div>
|
|
||||||
|
<div id ="entete"> <-- Entete de la page -->
|
||||||
<div id = "avis">
|
<a href = "../tableauBord/tableauBord.php"><img id = "bouton_retour" src = "../ressources/image/return.png" alt = "Bouton retour"></a>
|
||||||
<table>
|
<h1 id = "titre">Avis Laissés</h1>
|
||||||
<?php
|
<br>
|
||||||
while ($row = pg_fetch_array($result)) {
|
</div>
|
||||||
$nom = $row['login'];
|
|
||||||
$date = $row['dateavis'];
|
<div id = "avis">
|
||||||
$commentaire = $row['commentaire'];
|
<table>
|
||||||
$note = $row['note'];
|
<?php
|
||||||
echo "<tr>";
|
while ($row = pg_fetch_array($result)) { //Stockage des resultats des requete SQL
|
||||||
echo "<td class='avis_tab'>";
|
$nom = $row['login'];
|
||||||
echo "<h3 id='nom'>$nom</h3>";
|
$date = $row['dateavis'];
|
||||||
echo "<h4 id='date'>".explode(' ',$date)[0]."</h4>";
|
$commentaire = $row['commentaire'];
|
||||||
echo "<h5 id='avis'>$commentaire</h5>";
|
$note = $row['note'];
|
||||||
echo "</td>";
|
echo "<tr>";
|
||||||
echo "<td id='note_tab'>";
|
echo "<td class='avis_tab'>"; //Affichage sous forme de tableau pour la mise en page
|
||||||
$i=0;
|
echo "<h3 id='nom'>$nom</h3>";
|
||||||
while ($i<intval($note)){
|
echo "<h4 id='date'>".explode(' ',$date)[0]."</h4>";
|
||||||
echo "<img class='etoile' src='../ressources/image/star_full.png' alt='star'>";
|
echo "<h5 id='avis'>$commentaire</h5>";
|
||||||
$i++;
|
echo "</td>";
|
||||||
}
|
echo "<td id='note_tab'>";
|
||||||
$i = $note;
|
$i=0;
|
||||||
while ($i<3){
|
while ($i<intval($note)){ //Affichage de la note laisses
|
||||||
echo "<img class='etoile' src='../ressources/image/star.png' alt='star'>";
|
echo "<img class='etoile' src='../ressources/image/star_full.png' alt='star'>";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
echo "</td>";
|
$i = $note;
|
||||||
}
|
while ($i<3){
|
||||||
?>
|
echo "<img class='etoile' src='../ressources/image/star.png' alt='star'>";
|
||||||
</tr>
|
$i++;
|
||||||
</table>
|
}
|
||||||
</div>
|
echo "</td>";
|
||||||
</div>
|
}
|
||||||
</body>
|
?>
|
||||||
</html>
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
@ -1,46 +1,44 @@
|
|||||||
/*
|
/*General*/
|
||||||
Crée par PALAFFRE Raphael
|
|
||||||
Fonction: Lister les avis recus
|
body {
|
||||||
Page CSS : avis_recu.css
|
color:black;
|
||||||
*/
|
background-color:white;
|
||||||
|
background-image:url("../ressources/image/background.jpg");
|
||||||
body {
|
background-repeat:no-repeat;
|
||||||
color:black;
|
background-size:104%;
|
||||||
background-color:white;
|
margin: 0;
|
||||||
background-image:url("../ressources/image/background.jpg");
|
font-family: Ubuntu,Helvetica,sans-serif;
|
||||||
background-attachment: fixed;
|
}
|
||||||
background-size:cover;
|
|
||||||
margin: 0;
|
#container{
|
||||||
font-family: Ubuntu,Helvetica,sans-serif;
|
margin : 5% 5% 5% 5%;
|
||||||
}
|
background-color : white;
|
||||||
|
border : 2px solid black;
|
||||||
#container{
|
}
|
||||||
margin : 5% 5% 5% 5%;
|
|
||||||
background-color : white;
|
h1{
|
||||||
border : 2px solid black;
|
text-align : center;
|
||||||
}
|
font-size : 250%;
|
||||||
|
font-weight: bold;
|
||||||
h1{
|
}
|
||||||
text-align : center;
|
|
||||||
font-size : 250%;
|
h2{
|
||||||
font-weight: bold;
|
text-align : center;
|
||||||
}
|
font-size : 150%;
|
||||||
|
font-weight: bold;
|
||||||
h2{
|
}
|
||||||
text-align : center;
|
|
||||||
font-size : 150%;
|
/*Affichage avis*/
|
||||||
font-weight: bold;
|
|
||||||
}
|
#bouton_retour{
|
||||||
|
transform : rotate(45deg);
|
||||||
#bouton_retour{
|
}
|
||||||
transform : rotate(45deg);
|
|
||||||
}
|
.etoile{
|
||||||
|
height:50px;
|
||||||
.etoile{
|
}
|
||||||
height:50px;
|
|
||||||
}
|
.avis_tab{
|
||||||
|
width:85%;
|
||||||
.avis_tab{
|
padding-left:15%;
|
||||||
width:85%;
|
}
|
||||||
padding-left:15%;
|
|
||||||
}
|
|
||||||
|
@ -1,70 +1,76 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
//Importation des fichiers
|
||||||
require_once("../connexionBD.php");
|
session_start();
|
||||||
require_once("../ressources/user.php");
|
require_once("../connexionBD.php");
|
||||||
|
require_once("../ressources/user.php");
|
||||||
//Si on est pas connecté redirection vers la page de connexion
|
|
||||||
if (!isset($_SESSION['mail'])) {
|
//Si on est pas connecté redirection vers la page de connexion
|
||||||
header('Location: ../index.php');
|
if (!isset($_SESSION['mail'])) {
|
||||||
exit();
|
header('Location: ../index.php');
|
||||||
}
|
exit();
|
||||||
$mail = $_SESSION['mail'];
|
}
|
||||||
|
|
||||||
$login = getLogin($db, $mail);
|
//Recuperation variable session
|
||||||
|
$mail = $_SESSION['mail'];
|
||||||
$requete = "SELECT DISTINCT Avis.mailemetteur, Avis.codetrajet, Utilisateur.login, Avis.commentaire, Avis.dateavis, Avis.note FROM Utilisateur, Avis, Trajet WHERE Avis.codetrajet = Trajet.codetrajet AND Trajet.mailproposition = $1 AND Avis.mailemetteur = Utilisateur.mail;";
|
|
||||||
$result = pg_query_params($db, $requete, array($mail));
|
$login = getLogin($db, $mail);
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
//Creation et envoie de la requete SQL
|
||||||
<html>
|
|
||||||
<head>
|
$requete = "SELECT DISTINCT Utilisateur.login, Avis.commentaire, Avis.dateavis, Avis.note FROM Utilisateur, Avis, Trajet WHERE Avis.codetrajet = Trajet.codetrajet AND Trajet.mailproposition = $1 AND Trajet.mailproposition = Utilisateur.mail;";
|
||||||
<meta charset="UTF-8">
|
$result = pg_query_params($db, $requete, array($mail));
|
||||||
<link rel="stylesheet" href="avis_recus.css">
|
?>
|
||||||
<link rel="stylesheet" href="../ressources/navbarhtml.css">
|
|
||||||
<link rel="icon" href="../ressources/favicon.ico"/>
|
<!DOCTYPE html>
|
||||||
<title>Avis Recus</title>
|
<html>
|
||||||
</head>
|
<head>
|
||||||
<body>
|
<meta charset="UTF-8">
|
||||||
<?php require_once ("../ressources/navbarhtml.php"); ?>
|
<link rel="stylesheet" href="avis_recus.css">
|
||||||
<div id="container">
|
<link rel="stylesheet" href="../ressources/navbarhtml.css">
|
||||||
<div id="entete">
|
<link rel="icon" href="../ressources/favicon.ico"/>
|
||||||
<a href="../tableauBord/tableauBord.php"><img id="bouton_retour"
|
<title>Avis Recus</title>
|
||||||
src="../ressources/image/return.png"
|
</head>
|
||||||
alt="Bouton retour"></a>
|
<body>
|
||||||
<h1 id="titre">Avis Recus</h1>
|
<?php require_once ("../ressources/navbarhtml.php"); ?>
|
||||||
<br>
|
|
||||||
</div>
|
<div id="container">
|
||||||
<div id="avis">
|
<div id="entete"> <-- Entete -->
|
||||||
<table>
|
<a href="../tableauBord/tableauBord.php"><img id="bouton_retour"
|
||||||
<?php while ($row = pg_fetch_array($result)) {
|
src="../ressources/image/return.png"
|
||||||
pg_query_params($db, "UPDATE Avis SET estlu = true WHERE mailemetteur = $1 AND codetrajet = $2;", array($row['mailemetteur'], $row['codetrajet']));
|
alt="Bouton retour"></a>
|
||||||
$nom = $row['login'];
|
<h1 id="titre">Avis Recus</h1>
|
||||||
$date = $row['dateavis'];
|
<br>
|
||||||
$commentaire = $row['commentaire'];
|
</div>
|
||||||
$note = $row['note'];
|
<div id="avis"> <-- Avis recus -->
|
||||||
echo "<tr>";
|
<table>
|
||||||
echo "<td class='avis_tab'>";
|
<?php while ($row = pg_fetch_array($result)) { //Stockage des valeurs de retour de la requete SQL
|
||||||
echo "<h3 id='nom'>$nom</h3>";
|
$nom = $row['login'];
|
||||||
echo "<h4 id='date'>".explode(' ',$date)[0]."</h4>";
|
$date = $row['dateavis'];
|
||||||
echo "<h5 id='avis'>$commentaire</h5>";
|
$commentaire = $row['commentaire'];
|
||||||
echo "</td>";
|
$note = $row['note'];
|
||||||
echo "<td id='note_tab'>";
|
echo "<tr>"; //Affichage des resultat sour forme de tableau
|
||||||
$i=0;
|
echo "<td class='avis_tab'>";
|
||||||
while ($i<intval($note)){
|
echo "<h3 id='nom'>$nom</h3>";
|
||||||
echo "<img class='etoile' src='../ressources/image/star_full.png' alt='star'>";
|
echo "<h4 id='date'>".explode(' ',$date)[0]."</h4>";
|
||||||
$i++;
|
echo "<h5 id='avis'>$commentaire</h5>";
|
||||||
}
|
echo "</td>";
|
||||||
$i = $note;
|
echo "<td id='note_tab'>";
|
||||||
while ($i<3){
|
$i=0;
|
||||||
echo "<img class='etoile' src='../ressources/image/star.png' alt='star'>";
|
while ($i<intval($note)){ //Affichage des notes recus
|
||||||
$i++;
|
echo "<img class='etoile' src='../ressources/image/star_full.png' alt='star'>";
|
||||||
}
|
$i++;
|
||||||
echo "</td>";
|
}
|
||||||
}
|
$i = $note;
|
||||||
?>
|
while ($i<3){
|
||||||
</tr>
|
echo "<img class='etoile' src='../ressources/image/star.png' alt='star'>";
|
||||||
</table>
|
$i++;
|
||||||
</div>
|
}
|
||||||
</div>
|
echo "</td>";
|
||||||
</body>
|
}
|
||||||
</html>
|
?>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
@ -1,55 +1,61 @@
|
|||||||
body {
|
/*General*/
|
||||||
color:black;
|
|
||||||
background-color:white;
|
body {
|
||||||
background-image:url("../ressources/image/background.jpg");
|
color:black;
|
||||||
background-attachment: fixed;
|
background-color:white;
|
||||||
background-size:cover;
|
background-image:url("../ressources/image/background.jpg");
|
||||||
margin: 0;
|
background-repeat:no-repeat;
|
||||||
font-family: Ubuntu,Helvetica,sans-serif;
|
background-size:104%;
|
||||||
}
|
margin: 0;
|
||||||
|
font-family: Ubuntu,Helvetica,sans-serif;
|
||||||
#container{
|
}
|
||||||
margin : 5% 15% 5% 15%;
|
|
||||||
background-color : white;
|
#container{
|
||||||
border : 2px solid black;
|
margin : 5% 15% 5% 15%;
|
||||||
}
|
background-color : white;
|
||||||
|
border : 2px solid black;
|
||||||
h1{
|
}
|
||||||
text-align : center;
|
|
||||||
font-size : 250%;
|
h1{
|
||||||
font-weight: bold;
|
text-align : center;
|
||||||
}
|
font-size : 250%;
|
||||||
|
font-weight: bold;
|
||||||
#form{
|
}
|
||||||
text-align:center;
|
|
||||||
}
|
/*Formulaire*/
|
||||||
|
|
||||||
#avis_laisse{
|
#form{
|
||||||
box-sizing: border-box;
|
text-align:center;
|
||||||
resize: none;
|
}
|
||||||
width: 70%;
|
|
||||||
height: 16em;
|
#avis_laisse{
|
||||||
}
|
box-sizing: border-box;
|
||||||
|
resize: none;
|
||||||
#submit{
|
width: 70%;
|
||||||
margin-bottom: 1%;
|
height: 16em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rating {
|
#submit{
|
||||||
direction: rtl;
|
margin-bottom: 1%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rating a {
|
/*Etoile de notation*/
|
||||||
color: #aaa;
|
|
||||||
text-decoration: none;
|
.rating {
|
||||||
font-size: 3em;
|
direction: rtl;
|
||||||
transition: color .4s;
|
}
|
||||||
}
|
|
||||||
|
.rating a {
|
||||||
.rating a:hover,
|
color: #aaa;
|
||||||
.rating a:focus,
|
text-decoration: none;
|
||||||
.rating a:hover ~ a,
|
font-size: 3em;
|
||||||
.rating a:focus ~ a {
|
transition: color .4s;
|
||||||
color: orange;
|
}
|
||||||
cursor: pointer;
|
|
||||||
|
.rating a:hover,
|
||||||
|
.rating a:focus,
|
||||||
|
.rating a:hover ~ a,
|
||||||
|
.rating a:focus ~ a {
|
||||||
|
color: orange;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
@ -1,89 +1,92 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
//Verifier qu'un avis n'a pas déja été envoyer avec le compte $mail pour le trajet $codetrajet
|
//Declaration des fonctions
|
||||||
function checkAvis($db, $mail, $codetrajet)
|
|
||||||
{
|
function checkAvis($db, $mail, $codetrajet)
|
||||||
$result = pg_query_params($db, "SELECT COUNT(*) FROM avis WHERE mailEmetteur = $1 AND codetrajet = $2;", array($mail, $codetrajet));
|
{
|
||||||
$row = pg_fetch_array($result);
|
$result = pg_query_params($db, "SELECT COUNT(*) FROM avis WHERE mailEmetteur = $1 AND codetrajet = $2;", array($mail, $codetrajet));
|
||||||
return $row[0] == 0;
|
$row = pg_fetch_array($result);
|
||||||
}
|
return $row[0] == 0;
|
||||||
|
}
|
||||||
//Verifier que le trajet à bien été fait par l'utilisateur $mail
|
|
||||||
function checkCodeTrajetAvis($db, $mail, $codetrajet)
|
function checkCodeTrajetAvis($db, $mail, $codetrajet)
|
||||||
{
|
{
|
||||||
$result = pg_query_params($db, "SELECT COUNT(*) FROM trajet tr, reserver re WHERE tr.codetrajet = $1 AND tr.codetrajet = re.codetrajet AND re.mailutilisateur = $2;", array($codetrajet, $mail));
|
$result = pg_query_params($db, "SELECT COUNT(*) FROM trajet tr, reserver re WHERE tr.codetrajet = $1 AND tr.codetrajet = re.codetrajet AND re.mailutilisateur = $2;", array($codetrajet, $mail));
|
||||||
$row = pg_fetch_array($result);
|
$row = pg_fetch_array($result);
|
||||||
return $row[0] >= 1;
|
return $row[0] >= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
session_start();
|
//Importation des fichiers necessaires
|
||||||
require_once("../connexionBD.php");
|
|
||||||
require_once("../ressources/user.php");
|
session_start();
|
||||||
|
require_once("../connexionBD.php");
|
||||||
//Si on est pas connecté redirection vers la page de connexion
|
require_once("../ressources/user.php");
|
||||||
if (!isset($_SESSION['mail'])) {
|
|
||||||
header('Location: ../index.php');
|
//Si on est pas connecté redirection vers la page de connexion
|
||||||
exit();
|
|
||||||
}
|
if (!isset($_SESSION['mail'])) {
|
||||||
|
header('Location: ../index.php');
|
||||||
$mail = $_SESSION['mail'];
|
exit();
|
||||||
if (isset($_POST['codetrajet']) && isset($_POST['avislaisse']) && isset($_POST['note'])) {
|
}
|
||||||
$avis = $_POST['avislaisse'];
|
|
||||||
$note = $_POST['note'];
|
$mail = $_SESSION['mail'];
|
||||||
$codetrajet = intval($_POST['codetrajet']);
|
if (isset($_POST['codetrajet']) && isset($_POST['avislaisse']) && isset($_POST['note'])) {
|
||||||
$date = date('Y-m-d H:i:s');
|
//Recuperation des variables passer par le formulaire
|
||||||
//Verifier que l'utilisateur a bien participé au trajet et qu'il n'en a pas déjà poster un
|
$avis = $_POST['avislaisse'];
|
||||||
if (checkAvis($db, $mail, $codetrajet) && checkCodeTrajetAvis($db, $mail, $codetrajet)) {
|
$note = $_POST['note'];
|
||||||
$requete = "INSERT INTO avis (mailemetteur, codetrajet, commentaire, dateavis, note, estlu) VALUES ($1,$2,$3,$4,$5, false);";
|
$codetrajet = intval($_POST['codetrajet']);
|
||||||
$envoi = pg_query_params($db, $requete, array($mail, $codetrajet, $avis, $date, $note));
|
$date = date('Y-m-d H:i:s');
|
||||||
if (!$envoi) {
|
if (checkAvis($db, $mail, $codetrajet) && checkCodeTrajetAvis($db, $mail, $codetrajet)) {
|
||||||
echo "Erreur d'ecriture dans la BD";
|
$requete = "INSERT INTO avis (mailemetteur, codetrajet, commentaire, dateavis, note, estlu) VALUES ($1,$2,$3,$4,$5, false);"; //Requete d'insertion
|
||||||
echo "<br><a href='../tableauBord/tableauBord.php'>Retour vers le tableau de bord</a>";
|
$envoi = pg_query_params($db, $requete, array($mail, $codetrajet, $avis, $date, $note)); // Envoie de la requete
|
||||||
exit();
|
if (!$envoi) { //Erreur
|
||||||
} else {
|
echo "Erreur d'ecriture dans la BD";
|
||||||
header('Location: ../tableauBord/tableauBord.php');
|
echo "<br><a href='../tableauBord/tableauBord.php'>Retour vers le tableau de bord</a>";
|
||||||
exit();
|
exit();
|
||||||
}
|
} else { //Redirection en cas de reussite
|
||||||
}
|
header('Location: ../tableauBord/tableauBord.php');
|
||||||
}
|
exit();
|
||||||
?>
|
}
|
||||||
<!DOCTYPE html>
|
}
|
||||||
<html lang="fr">
|
}
|
||||||
<head>
|
?>
|
||||||
<meta charset="UTF-8">
|
<!DOCTYPE html>
|
||||||
<link rel="stylesheet" href="deposer_avis.css">
|
<html lang="fr">
|
||||||
<link rel="stylesheet" href="../ressources/navbarhtml.css">
|
<head>
|
||||||
<link rel="icon" href="../ressources/favicon.ico"/>
|
<meta charset="UTF-8">
|
||||||
<title>Deposer un avis</title>
|
<link rel="stylesheet" href="deposer_avis.css">
|
||||||
</head>
|
<link rel="stylesheet" href="../ressources/navbarhtml.css">
|
||||||
<body>
|
<link rel="icon" href="../ressources/favicon.ico"/>
|
||||||
<?php require_once("../ressources/navbarhtml.php"); ?>
|
<title>Deposer un avis</title>
|
||||||
<div id="container">
|
</head>
|
||||||
<div id="entete">
|
<body>
|
||||||
<h1 id="titre">Deposer un avis</h1>
|
<?php require_once("../ressources/navbarhtml.php"); ?>
|
||||||
</div>
|
<div id="container">
|
||||||
<div id="form">
|
<div id="entete"> <--Entete-->
|
||||||
<form id="formulaire_avis" enctype="multipart/form-data" action="deposer_avis.php" method="post">
|
<h1 id="titre">Deposer un avis</h1>
|
||||||
<textarea id="avis_laisse" name="avislaisse" form="formulaire_avis" placeholder="Avis"></textarea>
|
</div>
|
||||||
<h2>NOTE</h2>
|
<div id="form"><--Formulaire-->
|
||||||
<div class="rating">
|
<form id="formulaire_avis" enctype="multipart/form-data" action="deposer_avis.php" method="post">
|
||||||
<input type="radio" name="note" id="note3" value="3">
|
<textarea id="avis_laisse" name="avislaisse" form="formulaire_avis" placeholder="Avis"></textarea> <--Champ_de_saisie_d_avis-->
|
||||||
<a href="#3" label for="note3" title="Donner 3 étoiles">☆</a>
|
<h2>NOTE</h2>
|
||||||
<input type="radio" name="note" id="note2" value="2">
|
<div class="rating"><--Bouton_note-->
|
||||||
<a href="#2" label for="note2" title="Donner 2 étoiles">☆</a>
|
<input type="radio" name="note" id="note3" value="3">
|
||||||
<input type="radio" name="note" id="note1" value="1">
|
<a href="#3" label for="note3" title="Donner 3 étoiles">☆</a>
|
||||||
<a href="#1" label for="note1" title="Donner 1 étoiles">☆</a>
|
<input type="radio" name="note" id="note2" value="2">
|
||||||
<?php
|
<a href="#2" label for="note2" title="Donner 2 étoiles">☆</a>
|
||||||
if (isset($_GET['codetrajet'])) {
|
<input type="radio" name="note" id="note1" value="1">
|
||||||
$codeTrajet = $_GET['codetrajet'];
|
<a href="#1" label for="note1" title="Donner 1 étoiles">☆</a>
|
||||||
echo "<input type='hidden' name='codetrajet' value='$codeTrajet'>";
|
<?php
|
||||||
}
|
if (isset($_GET['codetrajet'])) {
|
||||||
?>
|
$codeTrajet = $_GET['codetrajet'];
|
||||||
</div>
|
echo "<input type='hidden' name='codetrajet' value='$codeTrajet'>";
|
||||||
<br>
|
}
|
||||||
<input type="submit" value="Valider" id="submit">
|
?>
|
||||||
</form>
|
</div>
|
||||||
</div>
|
<br>
|
||||||
</div>
|
<input type="submit" value="Valider" id="submit"><--Envoie-->
|
||||||
</body>
|
</form>
|
||||||
</html>
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
@ -1,49 +1,53 @@
|
|||||||
body {
|
/*General*/
|
||||||
color:black;
|
|
||||||
background-color:white;
|
body {
|
||||||
background-image:url("../ressources/image/background.jpg");
|
color:black;
|
||||||
background-attachment: fixed;
|
background-color:white;
|
||||||
background-size:cover;
|
background-image:url("../ressources/image/background.jpg");
|
||||||
margin: 0;
|
background-repeat:no-repeat;
|
||||||
font-family: Ubuntu,Helvetica,sans-serif;
|
background-size:104%;
|
||||||
}
|
margin: 0;
|
||||||
|
font-family: Ubuntu,Helvetica,sans-serif;
|
||||||
#container{
|
}
|
||||||
margin : 5% 5% 5% 5%;
|
|
||||||
background-color : white;
|
#container{
|
||||||
border : 2px solid black;
|
margin : 5% 5% 5% 5%;
|
||||||
}
|
background-color : white;
|
||||||
|
border : 2px solid black;
|
||||||
h1{
|
}
|
||||||
text-align : center;
|
|
||||||
font-size : 250%;
|
h1{
|
||||||
font-weight: bold;
|
text-align : center;
|
||||||
}
|
font-size : 250%;
|
||||||
|
font-weight: bold;
|
||||||
h2{
|
}
|
||||||
text-align : center;
|
|
||||||
font-size : 150%;
|
h2{
|
||||||
font-weight: bold;
|
text-align : center;
|
||||||
}
|
font-size : 150%;
|
||||||
|
font-weight: bold;
|
||||||
#bouton_retour{
|
}
|
||||||
transform : rotate(45deg);
|
|
||||||
}
|
/*Affichage liste trajets*/
|
||||||
|
|
||||||
.separation{
|
#bouton_retour{
|
||||||
margin-top : 5%;
|
transform : rotate(45deg);
|
||||||
margin-left : 20%;
|
}
|
||||||
min-height: 2em;
|
|
||||||
width : 5px;
|
.separation{
|
||||||
background: black;
|
margin-top : 5%;
|
||||||
}
|
margin-left : 20%;
|
||||||
|
min-height: 2em;
|
||||||
td{
|
width : 5px;
|
||||||
padding-left: 1.5em;
|
background: black;
|
||||||
padding-right: 1.5em;
|
}
|
||||||
width: 33%;
|
|
||||||
}
|
td{
|
||||||
|
padding-left: 1.5em;
|
||||||
#info{
|
padding-right: 1.5em;
|
||||||
width: 60%;
|
width: 33%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#info{
|
||||||
|
width: 60%;
|
||||||
}
|
}
|
@ -1,75 +1,81 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
require_once("../connexionBD.php");
|
|
||||||
require_once("../ressources/trajet.php");
|
//Importation des fichiers necessaires
|
||||||
|
|
||||||
//Si on est pas connecté redirection vers la page de connexion
|
require_once("../connexionBD.php");
|
||||||
if (!isset($_SESSION['mail'])) {
|
require_once("../ressources/trajet.php");
|
||||||
header('Location: ../index.php');
|
|
||||||
exit();
|
//Si on est pas connecté redirection vers la page de connexion
|
||||||
}
|
|
||||||
$mail = $_SESSION['mail'];
|
if (!isset($_SESSION['mail'])) {
|
||||||
if (!(isset($_POST['villeDepart']) && isset($_POST['villeArrive']) && isset($_POST['date_heure']))) {
|
header('Location: ../index.php');
|
||||||
header('Location: ../tableauBord/tableauBord.php');
|
exit();
|
||||||
exit();
|
}
|
||||||
}
|
|
||||||
$source = explode('%%', $_POST['villeDepart']);
|
$mail = $_SESSION['mail'];
|
||||||
$cpsource = $source[1];
|
if (!(isset($_POST['lieu_depart']) && isset($_POST['lieu_arrivee']) && isset($_POST['date_heure']))){
|
||||||
$source = $source[0];
|
header('Location: ../tableauBord/tableauBord.php');
|
||||||
$dest = explode('%%', $_POST['villeArrive']);
|
exit();
|
||||||
$cpdest = $dest[1];
|
}
|
||||||
$dest = $dest[0];
|
|
||||||
$date_depart = $_POST['date_heure'];
|
if (isset($_POST['lieu_depart']) && isset($_POST['lieu_arrivee']) && isset($_POST['date_heure'])) {
|
||||||
if ($date_depart < date('Y-m-d')) {
|
$source = $_POST['lieu_depart']; //Recuperation des valeurs passé par le form
|
||||||
echo "Erreur date</br>";
|
$dest = $_POST['lieu_arrivee'];
|
||||||
echo "<a href='../tableauBord/tableauBord.php'>Retour vers le tableau de bord</a>";
|
$date_depart = $_POST['date_heure'];
|
||||||
exit();
|
if ($date_depart < date('Y-m-d')){ //Verification de date
|
||||||
}
|
echo "Erreur date</br>";
|
||||||
|
echo "<a href='../tableauBord/tableauBord.php'>Retour vers le tableau de bord</a>";
|
||||||
$result = pg_query_params($db, "(SELECT DISTINCT ut.login, ta.codetrajet, ta.datedepart FROM ville v, traverser tr, utilisateur ut, trajet ta WHERE DATE(ta.datedepart) = DATE($3) AND ta.estannule = false AND ta.codetrajet = tr.codetrajet AND ta.mailproposition = ut.mail AND tr.nomVille = v.nomVille AND tr.codepostal = v.codepostal AND tr.numeroetape = (SELECT MIN(numeroetape) FROM traverser WHERE LOWER(nomVille) = LOWER($1) AND codepostal = $4))
|
exit();
|
||||||
INTERSECT (SELECT DISTINCT ut.login, ta.codetrajet, ta.datedepart FROM ville v, traverser tr, utilisateur ut, trajet ta WHERE DATE(ta.datedepart) = DATE($3) AND ta.estannule = false AND ta.codetrajet = tr.codetrajet AND ta.mailproposition = ut.mail AND tr.nomVille = v.nomVille AND LOWER(v.nomville) = LOWER($2) AND v.codepostal = $5 AND tr.codepostal = v.codepostal AND tr.numeroetape != 1);", array($source, $dest, $date_depart, $cpsource, $cpdest));
|
}
|
||||||
|
}
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
//Requete de selection des trajets a affiché
|
||||||
<html lang="fr">
|
|
||||||
<head>
|
$result = pg_query_params($db, "(SELECT DISTINCT ut.login, ta.codetrajet, ta.datedepart FROM ville v, traverser tr, utilisateur ut, trajet ta WHERE DATE(ta.datedepart) = DATE($3) AND ta.estannule = false AND ta.codetrajet = tr.codetrajet AND ta.mailproposition = ut.mail AND tr.nomVille = v.nomVille AND tr.codepostal = v.codepostal AND tr.numeroetape = (SELECT MIN(numeroetape) FROM traverser WHERE LOWER(nomVille) = LOWER($1)))
|
||||||
<meta charset="UTF-8">
|
INTERSECT (SELECT DISTINCT ut.login, ta.codetrajet, ta.datedepart FROM ville v, traverser tr, utilisateur ut, trajet ta WHERE DATE(ta.datedepart) = DATE($3) AND ta.estannule = false AND ta.codetrajet = tr.codetrajet AND ta.mailproposition = ut.mail AND tr.nomVille = v.nomVille AND tr.codepostal = v.codepostal AND tr.numeroetape = (SELECT MAX(numeroetape) FROM traverser WHERE LOWER(nomVille) = LOWER($2)));", array($source, $dest, $date_depart));
|
||||||
<link rel="stylesheet" href="liste_trajet.css">
|
|
||||||
<link rel="stylesheet" href="../ressources/navbarhtml.css">
|
?>
|
||||||
<link rel="icon" href="../ressources/favicon.ico"/>
|
<!DOCTYPE html>
|
||||||
<title>Liste des trajets</title>
|
<html lang="fr">
|
||||||
</head>
|
<head>
|
||||||
<body>
|
<meta charset="UTF-8">
|
||||||
<?php
|
<link rel="stylesheet" href="liste_trajet.css">
|
||||||
require_once("../ressources/navbarhtml.php");
|
<link rel="stylesheet" href="../ressources/navbarhtml.css">
|
||||||
?>
|
<link rel="icon" href="../ressources/favicon.ico"/>
|
||||||
<div id="container">
|
<title>Liste des trajets</title>
|
||||||
<div id="entete">
|
</head>
|
||||||
<a href="../tableauBord/tableauBord.php"><img id="bouton_retour" src="../ressources/image/return.png"
|
<body>
|
||||||
alt="Bouton retour"></a>
|
<?php
|
||||||
<h1 class="float" id="titre">Liste des trajets</h1>
|
require_once("../ressources/navbarhtml.php");
|
||||||
<br>
|
?>
|
||||||
<h2>Trajets recherchés : <?php echo "$source ($cpsource) vers $dest ($cpdest)"; ?></h2>
|
<div id="container">
|
||||||
</div>
|
<div id="entete"> <--Entete-->
|
||||||
<div id="liste">
|
<a href="../tableauBord/tableauBord.php"><img id="bouton_retour" src="../ressources/image/return.png"
|
||||||
<table>
|
alt="Bouton retour"></a>
|
||||||
<?php
|
<h1 class="float" id="titre">Liste des trajets</h1>
|
||||||
while ($row = pg_fetch_array($result)) {
|
<br>
|
||||||
$codetrajet = $row['codetrajet'];
|
<h2>Trajets recherchés : <?php echo $source . " vers " . $dest; ?></h2>
|
||||||
$login = $row['login'];
|
</div>
|
||||||
$source = getDepart($db, $codetrajet);
|
<div id="liste">
|
||||||
$dest = getFin($db, $codetrajet);
|
<table>
|
||||||
$date_depart = $row['datedepart'];
|
<?php
|
||||||
if (checkPlacesVoiture($db, $codetrajet) && $date_depart >= date('Y-m-d H:i:s')) {
|
while ($row = pg_fetch_array($result)) { //Recuperation des resultats de la requete
|
||||||
echo "<tr><td class='ligne'><hr class='separation'/></td><td class='info'>";
|
$codetrajet = $row['codetrajet'];
|
||||||
echo "<p>$date_depart - ".$source['nomvile']." (".$source['codepostal'].") vers ".$dest['nomvile']." (".$dest['codepostal'].") proposé par : $login</p></td>";
|
$login = $row['login'];
|
||||||
echo "<td><a href='reserver.php?codetrajet=$codetrajet'>Réserver</a></td>";
|
$source = getDepart($db, $codetrajet);
|
||||||
echo "</tr>";
|
$dest = getFin($db, $codetrajet);
|
||||||
}
|
$date_depart = $row['datedepart'];
|
||||||
}
|
if (checkPlacesVoiture($db, $codetrajet) && $date_depart >= date('Y-m-d H:i:s')){ //Affichage des resultats sous forme de tableau
|
||||||
?>
|
echo "<tr><td class='ligne'><hr class='separation'/></td><td class='info'>";
|
||||||
</table>
|
echo "<p>$date_depart - $source vers $dest proposé par : $login</p></td>";
|
||||||
</div>
|
echo "<td><a href='reserver.php?codetrajet=$codetrajet'>Réserver</a></td>";
|
||||||
</div>
|
echo "</tr>";
|
||||||
</body>
|
}
|
||||||
</html>
|
}
|
||||||
|
?>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
@ -1,38 +1,38 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
|
//Declaration de fonction
|
||||||
|
|
||||||
function verifierTrajet($db, $mail, $codetrajet){
|
function verifierTrajet($db, $mail, $codetrajet){
|
||||||
$trajet = getTrajet($db, $codetrajet);
|
$trajet = getTrajet($db, $codetrajet);
|
||||||
if (!$trajet){
|
if (!$trajet){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$trajet = pg_fetch_array($trajet);
|
return checkReservations($db, $mail, $codetrajet) && checkDatesReserve($db, $mail, $trajet['datedepart']) && checkPlacesVoiture($db, $codetrajet) && strcmp($trajet['mailproposition'], $mail) != 0;
|
||||||
if (strcmp($mail, $trajet['mailproposition']) == 0){
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return checkReservations($db, $mail, $codetrajet) && checkPlacesVoiture($db, $codetrajet);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Importation des fichiers necessaire
|
||||||
|
|
||||||
require_once("../connexionBD.php");
|
require_once("../connexionBD.php");
|
||||||
require_once("../ressources/trajet.php");
|
require_once("../ressources/trajet.php");
|
||||||
|
|
||||||
if (!isset($_SESSION['mail'])) {
|
if (!isset($_SESSION['mail'])) { // Test si connecté ou non
|
||||||
header('Location: ../index.php');
|
header('Location: ../index.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
$mail = $_SESSION['mail'];
|
$mail = $_SESSION['mail'];
|
||||||
|
|
||||||
if (isset($_GET['codetrajet'])){
|
if (isset($_GET['codetrajet'])){
|
||||||
$codetrajet = $_GET['codetrajet'];
|
$codetrajet = $_GET['codetrajet'];
|
||||||
if (verifierTrajet($db, $mail, $codetrajet) && reserver($db, $mail, $codetrajet)){
|
if (verifierTrajet($db, $mail, $codetrajet)){ // Test si place dispo et si on peut reserver
|
||||||
header('Location: ../tableauBord/tableauBord.php');
|
reserver($db, $mail, $codetrajet);
|
||||||
exit();
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
header('Location: ../recherche/recherche.php?error=1');
|
|
||||||
exit();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
header('Location: ../tableauBord/tableauBord.php');
|
||||||
|
exit();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
@ -1,91 +1,40 @@
|
|||||||
*{
|
.centrage {
|
||||||
font-family: "Arial";
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
body{
|
|
||||||
background-attachment: fixed;
|
|
||||||
background-image:url("../ressources/image/background.jpg");
|
|
||||||
background-size: cover;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
#container{
|
|
||||||
margin-top: 3em;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1{
|
|
||||||
font-size: 2em;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 3em;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.villeSelect, .villeText{
|
.global {
|
||||||
box-sizing: border-box;
|
|
||||||
margin-bottom: 0.7em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.villeText{
|
text-align: center;
|
||||||
width: 20%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.villeSelect{
|
|
||||||
margin-bottom: 0.7em;
|
|
||||||
margin-left: 2%;
|
|
||||||
width: 33%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#submit{
|
br {
|
||||||
margin-top: 1em;
|
line-height: 50px;
|
||||||
margin-left: 50%;
|
|
||||||
transform: translate(-50%);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#formulaire{
|
body {
|
||||||
|
color: black;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
border-radius: 10px;
|
background-image: url("../ressources/image/background.jpg");
|
||||||
padding: 4em;
|
background-repeat: no-repeat;
|
||||||
width: 40%;
|
background-size: 104%;
|
||||||
}
|
margin: 0;
|
||||||
|
|
||||||
.form{
|
|
||||||
box-sizing: border-box;
|
|
||||||
width: 55%;
|
|
||||||
margin-bottom: 0.7em;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.button{
|
#container {
|
||||||
cursor: pointer;
|
margin: 5% 15% 2% 15%;
|
||||||
font-weight: bold;
|
background-color: white;
|
||||||
padding: 8px;
|
border: 2px solid black;
|
||||||
color: white;
|
|
||||||
background-color: rgb(65, 154, 28);
|
|
||||||
border-radius: 5em;
|
|
||||||
border: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.line{
|
h1 {
|
||||||
display: flex;
|
text-align: center;
|
||||||
flex-wrap: wrap;
|
font-size: 250%;
|
||||||
flex-direction: row;
|
|
||||||
justify-content: left;
|
|
||||||
width: 100%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.error{
|
#form {
|
||||||
margin-top: 1em;
|
|
||||||
color: red;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.label{
|
|
||||||
box-sizing: border-box;
|
|
||||||
font-size: 1.1em;
|
|
||||||
width: 45%;
|
|
||||||
min-width: 8em;
|
|
||||||
}
|
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
$(document).ready(function () {
|
|
||||||
//Copier les options
|
|
||||||
let options = $('#villeDepart option').clone();
|
|
||||||
$('#villeDepartText').keyup(function () {
|
|
||||||
let val = $(this).val().toString().toLowerCase();
|
|
||||||
$('#villeDepart').empty();
|
|
||||||
//Récuperer les option filtrées ou toutes les options si vide
|
|
||||||
options.filter(function (idx, el) {
|
|
||||||
return val === '' || $(el).text().toLowerCase().indexOf(val) >= 0;
|
|
||||||
}).appendTo('#villeDepart');//ajouter à la liste
|
|
||||||
});
|
|
||||||
|
|
||||||
//Copier les options
|
|
||||||
let optionsArrive = $('#villeArrive option').clone();
|
|
||||||
$('#villeArriveText').keyup(function () {
|
|
||||||
let val = $(this).val().toString().toLowerCase();
|
|
||||||
$('#villeArrive').empty();
|
|
||||||
//Récuperer les option filtrées ou toutes les options si vide
|
|
||||||
optionsArrive.filter(function (idx, el) {
|
|
||||||
return val === '' || $(el).text().toLowerCase().indexOf(val) >= 0;
|
|
||||||
}).appendTo('#villeArrive');//ajouter à la liste
|
|
||||||
});
|
|
||||||
});
|
|
Loading…
Reference in New Issue