"exo 1 tp3 ok + format"
This commit is contained in:
parent
1a50cabfb4
commit
4f71cbdf93
@ -1,3 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* @ Author: JunkJumper
|
||||||
|
* @ Link: https://github.com/JunkJumper
|
||||||
|
* @ Copyright: Creative Common 4.0 (CC BY 4.0)
|
||||||
|
* @ Create Time: 05-10-2020 10:29:38
|
||||||
|
* @ Modified by: JunkJumper
|
||||||
|
* @ Modified time: 05-10-2020 10:52:29
|
||||||
|
*/
|
||||||
|
|
||||||
.radial-timer {
|
.radial-timer {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
height: 144px;
|
height: 144px;
|
||||||
|
@ -1,76 +1,91 @@
|
|||||||
|
<!--
|
||||||
|
@ Author: JunkJumper
|
||||||
|
@ Link: https://github.com/JunkJumper
|
||||||
|
@ Copyright: Creative Common 4.0 (CC BY 4.0)
|
||||||
|
@ Create Time: 05-10-2020 10:29:32
|
||||||
|
@ Modified by: JunkJumper
|
||||||
|
@ Modified time: 05-10-2020 10:51:10
|
||||||
|
-->
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
p {
|
||||||
|
font-weight: bold;
|
||||||
|
color: grey;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
p {
|
p#rep {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color : grey;
|
color: red;
|
||||||
text-align : center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
p#rep {
|
|
||||||
font-weight: bold;
|
|
||||||
color : red;
|
|
||||||
text-align : center;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<link href="./anim.css" rel="stylesheet">
|
<link href="./anim.css" rel="stylesheet">
|
||||||
<?php
|
<?php
|
||||||
$checkN = false;
|
$checkN = false;
|
||||||
$checkE = false;
|
$checkE = false;
|
||||||
$tab = $_REQUEST['formulaire'];
|
$tab = $_REQUEST['formulaire'];
|
||||||
$vins = "";
|
$vins = "";
|
||||||
$denom = "";
|
$denom = "Damoixe";
|
||||||
|
|
||||||
if($tab['genre'] == "Homme") {
|
if ($tab['genre'] == "Homme") {
|
||||||
$denom = "Monsieur";
|
$denom = "Monsieur";
|
||||||
} else if ($tab['genre'] == "Femme") {
|
} else if ($tab['genre'] == "Femme") {
|
||||||
$denom = "Madamme";
|
$denom = "Madamme";
|
||||||
} else {
|
}
|
||||||
$denom = "Damoixe";
|
|
||||||
|
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 . ' , ';
|
||||||
}
|
}
|
||||||
|
|
||||||
if(preg_match("#[a-zA-Z_]#", $tab['nom']) && preg_match("#[a-zA-Z_]#",$tab['prenom'])) {
|
echo '<p>Votre nom est : ' . $tab['nom'] . '</p>';
|
||||||
$checkN = true;
|
echo '<p>Votre prenom est : ' . $tab['prenom'] . '</p>';
|
||||||
|
if ($tab['sexe'] != null) {
|
||||||
|
echo '<p>Votre genre est : ' . $tab['genre'] . '</p>';
|
||||||
}
|
}
|
||||||
|
if ($vins != null) {
|
||||||
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'])) {
|
echo '<p>Votre sélection de vin(s) est : ' . $vins . '</p>';
|
||||||
$checkE = true;
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
echo '<p>Votre nom ou prénom n\'est pas correct.</p>';
|
||||||
|
}
|
||||||
|
|
||||||
if($checkN) {
|
if ($checkE) {
|
||||||
foreach ($tab['vins'] as $key => $valeur) {
|
echo '<p>Votre mail est : ' . $tab['email'] . '</p>';
|
||||||
$vins = $valeur .' , ';
|
} else {
|
||||||
}
|
echo '<p>Votre email n\'est pas correct.</p>';
|
||||||
|
}
|
||||||
|
|
||||||
echo '<p>Votre nom est : ' .$tab['nom'] .'</p>';
|
if ($checkE && $checkN) {
|
||||||
echo '<p>Votre prenom est : ' .$tab['prenom'] .'</p>';
|
echo '<p id="rep">Bonjour ' . $denom . ' ' . $tab['nom'] . ' ' . $tab['prenom'] . ',<br />
|
||||||
if ($tab['sexe'] != null) {echo '<p>Votre genre est : ' .$tab['genre'] .'</p>';}
|
Nous vous remercions d’avoir commandé ' . $vins . '<br />'
|
||||||
if ($vins != null) {echo '<p>Votre sélection de vin(s) est : ' .$vins .'</p>';}
|
. 'Un mail de conformation vous a été envoyé à l’adresse : ' . $tab['email'] . '</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 ' .$denom .' ' .$tab['nom'] .' ' .$tab['prenom'] .',<br />
|
|
||||||
Nous vous remercions d’avoir commandé ' .$vins .'<br />'
|
|
||||||
.'Un mail de conformation vous a été envoyé à l’adresse : ' .$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>
|
<br /><br /><br /><br />
|
||||||
<script>
|
<center>
|
||||||
setTimeout(function () {
|
<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";
|
window.location.href = "./index.php";
|
||||||
}, 5000);
|
}, 5000);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</html>
|
</html>
|
@ -1,3 +1,12 @@
|
|||||||
|
<!--
|
||||||
|
@ Author: JunkJumper
|
||||||
|
@ Link: https://github.com/JunkJumper
|
||||||
|
@ Copyright: Creative Common 4.0 (CC BY 4.0)
|
||||||
|
@ Create Time: 05-10-2020 10:29:32
|
||||||
|
@ Modified by: JunkJumper
|
||||||
|
@ Modified time: 05-10-2020 10:51:10
|
||||||
|
-->
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<link href="./anim.css" rel="stylesheet">
|
<link href="./anim.css" rel="stylesheet">
|
||||||
<?php
|
<?php
|
||||||
|
Loading…
x
Reference in New Issue
Block a user