"refonte debut annee"

This commit is contained in:
JunkJumper
2020-09-07 10:27:18 +02:00
parent 4a2209224c
commit b95bd91fad
38 changed files with 603 additions and 1 deletions

72
2019-2020/TD3/anim.css Executable file
View File

@ -0,0 +1,72 @@
.radial-timer {
overflow: hidden;
height: 144px;
width: 144px;
position: relative;
}
.radial-timer .radial-timer-half {
height: 144px;
width: 72px;
border-radius: 72px 0 0 72px;
background: red;
position: absolute;
}
.radial-timer .radial-timer-half:nth-of-type(2) {
z-index: 99999999;
-webkit-transform-origin: center right;
-webkit-transform: rotate(180deg);
}
.radial-timer .radial-timer-half:before {
content: "";
position: absolute;
top: 9px;
left: 9px;
height: 126px;
width: 63px;
border-radius: 67.5px 0 0 67.5px;
background: rgb(255, 255, 255);
}
.radial-timer .radial-timer-half:after {
content: "";
position: absolute;
background: rgb(255, 255, 255);
height: 288px;
width: 216px;
left: -144px;
top: -72px;
-webkit-transform-origin: center right;
}
.radial-timer.s-animate {
-webkit-transform-origin: center right;
}
.radial-timer.s-animate .radial-timer-half:nth-of-type(1):after {
-webkit-animation: rotateLeftMask 3s infinite linear;
}
.radial-timer.s-animate .radial-timer-half:nth-of-type(2):after {
-webkit-animation: rotateRightMask 3s infinite linear;
}
@-webkit-keyframes rotateLeftMask {
0% {
-webkit-transform: rotate(0deg);
}
50% {
-webkit-transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(180deg);
}
}
@-webkit-keyframes rotateRightMask {
0% {
-webkit-transform: rotate(0deg);
}
50% {
-webkit-transform: rotate(180deg);
visibility: hidden;
}
100% {
-webkit-transform: rotate(180deg);
visibility: hidden;
}
}

32
2019-2020/TD3/bak Normal file
View File

@ -0,0 +1,32 @@
/*
if (! (isset($value["prenom"]) || isset($value["nom"])) ) {
echo '<form action="./exo12.php" method="get" name="formulaire">
Nom : <input type="text" name="formulaire[nom]"><br />
Prenom : <input type="text" name="formulaire[prenom]"><br />
Email : <input type="email" name="formulaire[email]"><br />
Sexe : <input type="radio" name="formulaire[sexe]" value="Homme" />Homme
<input type="radio" name="formulaire[sexe]" value="Femme" />Femme
<input type="radio" name="formulaire[sexe]" value="Autre" />Autre(s)<br />
Vin(s) Choisi(s) :
<input type="checkbox" name ="formulaire[vins][st_emilion]" value="St_Emilion" />St Emilion
<input type="checkbox" name ="formulaire[vins][chateau_hermitage]" value="Chateau_Hermitage" />Château lHermitage
<input type="checkbox" name ="formulaire[vins][entre_les_deux_mers]" value="Entre_les_Deux_Mers" />Entre les Deux Mers
<input type="checkbox" name ="formulaire[vins][fitou]" value="Fitou" />Fitou
<input type="checkbox" name ="formulaire[vins][bandol]" value="Bandol" />Bandol
<input type="checkbox" name ="formulaire[vins][cote_de_provence]" value="Cote_de_Provence" />Côte de Provence<br />
<input type="submit" name ="formulaire[send]" value="Envoyer" />
</form>';
} else {
echo "<h1>Valeurs renvoy&eacute;es par ".$value["PHP_SELF"]."</h1>";
echo "Pr&eacute;nom : ".$value["prenom"]."<br/>";
echo "Nom : ".$value["nom"]."<br/>";
echo "Civilit&eacute; : ".$value["civilite"]."<br/>";
echo "Email: ".$value["email"]."<br/>";
echo "Vin(s) sélectioné(s): ";
foreach($value["vin"] as $vaueur) {
echo $t_vin[$valeur]."&nbsp;";
}
}
*/

67
2019-2020/TD3/check.php Normal file
View File

