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
| </head>
<body>
<!-- On prépare le haut de notre tableau : une premier ligne "titre" avec les noms des contenus des colonnes -->
<br><H3>blablabla<?php echo $_POST['zone']; ?> entre le <?php echo $_POST['date1']; ?> et le <?php echo $_POST['date2']; ?></H3></br>
<table BORDER=4 CELLSPACING=2 CELLSPACING=2 CELLPADDING=2 CELLPADDING=2 CELLPADDING=2 CELLPADDING=2 CELLPADDING=4 CELLPADDING=4 CELLPADDING=1 CELLPADDING=1 align=center>
<tr>
<th>ARE</th>
<th>DATE</th>
<th>Type</th>
<th>N°</th>
<th>Poste Source</th>
<th>Départ</th>
<th>nbre G.E renseigné CCO</th>
<th>G.E programmé ARE</th>
<th>siége</th>
<th>cause</th>
</tr>
<?php
$mode=$GLOBALS[mode];
require "acrbo.php";
$zone=$_POST['zone'];
$date1=$_POST['date1'];
$date2=$_POST['date2'];
// requête SQL
$sql = "SELECT $table.PO,$table.date,$table.type,$table.titre,$table.poste_source,$table.depart,$table.nbrege,$table.coupes,$table.siege,$table.cause FROM $table WHERE (PO LIKE '$zone') AND (date BETWEEN '$date1' and '$date2') AND (coupes !='0') AND (nbrege !='')";
// On execute la requête
$result = mysql_db_queryblablalbla());
// On fait une boucle;)
while ( $data = mysql_fetch_array($result) )
{
// Affichage du html mixé aux variables renvoyées par la requête :
echo '<tr><td>'. $data['PO'] .'</td><td>'. $data['date'] .'</td><td>'. $data['type'] .'</td><td>'. $data['titre'] .'</td><td>'. $data['poste_source'] .'</td><td>'. $data['depart'] .'</td><td>'. $data['nbrege'] .'</td><td>'. $data['coupes'] .'</td><td>'. $data['siege'] .'</td><td>'. $data['cause'] .'</td></tr>';
}
// fin de la boucle, et du php, retour au html
?>
</table></body>
</html> |
Partager