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
|
<FORM METHOD="POST">
</br>
<!-- Première liste déroulante -->
<label>Société :</label>
<SELECT name="Liste des sociétés">
<?php
include('connexion.php');
$sql = " SELECT DISTINCT codeSoc FROM t_societe";
$result = mysql_query($sql) or die("Requete pas comprise");
while ($row=mysql_fetch_array($result))
{
echo"<option>$row[0]</option>";
}
?>
</SELECT>
<!-- Deuxième liste déroulante -->
<label>Matricule chauffeur :</label>
<SELECT name="Liste des Chauffeurs">
<?php
$sql2 = " SELECT Idchaufgesco FROM t_societe WHERE '$row'";
$result2 = mysql_query($sql2) or die("Requete pas comprise");
while ($row2=mysql_fetch_array($result2))
{
echo"<option>$row2[0]</option>";
}
?>
</SELECT>
</br></br>
<input type="submit" value="Valider">
</br>
</br>
<div style="width:800px;height:258px;overflow:auto">
<table border="2">
<tr align="center" bgcolor="white">
<td width="10%"><font face="times new roman"><b>ID</b></font></td>
<td width="30%"><font face="times new roman"><b>Nom du chauffeur</b></font></td>
<td width="15%"><font face="times new roman"><b>Recette</b></font> </td>
<td width="15%"><font face="times new roman"><b>Carte</b></font> </td>
<td width="15%"><font face="times new roman"><b>Avance</b></font> </td>
<td width="45%"><font face="times new roman"><b>Relica</b></font> </td>
<td width="45%"><font face="times new roman"><b>Observation</b></font> </td>
</tr>
<?php
$req="SELECT c.Idchaufgesco,prenom,Recette,Carte,IdSoc,Relica,Observation
FROM t_recette r, t_chauffeur c
WHERE r.Idchaufgesco=c.Idchaufgesco";
//$req="SELECT c.Idchaufgesco, c.NomChauff,r.Carte,r.Recette,o.TypeOperation,r.Relica,r.Observation
//FROM t_chauffeur c
//INNER JOIN t_recette r ON c.Idchaufgesco = r.Idchaufgesco
//INNER JOIN t_societe s ON r.IdSoc = s.IdSoc
//INNER JOIN t_op o ON s.IdOp = o.IdOp";
//$req="SELECT c.Idchaufgesco,NomChauff,Carte,Recette,TypeOperation,Relica,Observation
//FROM t_chauffeur c,t_recette r,t_societe s,t_op o
//WHERE c.Idchaufgesco = r.Idchaufgesco
//AND r.IdSoc=s.IdSoc
//AND s.IdOp = o.IdOp";
$rep=mysql_query($req) or die (mysql_error());
//Affichage
//init de $i, compteur
$i = 1;
while($row=mysql_fetch_row($rep))
{
$IdChauf=$row[0];
$NomChauf=$row[1];
$Carte=$row[2];
$Recette=$row[3];
$TypeOperation=$row[4];
$Relica=$row[5];
$Observation=$row[6];
echo "<tr align='center'><td>";
echo "$IdChauf";
echo "<input type='hidden' name='HB_id".$i."' value='".$IdChauf."'></td><td>";
echo"$NomChauf";
echo"</td><td>";
echo"$Carte";
echo"</td><td>";
echo"$Recette";
echo"</td><td>";
echo"$TypeOperation";
echo"</td><td>";
echo"$Relica";
echo"</td><td>";
echo"$Observation";
echo"</td></tr>";
$i = $i+1;
}
//echo"<SELECT name='CB_etat".$i."' size='1' onChange=\"control(this.form);\">";
//echo"<OPTION>Ouverte";
//echo"<OPTION>En cours";
//echo"<OPTION>Fermée";
//echo"</SELECT>";
//echo"</td><td>";
//echo"<input type='checkbox' name='table_array[$numero]' value='$numero'>";
?>
</table>
</br>
<a href="deconnexion.php">Déconnexion</a>
</FORM> |
Partager