@ -0,0 +1,67 @@
<html>
<style>
p {
font-weight: bold;
color : grey;
text-align : center;
}
p#rep {
font-weight: bold;
color : red;
text-align : center;
}
</style>
<link href="./anim.css" rel="stylesheet">
<?php
$checkN = false;
$checkE = false;
$tab = $_REQUEST['formulaire'];
$vins = "";
if(preg_match("#[a-zA-Z_]#", $tab['nom']) && preg_match("#[a-zA-Z_]#",$tab['prenom'])) {
$checkN = true;
}
if(preg_match("#@#", $tab['email']) && preg_match("#.#",$tab['email']) && preg_match("#[a-zA-Z]{2}@#", $tab['email']) && preg_match("#@[a-zA-Z]{2}.#",$tab['email'])) {
$checkE = true;
}
if($checkN) {
foreach ($tab['vins'] as $key => $valeur) {
$vins = $valeur .'&nbsp,&nbsp';
}
echo '<p>Votre nom est : ' .$tab['nom'] .'</p>';
echo '<p>Votre prenom est : ' .$tab['prenom'] .'</p>';
if ($tab['sexe'] != null) {echo '<p>Votre sexe est : ' .$tab['sexe'] .'</p>';}
if ($vins != null) {echo '<p>Votre sélection de vin(s) est : ' .$vins .'</p>';}
} else {
echo '<p>Votre nom ou prénom n\'est pas correct.</p>';
}
if($checkE) {
echo '<p>Votre mail est : ' .$tab['email'] .'</p>';
} else {
echo '<p>Votre email n\'est pas correct.</p>';
}
if($checkE && $checkN) {
echo '<p id="rep">Bonjour ' .$tab['nom'] .' ' .$tab['prenom'] .',<br />
Nous vous remercions davoir commandé ' .$vins .'<br />'
.'Un mail de conformation vous a été envoyé à ladresse : ' .$tab['email'] .'</p>';
}
?>
<br /><br /><br /><br /> <center><div class="radial-timer s-animate"> <div class="radial-timer-half"></div> <div class="radial-timer-half"></div></center>
<script>
setTimeout(function () {
window.location.href = "./index.php";
}, 3000);
</script>
</html>

93
2019-2020/TD3/exo12.php Executable file
View File

@ -0,0 +1,93 @@
<?php
$send = false;
if ($_REQUEST != null) {
$send = true;
}
?>
<!DOCTYPE html>
<html lang="fr-FR">
<head>
<meta charset ="utf-8" />
<title>TD3 - Génération et traitement des formulaires HTML</title>
</head>
<body>
<h1>TD3 - Génération et traitement des formulaires HTML</h1>
<style>
h1 {
text-align: center;
color : blue;
}
h2 {
text-align: left;
color : DeepSkyBlue ;
}
p {
font-weight: bold;
color : grey;
}
br {
line-height : 3em;
}
br#long {
line-height : 10em;
}
strong.mandatory {
color : red;
}
</style>
<?php
//Array ( [formulaire] => Array ( [nom] => srifi [prenom] => jose [email] => jose.srifi@gmail.com [sexe] => Homme [vins] => Array ( [st_emilion] => St_Emilion ) ) )
if($send) {
echo 'Votre nom est : ' .$_REQUEST['formulaire']['nom'] .'<br />';
echo 'Votre prenom est : ' .$_REQUEST['formulaire']['prenom'] .'<br />';
echo 'Votre mail est : ' .$_REQUEST['formulaire']['email'] .'<br />';
echo 'Votre sexe est : ' .$_REQUEST['formulaire']['sexe'] .'<br />';
echo 'Votre sélection de vin(s) est : ' ;
foreach ($_REQUEST['formulaire']['vins'] as $key => $valeur) {
echo "$valeur" .'&nbsp, ';
}
echo '<br id="long" /><a href="./exo12.php"><button class="favorite styled" type="button">Reset</button></a>';
} else {
echo ' <p>Les champs marqués d\'une <strong class="mandatory">*</strong> sont obligatoires</p>
<form action="./exo12.php" method="post" name="formulaire">
<strong class="mandatory">*</strong>Nom : <input type="text" name="formulaire[nom]"><br />
<strong class="mandatory">*</strong>Prenom : <input type="text" name="formulaire[prenom]" required /><br />
<strong class="mandatory">*</strong>Email : <input type="email" name="formulaire[email]"required /><br />
Sexe : <input type="radio" name="formulaire[sexe]" value="Homme" />Homme
<input type="radio" name="formulaire[sexe]" value="Femme" />Femme
<input type="radio" name="formulaire[sexe]" value="Autre" />Autre(s)<br />
Vin(s) Choisi(s) :
<input type="checkbox" name ="formulaire[vins][st_emilion]" value="St_Emilion" />St Emilion
<input type="checkbox" name ="formulaire[vins][chateau_hermitage]" value="Chateau_Hermitage" />Château lHermitage
<input type="checkbox" name ="formulaire[vins][entre_les_deux_mers]" value="Entre_les_Deux_Mers" />Entre les Deux Mers
<input type="checkbox" name ="formulaire[vins][fitou]" value="Fitou" />Fitou
<input type="checkbox" name ="formulaire[vins][bandol]" value="Bandol" />Bandol
<input type="checkbox" name ="formulaire[vins][cote_de_provence]" value="Cote_de_Provence" />Côte de Provence<br />
<input type="submit" value="Envoyer" />
</form>';
}
?>
<br id="long" /><a href="./.."><button class="favorite styled" type="button">Retour à la liste des sites.</button></a>
</body>
</html>

