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>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<?php include ('../../views/header.php'); ?>
|
<?php include ($_SERVER['DOCUMENT_ROOT'] . '/views/header.php') ?>
|
||||||
|
|
||||||
<div class="login-container">
|
<div class="login-container">
|
||||||
<img src="https://cdn-icons-png.flaticon.com/512/4139/4139948.png" alt="Avatar">
|
<img src="https://cdn-icons-png.flaticon.com/512/4139/4139948.png" alt="Avatar">
|
||||||
<h2 class="login-title">Connexion à votre compte</h2>
|
<h2 class="login-title">Connexion à votre compte</h2>
|
||||||
<p class="login-subtitle">Connectez-vous afin d'accéder à l'entièreté du site.</p>
|
<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">
|
<div class="form-group">
|
||||||
<label for="email">Adresse mail</label>
|
<label for="email">Adresse mail</label>
|
||||||
<input type="email" id="email" name="email" placeholder="ex : username@example.com" required
|
<input type="email" id="email" name="email" placeholder="username@example.com" required placeholder=" ">
|
||||||
placeholder=" ">
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="password">Mot de passe</label>
|
<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>
|
||||||
|
|
||||||
<div class="form-group forgot-password">
|
<div class="form-group forgot-password">
|
||||||
@ -42,7 +41,7 @@
|
|||||||
!</a></p>
|
!</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php include ('../../views/footer.php'); ?>
|
<?php include ($_SERVER['DOCUMENT_ROOT'] . '/views/footer.php') ?>
|
||||||
|
|
||||||
</body>
|
</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>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<?php include ('../../views/header.php'); ?>
|
<?php include ($_SERVER['DOCUMENT_ROOT'] . '/views/header.php') ?>
|
||||||
|
|
||||||
<div class="login-container">
|
<div class="login-container">
|
||||||
<img src="https://cdn-icons-png.flaticon.com/512/4139/4139948.png" alt="Avatar">
|
<img src="https://cdn-icons-png.flaticon.com/512/4139/4139948.png" alt="Avatar">
|
||||||
<h2>Créer un compte</h2>
|
<h2>Créer un compte</h2>
|
||||||
<p>Créez un nouveau compte afin d'accéder à l'entièreté du site.</p>
|
<p>Créez un nouveau compte afin d'accéder à l'entièreté du site.</p>
|
||||||
<form>
|
<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">
|
<div class="form-group">
|
||||||
<label for="email">Adresse mail</label>
|
<label for="email">Adresse mail</label>
|
||||||
<input type="email" id="email" name="email" placeholder="ex : username@example.com" required
|
<input type="email" id="email" name="email" placeholder="username@example.com" required placeholder=" ">
|
||||||
placeholder=" ">
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="password">Mot de passe</label>
|
<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>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="password">Confirmation du mot de passe</label>
|
<label for="password">Confirmation du mot de passe</label>
|
||||||
<input type="password" id="password-bis" name="password-bis" required placeholder=" ">
|
<input type="password" id="password-bis" name="password-bis" required placeholder="••••••••"
|
||||||
</div>
|
placeholder=" ">
|
||||||
<!-- <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>-->
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<button type="submit" class="submit-button" onclick="verifMDP()"><i class="fas fa-sign-in-alt"></i>
|
<button type="submit" class="submit-button" onclick="verifMDP()"><i class="fas fa-sign-in-alt"></i>
|
||||||
Créer un compte</i></button>
|
Créer un compte</i></button>
|
||||||
</form>
|
</form>
|
||||||
<p class="no-account">Vous avez déjà un compte ? <a href="../login">Connectez-vous !</a></p>
|
<p class="no-account">Vous avez déjà un compte ? <a href="../login">Connectez-vous !</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php include ('../../views/footer.php'); ?>
|
<?php include ($_SERVER['DOCUMENT_ROOT'] . '/views/footer.php') ?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
@ -25,10 +25,10 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<?php include ('views/header.php'); ?>
|
<?php include($_SERVER['DOCUMENT_ROOT'].'/views/header.php')?>
|
||||||
|
|
||||||
<!-- code de la page ici -->
|
<!-- code de la page ici -->
|
||||||
|
|
||||||
<?php include ('views/footer.php'); ?>
|
<?php include($_SERVER['DOCUMENT_ROOT'].'/views/footer.php')?>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -15,12 +15,12 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<?php include ('../views/header.php'); ?>
|
<?php include ($_SERVER['DOCUMENT_ROOT'] . '/views/header.php') ?>
|
||||||
|
|
||||||
<!-- code de la page ici -->
|
<!-- code de la page ici -->
|
||||||
<h1>Évènements</h1>
|
<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>
|
<script src="https://kit.fontawesome.com/f16a36bad3.js" crossorigin="anonymous"></script>
|
||||||
</body>
|
</body>
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<?php include ('views/header.php'); ?>
|
<?php include ($_SERVER['DOCUMENT_ROOT'] . '/views/header.php') ?>
|
||||||
|
|
||||||
<!-- code de la page ici -->
|
<!-- code de la page ici -->
|
||||||
<h1>Accueil</h1>
|
<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>
|
<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>
|
<script src="https://kit.fontawesome.com/f16a36bad3.js" crossorigin="anonymous"></script>
|
||||||
</body>
|
</body>
|
||||||
|
@ -3,8 +3,6 @@ $db = mysqli_connect("dwarves.iut-fbleau.fr", "charpentj", "PommePatate", "charp
|
|||||||
if (!$db) {
|
if (!$db) {
|
||||||
echo "<script>alert('Echec de la connexion à la BDD.')</script>";
|
echo "<script>alert('Echec de la connexion à la BDD.')</script>";
|
||||||
die();
|
die();
|
||||||
} else {
|
|
||||||
echo "<script>alert('Connexion réussie à la BDD.')</script>";
|
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
?>
|
?>
|
@ -13,15 +13,16 @@
|
|||||||
<div class="col-xs-6 col-md-3">
|
<div class="col-xs-6 col-md-3">
|
||||||
<h6>Catégories</h6>
|
<h6>Catégories</h6>
|
||||||
<ul class="footer-links">
|
<ul class="footer-links">
|
||||||
<li><a href="../">Accueil</a></li>
|
<li><a href="../../../">Accueil</a></li>
|
||||||
<li><a href="../events">Évènements</a></li>
|
<li><a href="../../../events">Évènements</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-6 col-md-3">
|
<div class="col-xs-6 col-md-3">
|
||||||
<h6>Liens rapides</h6>
|
<h6>Liens rapides</h6>
|
||||||
<ul class="footer-links">
|
<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>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<span></span>
|
<span></span>
|
||||||
|
|
||||||
<!-- logo -->
|
<!-- logo -->
|
||||||
<a href="../" class="menu-logo">
|
<a href="../../../" class="menu-logo">
|
||||||
<img src="https://i.imgur.com/RkmSo9Q.png" alt="Jeux Olympiques - Paris 2024" />
|
<img src="https://i.imgur.com/RkmSo9Q.png" alt="Jeux Olympiques - Paris 2024" />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user