diff --git a/ScripInscription.php b/ScripInscription.php index dd47b27088e0a90a771344dea56c16747f1ba7e7..673b0b9c2e54b68055dafea2797a70b88e78260d 100644 --- a/ScripInscription.php +++ b/ScripInscription.php @@ -1,5 +1,4 @@ <!-- FORMULAIRE EMAIL --> - <?php $conn = mysqli_connect('localhost', 'root', 'root', 'mydb') or die(mysqli_error($conn)); @@ -17,25 +16,34 @@ if (isset($_POST['mail'], $_POST['prenom1'], $_POST['nom1'], $_POST['age1'], $_P $AGE1 = $_POST['age1']; $CHMDP1 = hashPassword($_POST['choisirmdp1']); - $req = "INSERT INTO adherentsemail (AdresseMail, Nom, Prenom, Age, MotDePasse) VALUES ('$MAIL', '$NOM1', '$PRNOM1', '$AGE1', '$CHMDP1')"; - $req = "INSERT INTO members (login, password) VALUES ('$MAIL', '$CHMDP1')"; - - $res = mysqli_query($conn, $req); + // Vérification pour l'adresse e-mail + $mailExistQuery = "SELECT COUNT(*) AS count FROM adherentsemail WHERE AdresseMail = '$MAIL'"; + $mailExistResult = mysqli_query($conn, $mailExistQuery); + $mailExistRow = mysqli_fetch_assoc($mailExistResult); - if ($res) { - echo "Inscription réussie !"; + // Vérification si l'adresse e-mail existe déjà + if ($mailExistRow['count'] > 0) { + echo "<script>alert('L\'adresse mail est déjà prise'); window.location.href = 'inscription.php';</script>"; + exit(); } else { - echo "Erreur d'enregistrement : " . mysqli_error($conn); + $reqEmail = "INSERT INTO adherentsemail (AdresseMail, Nom, Prenom, Age, MotDePasse) VALUES ('$MAIL', '$NOM1', '$PRNOM1', '$AGE1', '$CHMDP1')"; + $resEmail = mysqli_query($conn, $reqEmail); + + $reqMembers = "INSERT INTO members (login, password) VALUES ('$MAIL', '$CHMDP1')"; + $resMembers = mysqli_query($conn, $reqMembers); + + if ($resEmail && $resMembers) { + echo "<script>alert('Inscription réussie !'); window.location.href = 'inscription.php';</script>"; + exit(); + } else { + echo "<script>alert('Erreur d\'enregistrement : " . mysqli_error($conn) . "'); window.location.href = 'inscription.php';</script>"; + exit(); + } } - - mysqli_close($conn); } // FORMULAIRE TELEPHONE -$conn = mysqli_connect('localhost', 'root', 'root', 'mydb') or die(mysqli_error($conn)); - - if (isset($_POST['tel'], $_POST['prenom2'], $_POST['nom2'], $_POST['age2'], $_POST['choisirmdp2'])) { $TEL = $_POST['tel']; $PRNOM2 = $_POST['prenom2']; @@ -43,18 +51,30 @@ if (isset($_POST['tel'], $_POST['prenom2'], $_POST['nom2'], $_POST['age2'], $_PO $AGE2 = $_POST['age2']; $CHMDP2 = hashPassword($_POST['choisirmdp2']); - $req = "INSERT INTO adherentstel (NumeroTelephone, Nom, Prenom, Age, MotDePasse) VALUES ('$TEL', '$NOM2', '$PRNOM2', '$AGE2', '$CHMDP2')"; - $req = "INSERT INTO members (login, password) VALUES ('$TEL', '$CHMDP2')"; + // Vérification pour le numéro de téléphone + $telExistQuery = "SELECT COUNT(*) AS count FROM adherentstel WHERE NumeroTelephone = '$TEL'"; + $telExistResult = mysqli_query($conn, $telExistQuery); + $telExistRow = mysqli_fetch_assoc($telExistResult); - $res = mysqli_query($conn, $req); - - if ($res) { - echo "Inscription réussie !"; + if ($telExistRow['count'] > 0) { + echo "<script>alert('Le numéro de téléphone est déjà pris'); window.location.href = 'inscription.php';</script>"; + exit(); } else { - echo "Erreur d'enregistrement : " . mysqli_error($conn); + $reqTel = "INSERT INTO adherentstel (NumeroTelephone, Nom, Prenom, Age, MotDePasse) VALUES ('$TEL', '$NOM2', '$PRNOM2', '$AGE2', '$CHMDP2')"; + $resTel = mysqli_query($conn, $reqTel); + + $reqMembers = "INSERT INTO members (login, password) VALUES ('$TEL', '$CHMDP2')"; + $resMembers = mysqli_query($conn, $reqMembers); + + if ($resTel && $resMembers) { + echo "<script>alert('Inscription réussie !'); window.location.href = 'inscription.php';</script>"; + exit(); + } else { + echo "<script>alert('Erreur d\'enregistrement : " . mysqli_error($conn) . "'); window.location.href = 'inscription.php';</script>"; + exit(); + } } } mysqli_close($conn); - ?> \ No newline at end of file diff --git a/index.php b/index.php index ace755b0ffab7fccb99518847e568a820b7f29e1..de352c76f883ee706c44c252887d4ddf499785a7 100644 --- a/index.php +++ b/index.php @@ -44,17 +44,10 @@ require('header.php'); suivent pas les règles conventionnelles, mais créent les leurs. La stratégie de l'équipe repose sur la spontanéité, la créativité et une collaboration sans faille entre les joueurs.</br> - <br>Le logo de MatchZéro représente une roue dentée stylisée, symbolisant la mécanique bien huilée de l'équipe. - Chaque joueur est une pièce essentielle de cette machine, contribuant à la réussite collective du club.</br> - - <br>En dehors des matchs, MatchZéro organise des événements spectaculaires pour les supporters. Des feux - d'artifice + <br>En dehors des matchs, MatchZéro organise des événements spectaculaires pour les supporters. synchronisés avec des victoires éclatantes aux séances d'entraînement ouvertes au public, le club offre des moments inoubliables à ses fidèles partisans.</br> - <br>MatchZéro est également engagé dans des initiatives communautaires, investissant dans des projets sociaux et - environnementaux pour créer un impact positif au-delà du monde du football.</br> - <br>Que vous soyez un joueur passionné, un supporter dévoué ou simplement un amateur de sensations fortes, MatchZéro vous invite à vous joindre à cette aventure sans limites où chaque match est une opportunité de tout @@ -67,11 +60,13 @@ require('header.php'); </div> <div class="textbut"> - Le Club MatchZéro lance avec enthousiasme l'"Opération Dynamo Football", une initiative visionnaire qui vise à + <br>Le Club MatchZéro lance avec enthousiasme l'"Opération Dynamo Football", une initiative visionnaire qui vise + à dynamiser tous les aspects du club, du jeu sur le terrain à l'engagement communautaire. Cette opération repose - sur trois principaux piliers : + sur trois principaux piliers :</br> - <br>Performance Décisive sur le Terrain : L'Opération Dynamo Football cherche à élever le niveau de performance de + <br>Performance Décisive sur le Terrain : L'Opération Dynamo Football cherche à élever le niveau de performance + de l'équipe, en mettant l'accent sur des tactiques novatrices, une coordination sans faille et une détermination inébranlable. L'objectif ultime est de devenir une force incontestable dans le monde du football, repoussant constamment les frontières de l'excellence.</br> diff --git a/indexCSS.css b/indexCSS.css index 7fb0017a92e8dea38d393bbeb69c8e616a381c4c..537bfa9b25fbba7bad9b1bb44396622f1901ff13 100644 --- a/indexCSS.css +++ b/indexCSS.css @@ -84,34 +84,34 @@ .evenement1 { font-weight: bold; font-family: 'kufam'; - font-size: 50px; + font-size: 30px; color: #3C893B; } .evenement2 { font-weight: bold; font-family: 'kufam'; - font-size: 50px; + font-size: 30px; color: #3C893B; } .evenement3 { font-weight: bold; font-family: 'kufam'; - font-size: 50px; + font-size: 30px; color: #3C893B; } .carousel-container { - height: 100%; - width: 85%; + height: 1300px; + width: 1000px; position: relative; overflow: hidden; text-align: center; z-index: 1; justify-content: center; margin: 0 auto; - margin-bottom: 100px; + margin-bottom: -400px; margin-top: 200px; } diff --git a/inscription.php b/inscription.php index 8ba8b52428a0c7aae29bb6fb30d6caed44b88173..90b5f263f580f86e9e3663ea04c84aa022965a94 100644 --- a/inscription.php +++ b/inscription.php @@ -24,15 +24,15 @@ <div class="Rectangle13"></div> <input type="text" id="Rectangle14" name="mail" size="25" /> <div class="EntreTonAdresseEMail">Entre ton adresse e-mail</div> - <input type="text" id="Rectangle16" name="choisirmdp1" size="25" /> + <input type="password" id="Rectangle16" name="choisirmdp1" size="25" /> <div class="ChoisirUnMotDePasse">Choisir un mot de passe</div> <input type="text" id="Rectangle17" name="nom1" size="25" /> <input type="text" id="Rectangle18" name="prenom1" size="25" /> <div class="PrNom">Prénom</div> <div class="Nom">Nom</div> <div class="Age">Âge</div> - <input type="text" id="Rectangle19" name="age1" size="25" /> - <div id="passwordError" style="color: red; display: none;">Les mots de passe ne correspondent pas.</div> + <input type="number" id="Rectangle19" name="age1" size="25" min="0"/> + <button class="SInscrirebtn1 cursor-pointer" name="SInscrirebtn" onclick="submitForm('email', 'SInscrirebtn1')">S’inscrire </button> </div> @@ -43,15 +43,15 @@ <div class="Rectangle13"></div> <input type="text" id="Rectangle144" name="tel" size="25" /> <div class="EntreTonNumeroDeTelephone">Entre ton numéro de téléphone</div> - <input type="text" id="Rectangle166" name="choisirmdp2" size="25" /> + <input type="password" id="Rectangle166" name="choisirmdp2" size="25" /> <div class="ChoisirUnMotDePasse">Choisir un mot de passe</div> <input type="text" id="Rectangle177" name="nom2" size="25" /> <input type="text" id="Rectangle188" name="prenom2" size="25" /> <div class="PrNom">Prénom</div> <div class="Nom">Nom</div> <div class="Age">Âge</div> - <input type="text" id="Rectangle199" name="age2" size="25" /> - <div id="passwordError" style="color: red; display: none;">Les mots de passe ne correspondent pas.</div> + <input type="number" id="Rectangle199" name="age2" size="25" min="0"/> + <button class="SInscrirebtn2 cursor-pointer" name="SInscrirebtn" onclick="submitForm('tel', 'SInscrirebtn2')">S’inscrire </button> </div> diff --git a/inscriptionCSS.css b/inscriptionCSS.css index c99ad23e28198c18f10e1b420076691ec7d9ed2a..f853dc130e6d56c338fa0c97802fa9d2ea72f31a 100644 --- a/inscriptionCSS.css +++ b/inscriptionCSS.css @@ -1,3 +1,4 @@ +/* Style général */ .SInscrire { width: 1264px; height: 489px; @@ -32,54 +33,26 @@ word-wrap: break-word; } -.Rectangle5 { - width: 721px; - height: 52.70px; - left: 264px; - top: 183.67px; - position: absolute; - background: #D9D9D9; - border-radius: 15px; - transition: .4s ease; -} - -.AvecTonAdresseEMail { - width: 368px; - height: 14.72px; - left: 180px; - top: 10px; - position: absolute; - color: black; - font-size: 30px; - font-family: Kufam; - font-weight: 400; - word-wrap: break-word; -} - +/* Boutons de choix */ +.Rectangle5, .Rectangle6 { width: 721px; height: 52.70px; - left: 257px; - top: 344.08px; position: absolute; background: #D9D9D9; border-radius: 15px; transition: .4s ease; } +.Rectangle5:hover, .Rectangle6:hover { height: 60px; } -.Rectangle5:hover { - height: 60px; -} - +.AvecTonAdresseEMail, .AvecTonNumRoDeTLPhone { width: 462px; height: 29.45px; - left: 180px; - top: 10px; position: absolute; color: black; font-size: 30px; @@ -88,9 +61,19 @@ word-wrap: break-word; } -/* Style du choix par email */ +.Rectangle5 { + left: 264px; + top: 183.67px; +} -.EMail { +.Rectangle6 { + left: 257px; + top: 344.08px; +} + +/* Style du choix par email */ +.EMail, +.TEL { width: 1264px; height: 1121px; margin-top: -90px; @@ -111,11 +94,14 @@ border: 1px black solid; } -#Rectangle14 { - width: 721px; - height: 62px; - left: 257px; - top: 66px; +/* Styles spécifiques (email) */ +.EMail #Rectangle14, +.EMail #Rectangle15, +.EMail #Rectangle16, +.EMail #Rectangle17, +.EMail #Rectangle18, +.EMail #Rectangle19, +.SInscrirebtn1 { position: absolute; background: #D9D9D9; border-radius: 15px; @@ -135,22 +121,11 @@ word-wrap: break-word; } -#Rectangle15 { - width: 721px; - height: 62px; - left: 257px; - top: 857px; - position: absolute; - background: #D9D9D9; - border-radius: 15px; - font-size: 20px; -} - -.ConfirmeTonMotDePasse { - width: 393px; - height: 36px; - left: 263px; - top: 821px; +.ConfirmeTonMotDePasse, +.ChoisirUnMotDePasse, +.PrNom, +.Nom, +.Age { position: absolute; color: black; font-size: 30px; @@ -159,79 +134,44 @@ word-wrap: break-word; } -#Rectangle16 { - width: 721px; - height: 62px; - left: 257px; - top: 699px; - position: absolute; - background: #D9D9D9; - border-radius: 15px; - font-size: 20px; -} - -.ChoisirUnMotDePasse { - width: 349px; - height: 36px; - left: 263px; - top: 663px; - position: absolute; - color: black; - font-size: 30px; +.SInscrirebtn1 { + width: 299px; + height: 79px; + left: 457px; + top: 942px; + text-align: center; + font-size: 45px; font-family: Kufam; font-weight: 400; word-wrap: break-word; + background: #FB7373; + border-radius: 15px; + transition: .4s ease; } -#Rectangle17 { - width: 721px; - height: 63px; - left: 257px; - top: 382px; - position: absolute; - background: #D9D9D9; - border-radius: 15px; - font-size: 20px; +.SInscrirebtn1:hover { + height: 99px; } -#Rectangle18 { - width: 721px; - height: 62px; - left: 257px; - top: 224px; +/* Styles spécifiques (téléphone) */ +.TEL #Rectangle144, +.TEL #Rectangle155, +.TEL #Rectangle166, +.TEL #Rectangle177, +.TEL #Rectangle188, +.TEL #Rectangle199, +.SInscrirebtn2 { position: absolute; background: #D9D9D9; border-radius: 15px; font-size: 20px; } -.PrNom { - width: 114px; +.EntreTonNumeroDeTelephone { + width: 468px; height: 36px; left: 263px; - top: 188px; - position: absolute; - color: black; - font-size: 30px; - font-family: Kufam; - font-weight: 400; - word-wrap: break-word; -} - -.Nom { - left: 263px; - top: 346px; - position: absolute; - color: black; - font-size: 30px; - font-family: Kufam; - font-weight: 400; - word-wrap: break-word; -} - -.Age { - left: 263px; - top: 505px; + top: 30px; position: absolute; color: black; font-size: 30px; @@ -240,39 +180,11 @@ word-wrap: break-word; } -#Rectangle19 { - width: 721px; - height: 63px; - left: 257px; - top: 541px; - position: absolute; - background: #D9D9D9; - border-radius: 15px; - font-size: 20px; -} - -.SInscrirebtn1 { - width: 299px; - height: 79px; - left: 457px; - top: 942px; - position: absolute; - text-align: center; - font-size: 45px; - font-family: Kufam; - font-weight: 400; - word-wrap: break-word; - background: #FB7373; - border-radius: 15px; - transition: .4s ease; -} - .SInscrirebtn2 { width: 299px; height: 79px; left: 457px; top: 942px; - position: absolute; text-align: center; font-size: 45px; font-family: Kufam; @@ -283,101 +195,6 @@ transition: .4s ease; } -.SInscrirebtn1:hover { - height: 99px; -} - .SInscrirebtn2:hover { height: 99px; -} - -/* STYLE POUR TELEPHONE */ - -.TEL { - width: 1264px; - height: 1121px; - margin-top: -90px; - margin-left: 300px; - margin-bottom: 300px; - z-index: 3; - position: relative; -} - -.EntreTonNumeroDeTelephone { - width: 468px; - height: 36px; - left: 263px; - top: 30px; - position: absolute; - color: black; - font-size: 30px; - font-family: Kufam; - font-weight: 400; - word-wrap: break-word; -} - -#Rectangle144 { - width: 721px; - height: 62px; - left: 257px; - top: 66px; - position: absolute; - background: #D9D9D9; - border-radius: 15px; - font-size: 20px; -} - -#Rectangle155 { - width: 721px; - height: 62px; - left: 257px; - top: 857px; - position: absolute; - background: #D9D9D9; - border-radius: 15px; - font-size: 20px; -} - -#Rectangle166 { - width: 721px; - height: 62px; - left: 257px; - top: 699px; - position: absolute; - background: #D9D9D9; - border-radius: 15px; - font-size: 20px; -} - -#Rectangle177 { - width: 721px; - height: 63px; - left: 257px; - top: 382px; - position: absolute; - background: #D9D9D9; - border-radius: 15px; - font-size: 20px; -} - -#Rectangle188 { - width: 721px; - height: 62px; - left: 257px; - top: 224px; - position: absolute; - background: #D9D9D9; - border-radius: 15px; - font-size: 20px; -} - -#Rectangle199 { - width: 721px; - height: 63px; - left: 257px; - top: 541px; - position: absolute; - background: #D9D9D9; - border-radius: 15px; - font-size: 20px; } \ No newline at end of file diff --git a/uploads/certificat_lantz_nathan.png b/uploads/certificat_lantz_nathan.png new file mode 100644 index 0000000000000000000000000000000000000000..e020adabeb9d527f477be6176d347e93f4bb35a5 Binary files /dev/null and b/uploads/certificat_lantz_nathan.png differ