|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
<?php
|
|
|
|
|
//Importation des fichiers
|
|
|
|
|
session_start();
|
|
|
|
|
require_once("../connexionBD.php");
|
|
|
|
|
require_once("../ressources/user.php");
|
|
|
|
@ -8,13 +9,18 @@ if (!isset($_SESSION['mail'])) {
|
|
|
|
|
header('Location: ../index.php');
|
|
|
|
|
exit();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//Recuperation variable session
|
|
|
|
|
$mail = $_SESSION['mail'];
|
|
|
|
|
|
|
|
|
|
$login = getLogin($db, $mail);
|
|
|
|
|
|
|
|
|
|
//Creation et envoie de la requete SQL
|
|
|
|
|
|
|
|
|
|
$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;";
|
|
|
|
|
$result = pg_query_params($db, $requete, array($mail));
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html>
|
|
|
|
|
<head>
|
|
|
|
@ -26,22 +32,23 @@ $result = pg_query_params($db, $requete, array($mail));
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<?php require_once ("../ressources/navbarhtml.php"); ?>
|
|
|
|
|
|
|
|
|
|
<div id="container">
|
|
|
|
|
<div id="entete">
|
|
|
|
|
<div id="entete"> <-- Entete -->
|
|
|
|
|
<a href="../tableauBord/tableauBord.php"><img id="bouton_retour"
|
|
|
|
|
src="../ressources/image/return.png"
|
|
|
|
|
alt="Bouton retour"></a>
|
|
|
|
|
<h1 id="titre">Avis Recus</h1>
|
|
|
|
|
<br>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="avis">
|
|
|
|
|
<div id="avis"> <-- Avis recus -->
|
|
|
|
|
<table>
|
|
|
|
|
<?php while ($row = pg_fetch_array($result)) {
|
|
|
|
|
<?php while ($row = pg_fetch_array($result)) { //Stockage des valeurs de retour de la requete SQL
|
|
|
|
|
$nom = $row['login'];
|
|
|
|
|
$date = $row['dateavis'];
|
|
|
|
|
$commentaire = $row['commentaire'];
|
|
|
|
|
$note = $row['note'];
|
|
|
|
|
echo "<tr>";
|
|
|
|
|
echo "<tr>"; //Affichage des resultat sour forme de tableau
|
|
|
|
|
echo "<td class='avis_tab'>";
|
|
|
|
|
echo "<h3 id='nom'>$nom</h3>";
|
|
|
|
|
echo "<h4 id='date'>".explode(' ',$date)[0]."</h4>";
|
|
|
|
@ -49,7 +56,7 @@ $result = pg_query_params($db, $requete, array($mail));
|
|
|
|
|
echo "</td>";
|
|
|
|
|
echo "<td id='note_tab'>";
|
|
|
|
|
$i=0;
|
|
|
|
|
while ($i<intval($note)){
|
|
|
|
|
while ($i<intval($note)){ //Affichage des notes recus
|
|
|
|
|
echo "<img class='etoile' src='../ressources/image/star_full.png' alt='star'>";
|
|
|
|
|
$i++;
|
|
|
|
|
}
|
|
|
|
|