Valid XHTML    Valid CSS2    

Listing du fichier sen_hist_rep.php

 

00001     <?php
00002     
include("mesfonctions3.php") ;
00003     
debutPage
("Questionnaire d'histoire") ;
00004     include(
"sen_hist.php") ;
00005     
$tabh
= hist() ;
00006     
00007     
h1_version1
("Questionnaire d'histoire") ;
00008     
00009     echo
"<p>Voici la correction.</p>\n" ;
00010     
00011     echo
"<blockquote>\n ";
00012     echo
"<table border='thin solid 1'>\n ";
00013     
00014     
$ide
= 0 ; # indice de numéro
00015     
$cum
= 0 ; # cumul des points
00016     
echo
"<tr>\n" ;
00017     echo
"<th>Evènement</th>\n" ;
00018     echo
"<th>Date exacte</th>\n" ;
00019     echo
"<th>Votre réponse</th>\n" ;
00020     echo
"<th>Cumul des points</th>\n" ;
00021     echo
"</tr>\n" ;
00022     foreach (
$tabh
as $cle => $valeur) {
00023     
$ide++ ;
00024      echo
"<tr>\n" ;
00025      echo
"<td>
$valeur</td>\n" ;
00026      echo
"<td>
$cle</td>\n" ;
00027     
$rep
= $_GET["c".$ide] ;
00028      if (
$rep
==$cle) {
00029     
$cum++ ;
00030     
$rep
= "<span style ='color : green'>&nbsp;$rep&nbsp;</span>" ;
00031      } else {
00032     
$rep
= "<span style ='color : red'>&nbsp;$rep&nbsp;</span>" ;
00033      } ;
# fin de si
00034     
echo
"<td>$rep</td>\n" ;
00035      echo
"<td>
$cum</td>\n" ;
00036      echo
"</tr>\n" ;
00037     } ;
# fin pourchaque
00038     
echo
"</table>\n ";
00039     echo
"</blockquote>\n ";
00040     
00041     
finPage() ;
00042     
?>

Pour ne pas voir les numéros de ligne, ajoutez &nl=non à la suite du nom du fichier.

 

 

retour gH    Retour à la page principale de   (gH)