63
2019-2020/TD3/index.php Executable file
View File

@ -0,0 +1,63 @@
<!DOCTYPE html>
<html lang="fr-FR">
<head>
<meta charset ="utf-8" />
<title>TD3 - Génération et traitement des formulaires HTML</title>
</head>
<body>
<h1>TD3 - Génération et traitement des formulaires HTML</h1>
<style>
h1 {
text-align: center;
color : blue;
}
h2 {
text-align: left;
color : DeepSkyBlue ;
}
p {
font-weight: bold;
color : grey;
}
br {
line-height : 3em;
}
br#long {
line-height : 10em;
}
strong.mandatory {
color : red;
}
</style>
<p>Les champs marqués d'une <strong class="mandatory">*</strong> sont obligatoires</p>
<form action="./check.php" method="post" name="formulaire">
<strong class="mandatory">*</strong>Nom : <input type="text" name="formulaire[nom]"><br />
<strong class="mandatory">*</strong>Prenom : <input type="text" name="formulaire[prenom]" required /><br />
<strong class="mandatory">*</strong>Email : <input type="email" name="formulaire[email]"required /><br />
Sexe : <input type="radio" name="formulaire[sexe]" value="Homme" />Homme
<input type="radio" name="formulaire[sexe]" value="Femme" />Femme
<input type="radio" name="formulaire[sexe]" value="Autre" />Autre(s)<br />
Vin(s) Choisi(s) :
<input type="checkbox" name ="formulaire[vins][st_emilion]" value="St_Emilion" />St Emilion
<input type="checkbox" name ="formulaire[vins][chateau_hermitage]" value="Chateau_Hermitage" />Château lHermitage
<input type="checkbox" name ="formulaire[vins][entre_les_deux_mers]" value="Entre_les_Deux_Mers" />Entre les Deux Mers
<input type="checkbox" name ="formulaire[vins][fitou]" value="Fitou" />Fitou
<input type="checkbox" name ="formulaire[vins][bandol]" value="Bandol" />Bandol
<input type="checkbox" name ="formulaire[vins][cote_de_provence]" value="Cote_de_Provence" />Côte de Provence<br />
<input type="submit" value="Envoyer" />
</form>
<br id="long" /><a href="./.."><button class="favorite styled" type="button">Retour à la liste des sites.</button></a>
</body>
</html>

15
2019-2020/TD3/post.php Normal file
View File

@ -0,0 +1,15 @@
<html>
<link href="./anim.css" rel="stylesheet">
<?php
print_r($_REQUEST);
?>
<br /><br /><br /><br /> <center><div class="radial-timer s-animate"> <div class="radial-timer-half"></div> <div class="radial-timer-half"></div></center>
<script>
setTimeout(function () {
window.location.href = "./index.php";
}, 3000);
</script>
</html>

82
2019-2020/TD3/voitures.php Executable file
View File

@ -0,0 +1,82 @@
<?php
$voiture = array(
"Renault" => array(
"Twingo" => 9999,
"Clio" => 11999,
"Megane" => 13999,
"Laguna"=> 18999
),
"Peugeot" => array(
"107" => 8999,
"207" => 12499,
"308" => 14999,
"508" => 19999
),
"Citroen" => array(
"C1" => 11999,
"C3" => 16549,
"C4" => 22549,
"C5" => 18999
),
"Volkswagen" => array(
"Lupo" => 8549,
"Polo" => 11549,
"Golf" => 16549,
"Passat" => 22549
)
);
?>
<!DOCTYPE html>
<html lang="fr-FR">
<head>
<meta charset ="utf-8" />
<title>TD3 - Génération et traitement des formulaires HTML</title>
</head>
<body>
<h1>TD3 - Génération et traitement des formulaires HTML</h1>
<style>
h1 {
text-align: center;
color : blue;
}
h2 {
text-align: left;
color : DeepSkyBlue ;
}
p {
font-weight: bold;
color : grey;
}
br {
line-height : 3em;
}
br#long {
line-height : 10em;
}
strong.mandatory {
color : red;
}
</style>
<p>Les champs marqués d'une <strong class="mandatory">*</strong> sont obligatoires</p>
<br id="long" /><a href="./.."><button class="favorite styled" type="button">Retour à la liste des sites.</button></a>
</body>
</html>