sacha.serny
3 years ago
11 changed files with 470 additions and 148 deletions
@ -0,0 +1 @@ |
|||
"C:\Users\MiniV\OneDrive - lycée Paul Constans\Cours\1re\NSI\sernyS_nsi_web\style\style_index.css.map" |
Binary file not shown.
@ -0,0 +1,110 @@ |
|||
<!-- Traitement PHP --> |
|||
<?php |
|||
/* |
|||
Faire de la sécurité et de l'optimisation |
|||
Ce code est pourri |
|||
*/ |
|||
$servername = 'mysql-serny-nsi.alwaysdata.net'; |
|||
$username = 'serny-nsi'; |
|||
$mdp = 'ecole9090*'; |
|||
|
|||
$bdd = new PDO('mysql:host=mysql-serny-nsi.alwaysdata.net;dbname=serny-nsi_main', $username, $mdp); |
|||
|
|||
if (isset($_POST['submit'])) { |
|||
|
|||
if (isset($_POST["f_email"]) AND !empty($_POST["f_email"]) AND isset($_POST["f_pseudo"]) AND !empty($_POST["f_pseudo"])AND isset($_POST["f_password"]) AND !empty($_POST["f_password"]) AND isset($_POST['f_password2']) AND !empty($_POST['f_password2'])) { |
|||
if ($_POST['f_password'] == $_POST['f_password2']) { |
|||
$password = password_hash(htmlspecialchars($_POST['password']), PASSWORD_BCRYPT); |
|||
$pseudo = htmlspecialchars($_POST['f_pseudo']); |
|||
$mail = htmlspecialchars($_POST['f_email']); |
|||
$mail2 = htmlspecialchars($_POST['f_email2']); |
|||
if($mail == $mail2) { |
|||
if (strlen($pseudo) < 254) { |
|||
if (strlen($mail) < 254) { |
|||
$look = $bdd->prepare("SELECT * FROM membres WHERE pseudo = ?"); |
|||
$look->execute(array($pseudo)); |
|||
$alreadyexist = -1; |
|||
$alreadyexist = $look->rowCount(); |
|||
$lookmail = $bdd->prepare("SELECT * FROM membres WHERE mail = ?"); |
|||
$lookmail->execute(array($mail)); |
|||
$alreadyexist2 = -1; |
|||
$alreadyexist2 = $lookmail->rowCount(); |
|||
if ($alreadyexist == 0 AND $alreadyexist2 == 0) { |
|||
$ins = $bdd->prepare("INSERT INTO membres(pseudo, mail, password, signup_date) VALUES(?, ?, ?, now())"); |
|||
$ins->execute(array($pseudo, $mail, $password)); |
|||
$erreur ="Vous avez été correctement inscrit dans notre base de donnée."; |
|||
} else { |
|||
$erreur ="Ce pseudo/mail est déjà utilisé"; |
|||
} |
|||
} else { |
|||
$erreur ="Le mail est trop long (max 255c)"; |
|||
} |
|||
} else { |
|||
$erreur ="Le pseudo est trop long (max 255c)"; |
|||
} |
|||
} else { |
|||
$erreur = "Les mails sont différents."; |
|||
} |
|||
} else { |
|||
$erreur = "Les mots de passe sont différents."; |
|||
} |
|||
} |
|||
} |
|||
|
|||
|
|||
?> |
|||
<!DOCTYPE html> |
|||
<html lang="fr"> |
|||
|
|||
<head> |
|||
<title>Conenxion</title> |
|||
<meta charset="UTF-8"> |
|||
<link href="style/style_log.css" rel="stylesheet"> |
|||
<link rel="icon" type="image/x-icon" href="_content/favicon-32x32.png"> |
|||
</head> |
|||
|
|||
<body> |
|||
<div class="log-area"> |
|||
<p>Inscris-toi pour accéder à plus de foncitonnalités</p> |
|||
<form action="" method="POST"> |
|||
<div class="f_inputs"> |
|||
<div> |
|||
<label for="f_pseudo">Pseudo : </label><input type="text" id="f_pseudo" maxlength="70" |
|||
placeholder="Pseudo" name="f_pseudo" autocomplete="off"> |
|||
</div> |
|||
<div> |
|||
<label for="f_email">Adresse mail : </label><input type="email" id="f_email" maxlength="70" |
|||
placeholder="Adresse mail" name="f_email" autocomplete="off"> |
|||
</div> |
|||
<div> |
|||
<label for="f_email2">Confirmer : </label><input type="email" id="f_email2" maxlength="70" |
|||
placeholder="Confirmer" |
|||
name="f_email2" autocomplete="off"> |
|||
</div> |
|||
<div> |
|||
<label for="f_password">Mot de passe : </label><input type="password" id="f_password" maxlength="40" |
|||
placeholder="Mot de passe" |
|||
name="f_password" autocomplete="off"> |
|||
</div> |
|||
<div> |
|||
<label for="f_password2"> Confirmer : </label><input type="password" id="f_password2" |
|||
maxlength="40" placeholder="Confirmer" |
|||
name="f_password2" autocomplete="off"> |
|||
</div> |
|||
</div> |
|||
<div class="buttons"> |
|||
<div class="sign_up"> |
|||
<a href="sign_in.html">Déjà un compte ?</a> |
|||
</div> |
|||
<div class="sign_in"> |
|||
<input type="submit" name="submit" value="S'inscrire" id="submit"> |
|||
</div> |
|||
</div> |
|||
<div> |
|||
<?= $erreur ?> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</body> |
|||
|
|||
</html> |
@ -1 +1 @@ |
|||
{"version":3,"sourceRoot":"","sources":["styles_index.scss"],"names":[],"mappings":"AAAQ;AACA;AACA;AACR;EACC;;;AAED;EACC;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;;AAGC;EACC;EACD;;AAID;EACC;EACA;EACA;EACA;EACA;EACA;;AAGA;EACC;EACA;;AAED;EASC;EACA;EACA;EACA;;AAXA;EACC;EACA;EACA;;AASD;EACC;;AAKH;EACC;EACA;EACA;EACA;EACA;;AACA;EACC;EACA;EAqEA;EACA;EACA;EACA;EACA;;AAxEA;EACC;EACA;;AAED;EACC;EACA;EACA;;AAEC;EACC;EACA;EACA;EACA;EACA;EACA;;AAIH;EACC;EACA;EACA;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACC;EACA;;AAED;EACC;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AAED;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGA;EACC;EACA;;AAaL;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;EACA;;AAED;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA","file":"style_index.css"} |
|||
{"version":3,"sourceRoot":"","sources":["styles_index.scss"],"names":[],"mappings":"AAAQ;AACA;AACA;AACR;EACC;;;AAED;EACC;;;AAED;EACC;IACC;;;AAGF;EACC;EACA;EACA;EACA;EACA;EACA;;AAGC;EACC;EACD;;AAID;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;;AAED;EACC;EACA;EACA;;AAIA;EACC;;AAED;EACC;;AAED;EACC;;AAGF;EACC;EACA;;AAED;EASC;EACA;EACA;EACA;;AAXA;EACC;EACA;EACA;;AASD;EACC;;AAKH;EACC;EACA;EACA;EACA;EACA;;AACA;EACC;EACA;EAqEA;EACA;EACA;EACA;EACA;;AAxEA;EACC;EACA;;AAED;EACC;EACA;EACA;;AAEC;EACC;EACA;EACA;EACA;EACA;EACA;;AAIH;EACC;EACA;EACA;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACC;EACA;;AAED;EACC;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AAED;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGA;EACC;EACA;;AAaL;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;EACA;;AAED;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA","file":"style_index.css"} |
@ -1,87 +1,128 @@ |
|||
@import"https://fonts.googleapis.com/css2?family=Montserrat:wght@500&display=swap"; |
|||
@import"https://fonts.googleapis.com/css2?family=Roboto:wght@300;500&display=swap"; |
|||
|
|||
main { |
|||
padding: 5px 20%; |
|||
height: 79vh; |
|||
} |
|||
main .red-banner { |
|||
background-color: red; |
|||
color: white; |
|||
height: auto; |
|||
font-size: 24px; |
|||
padding: 30px 0; |
|||
text-align: center; |
|||
font-family: "Montserrat", sans-serif; |
|||
@import "https://fonts.googleapis.com/css2?family=Montserrat:wght@500&display=swap"; |
|||
@import "https://fonts.googleapis.com/css2?family=Roboto:wght@300;500&display=swap"; |
|||
/* Reset CSS */ |
|||
input[type=submit i] { |
|||
appearance: none; |
|||
user-select: none; |
|||
white-space: normal; |
|||
align-items: flex-start; |
|||
text-align: start; |
|||
cursor: default; |
|||
color: black; |
|||
background-color: white; |
|||
box-sizing: border-box; |
|||
padding: 0px; |
|||
border-width: 0px; |
|||
border-style: none; |
|||
border-color: white; |
|||
border-image: initial; |
|||
font-size: 16px; |
|||
} |
|||
form { |
|||
display: flex; |
|||
justify-content: center; |
|||
font-family: "Roboto", sans-serif; |
|||
flex-direction: column; |
|||
align-items: center; |
|||
text-align: center; |
|||
} |
|||
form .names { |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
margin: 5px 0px; |
|||
align-items: inherit; |
|||
} |
|||
form .form_p_contents { |
|||
display: flex; |
|||
flex-direction: column; |
|||
justify-content: flex-start; |
|||
align-items: center; |
|||
} |
|||
form .form_p_contents p a { |
|||
font-size: 14px; |
|||
color: #696969; |
|||
text-decoration: none; |
|||
} |
|||
form .form_p_contents p a:hover { |
|||
font-size: 14px; |
|||
color: #696969; |
|||
text-decoration: none; |
|||
|
|||
a:-webkit-any-link { |
|||
color: black; |
|||
cursor: default; |
|||
text-decoration: none; |
|||
} |
|||
|
|||
input { |
|||
writing-mode: auto; |
|||
text-rendering: auto; |
|||
color: black; |
|||
letter-spacing: normal; |
|||
word-spacing: normal; |
|||
text-transform: none; |
|||
text-indent: auto; |
|||
text-shadow: none; |
|||
display: inline-block; |
|||
text-align: auto; |
|||
appearance: none; |
|||
background-color: white; |
|||
-webkit-rtl-ordering: none; |
|||
cursor: text; |
|||
margin: 0em; |
|||
font: 400 13.3333px Arial; |
|||
padding: 1px 2px; |
|||
border-width: 2px; |
|||
border-style: none; |
|||
border-color: white; |
|||
border-image: initial; |
|||
} |
|||
|
|||
input:focus-visible { |
|||
outline: rgba(0, 0, 0, 0) solid 0px; |
|||
outline-offset: 0px; |
|||
} |
|||
|
|||
/* Fin Reset */ |
|||
input:focus { |
|||
position: relative; |
|||
color: red; |
|||
} |
|||
input:focus::before { |
|||
content: " "; |
|||
position: absolute; |
|||
background-color: red; |
|||
top: 0; |
|||
width: 10px; |
|||
height: 1000px; |
|||
} |
|||
|
|||
body { |
|||
position: relative; |
|||
margin: 0; |
|||
} |
|||
|
|||
.log-area { |
|||
display: flex; |
|||
justify-content: center; |
|||
flex-direction: column; |
|||
align-items: center; |
|||
height: 20vh; |
|||
margin: 30vh 0 50vh 0; |
|||
font-family: "montserrat", sans-serif; |
|||
} |
|||
|
|||
.log-area > p { |
|||
text-align: center; |
|||
} |
|||
|
|||
form { |
|||
margin: 5px 0px; |
|||
font-size: 24px; |
|||
font-family: monospace, sans-serif; |
|||
} |
|||
label { |
|||
letter-spacing: -1px; |
|||
|
|||
.f_inputs { |
|||
text-align: center; |
|||
} |
|||
input { |
|||
border: 0px; |
|||
background-color: #24252a; |
|||
color: rgb(255, 0, 0); |
|||
border-radius: 3.5px; |
|||
margin-left: 2px; |
|||
padding: 3px; |
|||
font-size: 18px; |
|||
|
|||
.f_inputs > div { |
|||
margin-top: 5px; |
|||
} |
|||
input:focus { |
|||
outline: 1px solid #24252a ; |
|||
transition: 0.2s; |
|||
text-decoration: underline; |
|||
background-color: #edf0f1; |
|||
color: #24252a; |
|||
|
|||
} |
|||
input[type="submit"] { |
|||
border: 0px; |
|||
background-color: #24252a; |
|||
color: #edf0f1; |
|||
font-family: "Montserrat", sans-serif; |
|||
padding: 10px; |
|||
font-weight: 700; |
|||
letter-spacing: 3px; |
|||
} |
|||
input[type="submit"]:hover { |
|||
transition: 0.2s; |
|||
outline: 4px solid #24252a; |
|||
color: #24252a; |
|||
background-color: #edf0f1; |
|||
|
|||
.buttons { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
margin-top: 25px; |
|||
} |
|||
|
|||
.sign_in { |
|||
background-color: #00dc64; |
|||
} |
|||
|
|||
.sign_up { |
|||
background-color: #6a6a6a; |
|||
} |
|||
|
|||
.buttons > div { |
|||
padding: 10px 40px; |
|||
border-radius: 25px; |
|||
margin: 0 20px; |
|||
} |
|||
|
|||
div > input[type=submit], div > a { |
|||
font-family: roboto, sans-serif; |
|||
background-color: inherit; |
|||
} |
|||
|
|||
/*# sourceMappingURL=style_log.css.map */ |
|||
|
@ -0,0 +1 @@ |
|||
{"version":3,"sourceRoot":"","sources":["styles_log.scss"],"names":[],"mappings":"AAAO;AACA;AAGP;AACA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEJ;EACI;EACA;EACA;;;AAEJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEJ;EACI;EACA;;;AAEJ;AACA;EACI;EACA;;AAEA;EACI;EACA;EACA;EACA;EACA;EACA;;;AAIR;EACI;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEJ;EACI;;;AAEJ;EACI;;;AAEJ;EACI;;;AAEJ;EACI;;;AAEJ;EACI;EACA;EACA;EACA;;;AAEJ;EACI;;;AAEJ;EACI;;;AAEJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA","file":"style_log.css"} |
@ -0,0 +1,119 @@ |
|||
@import"https://fonts.googleapis.com/css2?family=Montserrat:wght@500&display=swap"; |
|||
@import"https://fonts.googleapis.com/css2?family=Roboto:wght@300;500&display=swap"; |
|||
|
|||
|
|||
/* Reset CSS */ |
|||
input[type="submit" i] { |
|||
appearance: none; |
|||
user-select: none; |
|||
white-space: normal; |
|||
align-items: flex-start; |
|||
text-align: start; |
|||
cursor: default; |
|||
color: black; |
|||
background-color: white; |
|||
box-sizing: border-box; |
|||
padding: 0px; |
|||
border-width: 0px; |
|||
border-style: none; |
|||
border-color: white; |
|||
border-image: initial; |
|||
font-size: 16px; |
|||
} |
|||
a:-webkit-any-link { |
|||
color: black; |
|||
cursor: default; |
|||
text-decoration: none; |
|||
} |
|||
input { |
|||
writing-mode: auto; |
|||
text-rendering: auto; |
|||
color: black; |
|||
letter-spacing: normal; |
|||
word-spacing: normal; |
|||
text-transform: none; |
|||
text-indent: auto; |
|||
text-shadow: none; |
|||
display: inline-block; |
|||
text-align: auto; |
|||
appearance: none; |
|||
background-color: white; |
|||
-webkit-rtl-ordering: none; |
|||
cursor: text; |
|||
margin: 0em; |
|||
font: 400 13.3333px Arial; |
|||
padding: 1px 2px; |
|||
border-width: 2px; |
|||
border-style: none; |
|||
border-color: white; |
|||
border-image: initial; |
|||
} |
|||
input:focus-visible { |
|||
outline: rgba(0, 0, 0, 0) solid 0px; |
|||
outline-offset: 0px; |
|||
} |
|||
/* Fin Reset */ |
|||
input:focus { |
|||
position: relative; |
|||
color: red; |
|||
|
|||
&::before { |
|||
content: " "; |
|||
position: absolute; |
|||
background-color: red; |
|||
top: 0; |
|||
width: 10px; |
|||
height: 1000px; |
|||
} |
|||
} |
|||
|
|||
body { |
|||
position: relative; |
|||
margin: 0; |
|||
} |
|||
|
|||
.log-area { |
|||
display: flex; |
|||
justify-content: center; |
|||
flex-direction: column; |
|||
align-items: center; |
|||
height: 20vh; |
|||
margin: 30vh 0 50vh 0; |
|||
font-family: 'montserrat', sans-serif; |
|||
} |
|||
.log-area > p { |
|||
text-align: center; |
|||
} |
|||
form { |
|||
font-family: monospace, sans-serif; |
|||
} |
|||
.f_inputs { |
|||
text-align: center; |
|||
} |
|||
.f_inputs > div { |
|||
margin-top: 5px; |
|||
} |
|||
.buttons { |
|||
display : flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
margin-top: 25px; |
|||
} |
|||
.sign_in { |
|||
background-color:#00dc64; |
|||
} |
|||
.sign_up { |
|||
background-color: #6a6a6a; |
|||
} |
|||
.buttons > div { |
|||
padding:10px 40px; |
|||
border-radius: 25px; |
|||
margin: 0 20px; |
|||
} |
|||
|
|||
div > input[type="submit"], div > a { |
|||
font-family: roboto, sans-serif; |
|||
background-color: inherit; |
|||
} |
|||
|
|||
|
Loading…
Reference in new issue