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
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Document sans titre</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT LANGUAGE="JavaScript">
function aff_page(exer) {
for(var i=0; i<document.exer.a.length; i++)
{
if(document.exer.a[i].checked)
{document.exer.submit();
parent.frames[2].window.location.replace("editcorr.php");}
//parent.getElementsByTagName('frame')[2].window.location.replace("corexerc.php");}
}
}
function select_tout_radio( type )
{
var a = document.getElementById("a" + type);
a.checked = true;
}
</SCRIPT>
</head>
<body>
<form action="editcorr.php" method="post" name="exer" >
<?php
$c=$_POST["c"];
$l=$_POST["les"];
echo "<input type=\"hidden\" name=\"tc\" value=\"".$c."\">";
echo "<input type=\"hidden\" name=\"tl\" value=\"".$l."\">";
require('conf.php');
echo " chapitre".$c." : lecon".$l;
mysql_selectdb("evaluation") or die("Connexion impossible");
$res=mysql_query("SELECT * FROM exercices where exercices.nc=$c and exercices.nl=$l");
$nb=mysql_num_rows($res);
echo "veuillez sélectionner le numéro de l'exercice que vous allez lui ajouter son correction";
for($i=0;$i < $nb;$i++)
{$reg=mysql_fetch_array($res);
//<input type="radio" name="a" value="1" onclick="select_tout_radio('1')">
$j=$i+1;
echo "<P>";
echo "<input type=\"radio\" name=\"a\" value=\"".$j."\" onclick=\"select_tout_radio('".$j."')\">";
echo "Exercice".$j;
echo"</p>";
}
?>
</form>
<p>
<input type="submit" name="Submit" value="Continuer" onClick="aff_page(exer)">
</p>
</body>
</html> |
Partager