Modification des include header/footer. début de login fonctionnel
Co-authored-by: Charpentier Juliette <juliette.charpentier1@etu.u-pec.fr>
This commit is contained in:
parent
c80c49df2f
commit
e9e2e68bcf
@ -16,21 +16,20 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php include ('../../views/header.php'); ?>
|
||||
<?php include ($_SERVER['DOCUMENT_ROOT'] . '/views/header.php') ?>
|
||||
|
||||
<div class="login-container">
|
||||
<img src="https://cdn-icons-png.flaticon.com/512/4139/4139948.png" alt="Avatar">
|
||||
<h2 class="login-title">Connexion à votre compte</h2>
|
||||
<p class="login-subtitle">Connectez-vous afin d'accéder à l'entièreté du site.</p>
|
||||
<form>
|
||||
<form action="login/login.php" method="post">
|
||||
<div class="form-group">
|
||||
<label for="email">Adresse mail</label>
|
||||
<input type="email" id="email" name="email" placeholder="ex : username@example.com" required
|
||||
placeholder=" ">
|
||||
<input type="email" id="email" name="email" placeholder="username@example.com" required placeholder=" ">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">Mot de passe</label>
|
||||
<input type="password" id="password" name="password" required placeholder=" ">
|
||||
<input type="password" id="password" name="password" required placeholder="••••••••" placeholder=" ">
|
||||
</div>
|
||||
|
||||
<div class="form-group forgot-password">
|
||||
@ -42,7 +41,7 @@
|
||||
!</a></p>
|
||||
</div>
|
||||
|
||||
<?php include ('../../views/footer.php'); ?>
|
||||
<?php include ($_SERVER['DOCUMENT_ROOT'] . '/views/footer.php') ?>
|
||||
|
||||
</body>
|
||||
|
||||
|
18
account/login/login.php
Normal file
18
account/login/login.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
require_once ($_SERVER['DOCUMENT_ROOT'] . '/tools/dbConnect.php');
|
||||
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
$email = htmlspecialchars($_POST["email"]);
|
||||
$password = htmlspecialchars($_POST["password"]);
|
||||
}
|
||||
/*- check la validité du combo mail + mdp (qui es thashé sur la bdd)*/
|
||||
/*- si valide, on enregistre un cookie avec mail, nom, prénom, rôle (requete sql pour les obtenir)*/
|
||||
/*- créer un cookie avec mail, nom, prénom, rôle. Qui expire dans 1h*/
|
||||
/* une fois bien connecté, on redirige vers /account/profile */
|
||||
|
||||
echo "adresse mail : " . $email . "<br>";
|
||||
echo "mot de passe : " . $password . "<br>";
|
||||
|
||||
|
||||
|
||||
?>
|
@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="stylesheet" href="../../styles/main.css" />
|
||||
<link rel="stylesheet" href="../../styles/header.css" />
|
||||
<link rel="stylesheet" href="../../styles/footer.css" />
|
||||
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet" />
|
||||
|
||||
<link rel="icon" type="image/png" sizes="32x32"
|
||||
href="https://tickets.paris2024.org/obj/media/FR-Paris2024/specialLogos/favicons/favicon-32x32.png" />
|
||||
<script src="https://kit.fontawesome.com/f16a36bad3.js" crossorigin="anonymous"></script>
|
||||
<title>Mon profil | Jeux Olympiques - Paris 2024</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php include ($_SERVER['DOCUMENT_ROOT'] . '/views/header.php') ?>
|
||||
|
||||
<!-- code de la page ici -->
|
||||
|
||||
<?php include ($_SERVER['DOCUMENT_ROOT'] . '/views/footer.php') ?>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -23,40 +23,43 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php include ('../../views/header.php'); ?>
|
||||
<?php include ($_SERVER['DOCUMENT_ROOT'] . '/views/header.php') ?>
|
||||
|
||||
<div class="login-container">
|
||||
<img src="https://cdn-icons-png.flaticon.com/512/4139/4139948.png" alt="Avatar">
|
||||
<h2>Créer un compte</h2>
|
||||
<p>Créez un nouveau compte afin d'accéder à l'entièreté du site.</p>
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label for="name">Prénom</label>
|
||||
<input type="text" id="name" name="name" placeholder="Jean" required placeholder=" ">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="family-name">Adresse mail</label>
|
||||
<input type="text" id="family-name" name="family-name" placeholder="DUPONT" required placeholder=" ">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email">Adresse mail</label>
|
||||
<input type="email" id="email" name="email" placeholder="ex : username@example.com" required
|
||||
placeholder=" ">
|
||||
<input type="email" id="email" name="email" placeholder="username@example.com" required placeholder=" ">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">Mot de passe</label>
|
||||
<input type="password" id="password" name="password" required placeholder=" ">
|
||||
<input type="password" id="password" name="password" required placeholder="••••••••" placeholder=" ">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">Confirmation du mot de passe</label>
|
||||
<input type="password" id="password-bis" name="password-bis" required placeholder=" ">
|
||||
</div>
|
||||
<!-- <div class="form-group remember-me">
|
||||
<input type="checkbox" id="remember-me" name="remember-me">
|
||||
<label for="remember-me">Se souvenir de moi</label>
|
||||
</div> -->
|
||||
<div class="form-group forgot-password">
|
||||
<!-- <a href="#">Mot de passe oublié ?</a>-->
|
||||
<input type="password" id="password-bis" name="password-bis" required placeholder="••••••••"
|
||||
placeholder=" ">
|
||||
</div>
|
||||
|
||||
|
||||
<button type="submit" class="submit-button" onclick="verifMDP()"><i class="fas fa-sign-in-alt"></i>
|
||||
Créer un compte</i></button>
|
||||
</form>
|
||||
<p class="no-account">Vous avez déjà un compte ? <a href="../login">Connectez-vous !</a></p>
|
||||
</div>
|
||||
|
||||
<?php include ('../../views/footer.php'); ?>
|
||||
<?php include ($_SERVER['DOCUMENT_ROOT'] . '/views/footer.php') ?>
|
||||
|
||||
</body>
|
||||
|
||||
|
@ -25,10 +25,10 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php include ('views/header.php'); ?>
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'].'/views/header.php')?>
|
||||
|
||||
<!-- code de la page ici -->
|
||||
|
||||
<?php include ('views/footer.php'); ?>
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'].'/views/footer.php')?>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -15,12 +15,12 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php include ('../views/header.php'); ?>
|
||||
<?php include ($_SERVER['DOCUMENT_ROOT'] . '/views/header.php') ?>
|
||||
|
||||
<!-- code de la page ici -->
|
||||
<h1>Évènements</h1>
|
||||
|
||||
<?php include ('../views/footer.php'); ?>
|
||||
<?php include ($_SERVER['DOCUMENT_ROOT'] . '/views/footer.php') ?>
|
||||
|
||||
<script src="https://kit.fontawesome.com/f16a36bad3.js" crossorigin="anonymous"></script>
|
||||
</body>
|
||||
|
@ -15,7 +15,7 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php include ('views/header.php'); ?>
|
||||
<?php include ($_SERVER['DOCUMENT_ROOT'] . '/views/header.php') ?>
|
||||
|
||||
<!-- code de la page ici -->
|
||||
<h1>Accueil</h1>
|
||||
@ -25,7 +25,7 @@
|
||||
<p class="text">Vous pourrez également créer un compte pour accéder à des fonctionnalités supplémentaires.</p>
|
||||
|
||||
|
||||
<?php include ('views/footer.php'); ?>
|
||||
<?php include ($_SERVER['DOCUMENT_ROOT'] . '/views/footer.php') ?>
|
||||
|
||||
<script src="https://kit.fontawesome.com/f16a36bad3.js" crossorigin="anonymous"></script>
|
||||
</body>
|
||||
|
@ -3,8 +3,6 @@ $db = mysqli_connect("dwarves.iut-fbleau.fr", "charpentj", "PommePatate", "charp
|
||||
if (!$db) {
|
||||
echo "<script>alert('Echec de la connexion à la BDD.')</script>";
|
||||
die();
|
||||
} else {
|
||||
echo "<script>alert('Connexion réussie à la BDD.')</script>";
|
||||
}
|
||||
;
|
||||
?>
|
@ -13,15 +13,16 @@
|
||||
<div class="col-xs-6 col-md-3">
|
||||
<h6>Catégories</h6>
|
||||
<ul class="footer-links">
|
||||
<li><a href="../">Accueil</a></li>
|
||||
<li><a href="../events">Évènements</a></li>
|
||||
<li><a href="../../../">Accueil</a></li>
|
||||
<li><a href="../../../events">Évènements</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 col-md-3">
|
||||
<h6>Liens rapides</h6>
|
||||
<ul class="footer-links">
|
||||
<li><a href="#">Lien rapide 1</a></li>
|
||||
<li><a href="https://grond.iut-fbleau.fr/balocchi/SAE_web" target="_blank">Code source du site</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<span></span>
|
||||
|
||||
<!-- logo -->
|
||||
<a href="../" class="menu-logo">
|
||||
<a href="../../../" class="menu-logo">
|
||||
<img src="https://i.imgur.com/RkmSo9Q.png" alt="Jeux Olympiques - Paris 2024" />
|
||||
</a>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user