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
| <?php include("menu.php");?>
<link rel="stylesheet" href="menu/dropdown_three.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<?php
include("include/db_inc_pdo.php");
?>
<p><a href="locataires_menu.php?idnoms=<?= $produit['idnoms'] ?>">Aller au menu locataires</a>
<table class="bicolor" border="1" align="center">
<tr>
<th class="intitule">id</th>
<th class="intitule">Civil</th>
<th class="intitule">Nom</th>
<th class="intitule">Prénom</th>
<th class="intitule">Ville</th>
<th class="intitule">Pays</th>
<th class="intitule">Réservé</th>
<th class="intitule">Remarques</th>
<th class="intitule">Listenoire</th>
</tr>
<?php
$reponse = $pdo->query('SELECT idnoms, nom, noma, prenom, rue, casepostaleouruea, prof, cp, ville, pays, tel, telprof, fax, natela, natelb, emaila, emailb, reserve, remarque, listenoire, civilites.civil FROM locataires INNER JOIN civilites ON locataires.idcivil = civilites.idcivil ORDER BY nom');
while ($locataires = $reponse->fetch()){
switch ($locataires['listenoire']){
case 'oui':
$couleur='red';
break;
default:
$couleur='black';
}
}
{
$id = $locataires['idnoms'];
$civil = $locataires ['civil'];
$nom = $locataires['nom'];
$prenom = $locataires['prenom'];
$ville = $locataires['ville'];
$pays = $locataires['pays'];
$reserve = $locataires['reserve'];
$remarque = $locataires['remarque'];
$listenoire = $locataires['listenoire'];
echo '<p style="color:'.$couleur.'">'.$locataires['listenoire'].'</p>';
echo "<td>$id</td>";
echo "<td>$civil</td>";
echo "<td>$nom</td>";
echo "<td>$prenom</td>";
echo "<td>$ville</td>";
echo "<td>$pays</td>";
echo "<td>$reserve</td>";
echo "<td>$remarque</td>";
echo "<td><b><span style='color:red;'>$listenoire</span></b></td>";
echo "</tr>";
}
echo "</table>";
?>
<?php
$reponse->closeCursor(); // Termine le traitement de la requête
?> |
Partager