Académique Documents
Professionnel Documents
Culture Documents
Correction Prototype2023
Correction Prototype2023
</nav>
<section>
<iframe src="enregistrement.html" name="x"></iframe>
</section>
</body>
</html>
Important :
Les propriétés colorées en bleu sont nécessaires pour le code CSS
$np=$_POST["np"];
$mod=$_POST["mod"];
$sec=$_POST['sec'];
$cond=$_POST['cond'];
$conf=$_POST['conf'];
if(mysql_num_rows($res)==0) {
echo "<h1>testeur non inscrit</h1>"; }
else {
$req="SELECT * from evaluation where numPermis='$np' and idModele='$mod' ";
$res=mysql_query($req) or die("pb req2");
if (mysql_num_rows($res)==1) {
echo("<h1>Vous avez déjà testé ce modèle</h1>"); }
else {
$ds=date("Y-m-d H:i:s");
$req="INSERT INTO evaluation VALUES('$np','$mod','$ds','$sec','$cond','$conf')";
$res=mysql_query($req) or die("pb req3") ;
echo("<h1>Insertion effectuée avec succès</h1>"); }
}
mysql_close();
?>
echo "<tr>
<td width='200'>". $t[0]."</td>
<td width='200'>".$t[1]."</td>
<td width='200'>".$t[2]."</td>
<td width='200'>".$t[3]."</td>
<td width='200'>".$t[4]."</td>
</tr>";
}
echo "</table>" ;
mysql_close();
?>
// Cette fonction permet de vérifier si le paramètre x est composé uniquement par des lettres
alphabétiques
function uniquementLettres(x)
{
x=x.toUpperCase()
var i=0
while (x.charAt(i)>="A" && x.charAt(i)<="Z" && i<x.length)
i++
return i == x.length
}
function verif1()
{
var nb1=numPermis.substr(0,2)
s=document.getElementById("s").value
c=document.getElementById("c").value
cf=document.getElementById("cf").value
if(numPermis.indexOf('/')!=2 || isNaN(nb1) || isNaN(nb2) || nb1.length!=2 || nb2.length!=5)
{
resultat = false
alert("Le numéro du permis n'est pas conforme")
}
else if (document.getElementById("mod").selectedIndex==false){
resultat = false
alert("La selection du modele est obligatoire")
}
return resultat
}
nav {
background-color: #d9f0f5;
width: 30%;
height: 480px;
float: left;
}
section {
background-color: #eafafa;
width: 70%;
height: 480px;
float: left;
}
iframe {
width: 99%;
height: 470px;
}
h1{
text-align: center;
}
h1:hover{
transition: color 2s;
color: aqua;
}
.y{
background-color: yellow;
font-size: 16px;
}
.b{
margin-left: 10%;
}
.b1{
margin-left: 7%;
}
div{
margin-left: 20%;
}
NB : - les parties JavaScript et CSS qui sont mises en surbrillance jaune sont données avec le
prototype dans le dossier « StiRessources ».
- Importation d’une BD :
1) Créer une BD
2) Cliquer sur « importer »
3) Choisir un fichier (accéder au dossier qui contient le fichier SQL)
4) Exécuter
- Exportation d’une BD :
1) Cliquer sur le nom de la BD à exporter
2) Cliquer sur « exporter »
3) Exécuter
4) Copier le fichier SQL de la BD dans ton dossier de travail (la base est par défaut
téléchargée dans le dossier « téléchargement »).