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
| <?php
include("includes/mysql_connect.php");
$tour = 1;
$sql = "SELECT DISTINCT bureau FROM resultats WHERE tour = 1";
$requete = mysql_query($sql, $cnx) or die(mysql_error());
while ($result = mysql_fetch_assoc($requete))
{
$bureau_actuel = $result['bureau'];
while ($temp < 4)
{
echo "<h1>Bureau #";
echo $bureau_actuel;
echo "</h1>";
$temp = $_GET['temp'];
if(empty($temp))
{
$temp = 1;
}
$sql2 = "SELECT type_affichage, temps FROM scenario WHERE tour = $tour AND representation = $temp";
$requete2 = mysql_query($sql2, $cnx) or die(mysql_error());
$result2 = mysql_fetch_assoc($requete2);
$type_affichage = $result2['type_affichage'];
$temps = $result2['temps'];
// Partie affichage
include(sprintf('%s.php', $type_affichage));
header("Refresh: {$temps};");
$temp++;
}
}
?> |
Partager