48 lines
1.4 KiB
PHP
48 lines
1.4 KiB
PHP
<!--
|
|
* affichageVisite.php
|
|
-->
|
|
<?php
|
|
include_once("entete.php");
|
|
include_once("modele/accesBDD.php");
|
|
?>
|
|
<h2>Liste des visites</h2>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Client </th><th>Ville </th><th>Date </th><th>Heure </th><th>Remarque </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<?php
|
|
if (isset(($_GET["msg"]))) {
|
|
$msg = $_GET["msg"];
|
|
echo "<p>$msg</p>";
|
|
unset($_GET["msg"]);
|
|
}
|
|
//Recherche des visites de l'utilisateur afin de les afficher
|
|
$dbh = connexion();
|
|
$visites = rechercherLesVisitesDuCommercial($dbh, $id);
|
|
while ($uneVisite = $visites->fetch()) { // Lecture 1ère ligne jeu d'enregistrements
|
|
$idVisite = $uneVisite['idVisite'];
|
|
$lib = $uneVisite['praNom'] . " " . $uneVisite['praPrenom'];
|
|
$ville = $uneVisite['praVille'];
|
|
$dateV = $uneVisite["date"];
|
|
$heureV = $uneVisite["heure"];
|
|
$rem = $uneVisite["remarque"];
|
|
echo "<tr><td>$lib </td><td>$ville </td><td>$dateV </td>"
|
|
. "<td>$heureV </td><td>$rem </td><td><a href='affichageCompteRendu.php?idVisite=$idVisite'>Comptes rendus</a> </td> </tr>";
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
</br> </br> </br>
|
|
|
|
<!--<p>
|
|
<a href="nouvelleVisite.php">Ajouter une visite</a>
|
|
</p>-->
|
|
|
|
</body>
|
|
</html>
|