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
| <?php
$colonne=$_GET['colonne'];
$valeur=$_GET['valeur'];
$select = "SELECT * FROM suivi_omt_orne where $colonne='$valeur' ORDER BY poste_source ASC";
$result = mysql_query($select,$link) or die ('Erreur : '.mysql_error() );
$total = mysql_num_rows($result);
if($total) {
//==================
// debut du tableau
//==================
echo '<table bgcolor="#FFFFFF">'."\n";
//======================================================================
// première ligne on affiche les titres postes_sources et depart dans 2 colonnes
//======================================================================
echo '*Les Postes Sources sont affichés par ordre alphabétique / ' . "\n";
echo '*Nombre de postes: ' . $total;
echo '<tr>';
echo '<td bgcolor="#FFD700"><b><u>Poste Source</u></b></td>';
echo '<td bgcolor="#FFD700"><b><u>Départ</u></b></td>';
echo '<td bgcolor="#FFD700"><b><u>N° GDO</u></b></td>';
echo '<td bgcolor="#FFD700"><b><u>Commune</u></b></td>';
echo '<td bgcolor="#FFD700"><b><u>Equipement à poser</u></b></td>';
echo '<td bgcolor="#FFD700"><b><u>Nom de poste</u></b></td>';
echo '<td bgcolor="#FFD700"><b><u>N° affaire</u></b></td>';
echo '<td bgcolor="#FFD700"><b><u>Chargé affaire</u></b></td>';
echo '<td bgcolor="#FFD700"><b><u>IPT</u></b></td>';
echo '<td bgcolor="#FFD700"><b><u>Radio ou RTC</u></b></td>';
echo '<td bgcolor="#FFD700"><b><u>Position affaire</u></b></td>';
echo '<td bgcolor="#FFD700"><b><u>Blocage</u></b></td>';
echo '<td bgcolor="#FFD700"><b><u>Commentaires</u></b></td>';
echo '<td bgcolor="#FFD700"><b><u>Programme</u></b></td>';
echo '<td bgcolor="#FFD700"><b><u>MEX prévue</u></b></td>';
echo '<td bgcolor="#FFD700"><b><u>MEX réelle</u></b></td>';
echo '<td bgcolor="#FFD700"><b><u>Mise en service</u></b></td>';
echo '<td bgcolor="#FFD700"><b><u>Modification schéma exploitation</u></b></td>';
echo '</tr>'."\n";
//=========================================================================
// lecture et affichage des résultats sur 2 colonnes, 1 résultat par ligne.
//=========================================================================
while($row = mysql_fetch_array($result)) {
echo '<tr>';
echo '<td bgcolor="#A9A9A9">'.$row["poste_source"].'</td>';
echo '<td bgcolor="#A9A9A9">'.$row["depart"].'</td>';
echo '<td bgcolor="#A9A9A9">'.$row["num_gdo_poste_a_equiper"].'</td>';
echo '<td bgcolor="#A9A9A9">'.$row["commune"].'</td>';
echo '<td bgcolor="#A9A9A9">'.$row["equipement_a_poser"].'</td>';
echo '<td bgcolor="#A9A9A9">'.$row["nom_de_poste"].'</td>';
echo '<td bgcolor="#A9A9A9">'.$row["num_affaire"].'</td>';
echo '<td bgcolor="#A9A9A9">'.$row["charge_affaire"].'</td>';
echo '<td bgcolor="#A9A9A9">'.$row["ipt"].'</td>';
echo '<td bgcolor="#A9A9A9">'.$row["radio_ou_rtc"].'</td>';
echo '<td bgcolor="#A9A9A9">'.$row["position_affaire"].'</td>';
echo '<td bgcolor="#A9A9A9">'.$row["blocage"].'</td>';
echo '<td bgcolor="#A9A9A9">'.$row["commentaires"].'</td>';
echo '<td bgcolor="#A9A9A9">'.$row["prg"].'</td>';
echo '<td bgcolor="#A9A9A9">'.$row["mex_prevue"].'</td>';
echo '<td bgcolor="#A9A9A9">'.$row["mex_reelle"].'</td>';
echo '<td bgcolor="#A9A9A9">'.$row["mise_en_service"].'</td>';
echo '<td bgcolor="#A9A9A9">'.$row["modification_schema_exploitation"].'</td>';
echo '</tr>'."\n";
}
echo '</table>'."\n";
//================
// fin du tableau.
//================
}
else {echo 'Pas d\'enregistrements dans cette table...';}
?> |