first commit

This commit is contained in:
Val Jenson
2025-06-14 19:08:52 +02:00
commit f74d81fba4
40 changed files with 2807 additions and 0 deletions

BIN
SAE2.2.pdf Normal file

Binary file not shown.

BIN
ciel.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

View File

@@ -0,0 +1,60 @@
<?php
session_start();
include 'database.php';
// Vérifier si connecté
if (!isset($_SESSION['pseudo'])) {
header("Location: login.php");
exit;
}
$pseudo = $_SESSION['pseudo'];
// Vérifier si admin
$stmt = $mysqli->prepare("SELECT role FROM utilisateur WHERE pseudo = ?");
$stmt->bind_param("s", $pseudo);
$stmt->execute();
$stmt->bind_result($role);
$stmt->fetch();
$stmt->close();
if ($role !== 'admin') {
header("Location: index.php");
exit;
}
$message = '';
// Si on a soumis le formulaire
if ($_POST) {
$titre = $_POST['titre'];
$adresse = $_POST['adresse'];
$description = $_POST['description'];
// Vérifier que les chose obligatoires sont remplis
if (empty($titre) || empty($adresse)) {
$message = "Oups ! Il faut au moins un titre et une adresse.";
} else {
// Ajouter l'événement en base
$stmt = $mysqli->prepare("INSERT INTO evenement (titre, adresse, description_) VALUES (?, ?, ?)");
$stmt->bind_param("sss", $titre, $adresse, $description);
if ($stmt->execute()) {
$message = "Super ! Ton événement a été créé ! 🎉";
// Vider les champs pour recommencer
$titre = '';
$adresse = '';
$description = '';
} else {
$message = "Erreur : ";
}
$stmt->close();
}
}
// Récupérer les derniers événements créés
function getRecentEvents($mysqli) {
$result = $mysqli->query("SELECT id, titre, adresse, description_ FROM evenement ORDER BY id");
return $result;
}
?>

40
controler/actionLogin.php Normal file
View File

@@ -0,0 +1,40 @@
<?php
include 'database.php';
$message = "";
if(isset($_POST['formsend'])){
$message = "bien recu";
extract($_POST);
$verif = $mysqli->prepare("SELECT mdp, pseudo FROM utilisateur WHERE email = ?");
$verif->bind_param("s",$email);
$verif->execute();
$verif->store_result();
if($verif->num_rows == 1){
$verif->bind_result($hash, $pseudo);
$verif->fetch();
if(password_verify($mdp,$hash)){
$message = "Le mot de passe est correcte, Bienvenue $pseudo !";
$_SESSION['email'] = $email;
$_SESSION['pseudo'] = $pseudo;
header("Location: profil.php");
exit;
}else{
$message = "T trompé, mot de passe incorrect";
}
}else{
$message = "Adresse mail introuvable";
}
}
?>

74
controler/actionModif.php Normal file
View File

@@ -0,0 +1,74 @@
<?php
// actionModif.php
if (!isset($_SESSION['pseudo'])) {
header("Location: login.php");
exit;
}
$pseudo = $_SESSION['pseudo'];
$message = '';
// D'ABORD récupérer les infos utilisateur (OBLIGATOIRE)
$stmt = $mysqli->prepare("SELECT id, nom, prenom, age, email, datecreation FROM utilisateur WHERE pseudo = ?");
$stmt->bind_param("s", $pseudo);
$stmt->execute();
$stmt->bind_result($id, $nom, $prenom, $age, $email, $date);
$stmt->fetch();
$stmt->close();
// ENSUITE traitement du formulaire de modification
if ($_POST) {
$nouveau_nom = $_POST['nom'];
$nouveau_prenom = $_POST['prenom'];
$nouvel_email = $_POST['email'];
$nouvel_age = $_POST['age'];
// Vérification des mots de passe
$mdp_valide = true;
if (!empty($_POST['nouveau_mdp'])) {
if (empty($_POST['confirmer_mdp'])) {
$message = "Veuillez confirmer le nouveau mot de passe.";
$mdp_valide = false;
} elseif ($_POST['nouveau_mdp'] !== $_POST['confirmer_mdp']) {
$message = "Les mots de passe ne correspondent pas.";
$mdp_valide = false;
} elseif (strlen($_POST['nouveau_mdp']) < 6) { // rr
$message = "Le mot de passe doit contenir au moins 6 caractères.";
$mdp_valide = false;
}
}
if ($mdp_valide) {
// Si un nouveau mot de passe est fourni
if (!empty($_POST['nouveau_mdp'])) {
$nouveau_mdp = password_hash($_POST['nouveau_mdp'], PASSWORD_DEFAULT);
$stmt = $mysqli->prepare("UPDATE utilisateur SET nom = ?, prenom = ?, email = ?, age = ?, motdepasse = ? WHERE id = ?");
$stmt->bind_param("sssisi", $nouveau_nom, $nouveau_prenom, $nouvel_email, $nouvel_age, $nouveau_mdp, $id);
} else {
$stmt = $mysqli->prepare("UPDATE utilisateur SET nom = ?, prenom = ?, email = ?, age = ? WHERE id = ?");
$stmt->bind_param("sssii", $nouveau_nom, $nouveau_prenom, $nouvel_email, $nouvel_age, $id);
}
if ($stmt->execute()) {
$message = "Informations mises à jour avec succès !";
// Actualiser les variables pour l'affichage
$nom = $nouveau_nom;
$prenom = $nouveau_prenom;
$email = $nouvel_email;
$age = $nouvel_age;
} else {
$message = "Erreur lors de la mise à jour: " . $mysqli->error;
}
$stmt->close();
}
}
// Compter les événements
$stmt = $mysqli->prepare("SELECT COUNT(*) FROM inscription WHERE id_utilisateur = ?");
$stmt->bind_param("i", $id);
$stmt->execute();
$stmt->bind_result($nombre_evenements);
$stmt->fetch();
$stmt->close();
?>

View File

@@ -0,0 +1,40 @@
<?php include 'database.php';
if(isset($_POST['formsend'])){
extract($_POST);
$verif = $mysqli->prepare("SELECT email FROM utilisateur WHERE email = ?");
$verif->bind_param("s",$email);
$verif->execute();
$verif->store_result();
if($verif->num_rows > 0){
echo "Email déja utilisé";
}else{
$verif = $mysqli->prepare("SELECT pseudo FROM utilisateur WHERE pseudo = ?");
$verif->bind_param("s",$pseudo);
$verif->execute();
$verif->store_result();
if($verif->num_rows > 0){
echo "Nom d'utilisateur déja utilisé";
}else{
if($mdp == $cmdp){
// hasher le mot de passe
$hash = password_hash($mdp,PASSWORD_DEFAULT);
$stmt = $mysqli->prepare("INSERT INTO utilisateur (nom, prenom, age, pseudo, mdp, email) VALUES (?, ?, ?, ?, ?, ?)");
$stmt->bind_param("ssisss",$nom, $prenom, $age, $pseudo, $hash, $email);
$stmt->execute();
echo "Le compte a été crée";
}else{
echo "non t trompé, le mot de passe est différent";
}
}
}
}
?>

View File

@@ -0,0 +1,29 @@
<?php
session_start();
require_once "database.php";
if (!isset($_SESSION['pseudo'])) {
header("Location: login.php");
exit;
}
$id_evenement = $_POST['id_evenement'];
$contenu = $_POST['contenu'];
// récupération du id utilisateur
$recup = $mysqli->prepare("SELECT id FROM utilisateur WHERE pseudo = ?");
$recup->bind_param("s", $_SESSION['pseudo']);
$recup->execute();
$recup->bind_result($id_utilisateur);
$recup->fetch();
$recup->close();
// ajout du commentaire
$insert = $mysqli->prepare("INSERT INTO commentaire (id_utilisateur, id_evenement, contenu) VALUES (?, ?, ?)");
$insert->bind_param("iis", $id_utilisateur, $id_evenement, $contenu);
$insert->execute();
$insert->close();
header("Location: event.php");
exit;

27
controler/database.php Normal file
View File

@@ -0,0 +1,27 @@
<?php
$mysqli = mysqli_connect("dwarves.iut-fbleau.fr", "val", "vali", "val");
// Fonction pour récupérer le rôle d'un utilisateur
function getUserRole($pseudo) {
global $mysqli;
$stmt = $mysqli->prepare("SELECT role FROM utilisateur WHERE pseudo = ?");
$stmt->bind_param("s", $pseudo);
$stmt->execute();
$stmt->bind_result($role);
// Si on trouve l'utilisateur
if ($stmt->fetch()) {
$stmt->close();
return $role;
} else {
$stmt->close();
return null; // Utilisateur pas trouvé
}
}
?>

View File

@@ -0,0 +1,45 @@
<?php
session_start();
require_once "database.php";
// Vérifie que l'utilisateur est connecté et que le formulaire est bien envoyé
if (!isset($_SESSION['pseudo']) || !isset($_POST['id_evenement'])) {
header("Location: event.php");
exit;
}
$pseudo = $_SESSION['pseudo'];
$id_evenement = $_POST['id_evenement'];
// Récupérer l'ID utilisateur
$stmt = $mysqli->prepare("SELECT id FROM utilisateur WHERE pseudo = ?");
$stmt->bind_param("s", $pseudo);
$stmt->execute();
$stmt->bind_result($id_utilisateur);
$stmt->fetch();
$stmt->close();
// Vérifier si déjà inscrit
$check = $mysqli->prepare("SELECT COUNT(*) FROM inscription WHERE id_utilisateur = ? AND id_evenement = ?");
$check->bind_param("ii", $id_utilisateur, $id_evenement);
$check->execute();
$check->bind_result($existe);
$check->fetch();
$check->close();
if ($existe > 0) {
// Déjà inscrit
header("Location: event.php?inscription=deja");
exit;
}
// Sinon on inscrit
$insert = $mysqli->prepare("INSERT INTO inscription (id_utilisateur, pseudo, id_evenement) VALUES (?, ?, ?)");
$insert->bind_param("isi", $id_utilisateur, $pseudo, $id_evenement);
$insert->execute();
$insert->close();
header("Location: event.php?inscription=ok");
exit;
?>

6
controler/logout.php Normal file
View File

@@ -0,0 +1,6 @@
<?php
session_start();
session_destroy();
header("Location: ../views/login.php"); // Redirige vers la page de connexion
exit;
?>

24
controler/menu-profil.php Normal file
View File

@@ -0,0 +1,24 @@
<?php $pseudo = $_SESSION['pseudo'];
$role = getUserRole($pseudo);?>
<link rel="stylesheet" href="../css/profil.css">
<nav class="menu">
<a href="../views/index.php"><img src="../img/logov2.png" alt="Logo 'Vendeur de rêve'" width="175" height="auto"></a>
<ul>
<li class="but1">
<a href="../views/index.php">ACCUEIL</a>
</li>
<li class="but1">
<a href="../views/my_event.php">MES ÉVÉNEMENTS</a>
</li>
<li class="but1">
<a href="../views/profil.php">MON PROFIL</a>
</li>
<?php if ($role === 'admin'): ?>
<li class="but1">
<a href="../views/creator.php">CRÉER ÉVÈNEMENT</a>
</li>
<?php endif; ?>
</ul>
</nav>

24
controler/menunav-inv.php Normal file
View File

@@ -0,0 +1,24 @@
<link rel='stylesheet' type='text/css' media='screen' href='../css/menunav-inv.css'>
<!-- Haut de page -->
<header>
<div class="image">
<a href="../views/index.php"><img src="../img/logov2.png" alt="Logo 'Vendeur de rêve'" width="150" height="auto"></a>
</div>
<!-- Navigation -->
<div class="main">
<nav class="menu">
<ul>
<li><a href="../views/index.php">ACCUEIL</a></li>
<li><a href="../views/contact.php" >CONTACT</a></li>
<li><a href="../views/event.php" >ÉVÈVENEMENT</a></li>
</ul>
</nav>
</div>
<div class="connexion">
<a href="../views/login.php"><button>Connexion</button></a>
<a href="../views/register.php"><button>Inscription</button></a>
</div>
</header>

View File

@@ -0,0 +1,26 @@
<header>
<link rel="stylesheet" href="../css/menunav-user.css">
<div class="image">
<a href="../views/index.php"><img src="../img/logov2.png" alt="Logo 'Vendeur de rêve'" width="175" height="auto"></a>
</div>
<!-- Navigation -->
<div class="main">
<nav class="menu-nav">
<ul>
<li><a href="../views/index.php">ACCUEIL</a></li>
<li><a href="../views/contact.php" >CONTACT</a></li>
<li><a href="../views/event.php" >ÉVÈVENEMENT</a></li>
</ul>
</nav>
</div>
<div class="profil">
<a href="../views/profil.php"><button>Profil</button></a>
<div class="deco">
<a href="../controler/logout.php"><button>Se déconnecter</button></a>
</div>
</div>
</header>

79
css/contact-style.css Normal file
View File

@@ -0,0 +1,79 @@
body {
font-family: 'Segoe UI', sans-serif;
margin: 0;
background-color: #0d0d0d;
color: #f0f0f0;
}
.contact-container {
padding: 2rem;
max-width: 1200px;
margin: auto;
}
h1 {
text-align: center;
font-size: 2.5rem;
margin-bottom: 2rem;
}
.contact-grid {
display: flex;
flex-wrap: wrap;
gap: 2rem;
justify-content: space-between;
}
.contact-info, .contact-form {
flex: 1 1 45%;
background-color: #1a1a1a;
padding: 2rem;
border-radius: 10px;
}
.contact-info h2, .contact-form h2 {
margin-top: 0;
color: #7a61b3;
}
.contact-info a {
color: #7a61b3;
text-decoration: none;
}
.contact-form input, .contact-form textarea {
width: 100%;
padding: 1rem;
margin-top: 1rem;
background-color: #2a2a2a;
border: none;
border-radius: 5px;
color: #fff;
}
.contact-form button {
margin-top: 1rem;
padding: 0.75rem 1.5rem;
background-color: #7a61b3;
border: none;
color: #000;
font-weight: bold;
cursor: pointer;
border-radius: 5px;
}
.map-container {
margin-top: 3rem;
}
.map-container h2 {
text-align: center;
margin-bottom: 1rem;
color: #7a61b3;
}
iframe {
border-radius: 10px;
}

10
css/contact.css Normal file
View File

@@ -0,0 +1,10 @@
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
header {
background-color: rgb(122, 97, 179);
padding: 15px;
}

0
css/contact.php Normal file
View File

239
css/creator.css Normal file
View File

@@ -0,0 +1,239 @@
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100..700;1,100..700&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Josefin Sans", sans-serif;
}
body {
background-image: url("../img/cielprince.png");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
color: white;
}
.titre-page {
text-align: center;
margin-left: 242px;
background-color: rgb(122, 97, 179);
padding: 30px;
}
.titre-page h1 {
font-size: 2.2rem;
margin-bottom: 8px;
color: white;
}
.titre-page p {
font-size: 1.1rem;
opacity: 0.9;
}
/* MESSAGES */
.message {
padding: 15px;
margin: 15px auto 20px 270px;
max-width: 800px;
border-radius: 10px;
text-align: center;
font-weight: bold;
}
.message.success {
background: rgba(76, 175, 80, 0.2);
color: #4caf50;
border: 1px solid rgba(76, 175, 80, 0.4);
}
.message.error {
background: rgba(244, 67, 54, 0.2);
color: #f44336;
border: 1px solid rgba(244, 67, 54, 0.4);
}
.bouton-deco {
position: absolute;
top: 35px;
right: 20px;
}
.bouton-deco a {
text-decoration: none;
padding: 10px 20px;
background-color: #d94c4c;
color: white;
border-radius: 8px;
transition: 0.2s;
}
.bouton-deco a:hover {
background-color: #b73838;
}
/* CONTENU PRINCIPAL */
.main {
margin-left: 270px;
padding: 20px;
max-width: 1200px;
}
.creator {
display: grid;
grid-template-columns: 1fr 1fr; /*pour avoir 2 colones egale*/
gap: 25px;
}
/* BOX DE BASE */
.box-creation, .box-liste {
background-color: rgba(17, 17, 17, 0.8);
padding: 25px;
border-radius: 15px;
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.1);
}
.box-creation h3, .box-liste h3 {
color: rgb(122, 97, 179);
font-size: 1.4rem;
margin-bottom: 20px;
border-bottom: 2px solid rgba(122, 97, 179, 0.3);
padding-bottom: 8px;
}
/* FORMULAIRE */
.champ {
margin-bottom: 18px;
}
.champ label {
display: block;
margin-bottom: 6px;
color: rgb(122, 97, 179);
font-weight: 600;
font-size: 14px;
}
.champ input, .champ textarea {
width: 100%;
padding: 12px 15px;
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 8px;
color: white;
font-size: 14px;
transition: 0.3s;
}
.champ input:focus, .champ textarea:focus {
outline: none;
border-color: rgb(122, 97, 179);
background: rgba(255, 255, 255, 0.15);
}
.champ textarea {
resize: vertical;
min-height: 80px;
}
/* BOUTON CRÉER */
.bouton-creer {
width: 100%;
background: linear-gradient(135deg, rgb(122, 97, 179), #8b5fbf);
color: white;
padding: 14px;
border: none;
border-radius: 20px;
font-size: 16px;
font-weight: bold;
cursor: pointer;
margin-top: 15px;
transition: 0.3s;
}
.bouton-creer:hover {
transform: translateY(-2px);
}
/* LISTE DES ÉVÉNEMENTS */
.event-recent {
max-height: 450px;
padding-right: 8px;
}
.mini-event {
background: rgba(255, 255, 255, 0.05);
padding: 15px;
margin-bottom: 12px;
border-radius: 10px;
border-left: 4px solid rgb(122, 97, 179);
transition: 0.3s;
}
.mini-event:hover {
background: rgba(255, 255, 255, 0.1);
transform: translateX(5px);
}
.mini-event h4 {
color: white;
margin: 0 0 8px 0;
font-size: 1.1rem;
}
.lieu {
color: rgb(122, 97, 179);
font-weight: bold;
margin-bottom: 6px;
font-size: 0.9rem;
}
.desc {
color: rgba(255, 255, 255, 0.7);
font-size: 0.85rem;
line-height: 1.4;
margin: 0;
}
.aucun-event {
text-align: center;
color: rgba(255, 255, 255, 0.6);
font-style: italic;
padding: 30px;
}
/* RESPONSIVE */
@media (max-width: 1000px) {
.creator {
gap: 20px;
}
.main {
margin-left: 20px;
margin-right: 20px;
}
.titre-page {
margin-left: 20px;
margin-right: 20px;
}
.message {
margin-left: 20px;
margin-right: 20px;
}
}

196
css/event.css Normal file
View File

@@ -0,0 +1,196 @@
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100..700;1,100..700&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Josefin Sans", sans-serif;
}
body {
background: url('../img/cielprince.png') no-repeat center center fixed;
background-size: cover;
color: white;
font-family: 'Josefin Sans', sans-serif;
margin: 0;
}
.page-header {
margin-top: 50px;
text-align: center;
}
.evenement-container {
display: flex;
flex-direction: column;
gap: 20px;
max-width: 800px;
margin: auto;
margin-top: 50px;
}
.evenement-card {
background-color: rgba(0, 0, 0, 0.6);
padding: 20px;
border-radius: 10px;
border-top: 8px solid rgba(122, 97, 179);
}
.evenement-card h3 {
color: rgb(122, 97, 179);
margin-bottom: 10px;
}
.commentaires {
margin-top: 20px;
background-color: rgba(255, 255, 255, 0.05);
padding: 15px;
border-radius: 10px;
}
.commentaire {
margin-bottom: 15px;
padding: 8px;
background-color: rgba(0,0,0,0.3);
border-radius: 5px;
}
.commentaires button {
margin-top: 10px;
padding: 8px 15px;
border: none;
background-color: #7a61b3;
color: white;
border-radius: 8px;
cursor: pointer;
}
/* .commentaires-textarea {
width: 100% !important;
padding: 10px !important;
border: none;
border-radius: 8px;
resize: vertical;
margin-top: 10px;
height: 150px !important;
font-size: 16px;
} */
.inscrire-btn, .desinscription {
background-color: #7a61b3;
color: white;
padding: 10px 20px;
border: none;
border-radius: 8px;
margin-top: 10px;
cursor: pointer;
transition: 0.2s;
}
.inscrire-btn:hover, .desinscription:hover{
background-color: #5f4aa3;
}
.message {
margin-top: 10px;
padding: 10px;
background-color: rgba(122, 97, 179, 0.2);
border-left: 5px solid #7a61b3;
border-radius: 6px;
color: white;
}
textarea {
all: unset; /*reset tout les styles, car y avait un bug je n'arrivai pas modifier son style*/
box-sizing: border-box;
/* background: white; */
color: rgb(255, 255, 255);
border: 2px solid rgb(80, 80, 80);
width: 100%;
padding: 10px;
font-size: 16px;
height: 150px ;
resize: vertical;
border-radius: 8px;
}
/* Styles pour la barre de recherche */
.recherche-form {
text-align: center;
margin: 20px 0;
}
.recherche-input {
padding: 10px;
width: 300px;
border-radius: 5px;
border: none;
margin-right: 10px;
}
.recherche-btn {
padding: 10px 15px;
background-color: #7a61b3;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
.recherche-btn:hover {
background-color: #5f4aa3;
}
.effacer-link {
margin-left: 10px;
color: white;
text-decoration: none;
}
.effacer-link:hover {
text-decoration: underline;
}
/* Styles spécifiques pour la désinscription */
.desinscription {
background-color: #dc3545 ;
}
.desinscription:hover {
background-color: #c82333 ;
}
/* Messages d'alerte adaptés au thème */
.message.success {
background-color: rgba(40, 167, 69, 0.2);
color: rgb(0, 255, 221);
border-left: 5px solid #28a745;
padding: 10px;
margin: 20px auto;
max-width: 800px;
border-radius: 6px;
}
.message.error {
background-color: rgba(220, 53, 69, 0.2);
color: #ff6b6b;
border-left: 5px solid #dc3545;
padding: 10px;
margin: 20px auto;
max-width: 800px;
border-radius: 6px;
}
/* Style pour aucun événement */
.aucun-evenement {
text-align: center;
}
.aucun-evenement p {
color: white;
margin: 15px 0;
}
.aucun-evenement a {
text-decoration: none;
}

141
css/login.css Normal file
View File

@@ -0,0 +1,141 @@
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100..700;1,100..700&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Josefin Sans", sans-serif;
}
body {
background-image: url('../img/cielprince.png');
background-position: center;
background-size: cover;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
header{
position: absolute;
left: 15px;
top: 20px;
}
header button{
padding: 20px;
cursor: pointer;
background-color: transparent;
font-size: 20px;
transition: 0.2s;
color: white;
border: 0;
}
header button:hover{
background-color: rgb(122, 97, 179,0.5);
border-radius: 10px;
}
section {
padding: 30px;
width: 420px;
/* border-radius: 20px;
background-color: rgb(122, 97, 179,0.2);
border: 2px solid rgba(255, 255, 255, 0.2); */
}
section h2{
color: white;
font-size: 20px;
margin-bottom: 40px;
text-align: center;
}
/* rentrer les informations */
.box {
margin-bottom: 15px;
}
.box input {
width: 100%;
padding: 15px;
background-color: transparent;
border: 2px solid white;
color: white;
outline: none;
padding-right: 45px;
}
.box input::placeholder{
color: white;
}
/* icon */
.box i {
position: absolute;
right: 900px;
margin-top: 15px;
color: white;
}
/* -------------------------- */
.souvenir{
color: white;
margin-bottom: 20px;
}
.but1{
width: 100%;
border-radius: 20px;
border: 0;
padding: 15px;
font-weight: bold;
cursor: pointer;
transition: 0.2s;
border: 2px solid transparent;
}
.but1:hover{
background-color: transparent;
border: 2px solid rgba(255, 255, 255, 0.2);
color: white;
}
.inscrire{
text-align: center;
margin-top: 25px;
color: white;
}
.inscrire a{
text-decoration: none;
color: white;
transition: 0.2s;
font-weight: bold;
}
.inscrire a:hover{
text-decoration: underline;
}
.message {
color: rgb(117, 117, 117);
text-align: center;
}

208
css/main.css Normal file
View File

@@ -0,0 +1,208 @@
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100..700;1,100..700&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background: url('../img/cielprince.png') no-repeat center center fixed;
background-size: cover;
color: white;
font-family: 'Josefin Sans', sans-serif;
margin: 0;
}
/* Section hero */
.hero {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
background: linear-gradient(rgba(0,0,0,0.3), rgba(107, 91, 149, 0.2));
}
.hero-content h1 {
font-size: 4rem;
font-weight: 700;
margin-bottom: 10px;
text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.hero-content h2 {
font-size: 2.5rem;
font-weight: 400;
color: #c9b8e0;
margin-bottom: 20px;
}
.hero-content p {
font-size: 1.3rem;
opacity: 0.9;
}
/* Contenu principal */
.main-content {
max-width: 1000px;
margin: 0 auto;
padding: 60px 30px;
}
/* Section mission */
.mission {
background: rgba(157, 143, 190, 0.15);
padding: 50px;
border-radius: 20px;
margin-bottom: 60px;
text-align: center;
backdrop-filter: blur(10px);
border: 1px solid rgba(157, 143, 190, 0.3);
}
.mission h3 {
font-size: 2.2rem;
color: #c9b8e0;
margin-bottom: 25px;
font-weight: 600;
}
.mission p {
font-size: 1.2rem;
line-height: 1.8;
opacity: 0.95;
}
/* Services */
.services {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 30px;
margin-bottom: 60px;
}
.service {
background: rgba(157, 143, 190, 0.1);
padding: 35px;
border-radius: 15px;
text-align: center;
transition: all 0.3s ease;
border: 1px solid rgba(157, 143, 190, 0.2);
}
.service:hover {
background: rgba(157, 143, 190, 0.2);
transform: translateY(-5px);
}
.service-header {
display: flex;
align-items: center;
justify-content: center;
gap: 15px;
margin-bottom: 20px;
}
.icon {
font-size: 2rem;
}
.service h4 {
font-size: 1.5rem;
color: #c9b8e0;
font-weight: 600;
}
.service p {
font-size: 1rem;
line-height: 1.6;
opacity: 0.9;
}
/* Section inscription */
.inscription {
background: rgba(107, 91, 149, 0.2);
padding: 50px;
border-radius: 20px;
text-align: center;
border: 1px solid rgba(107, 91, 149, 0.4);
}
.inscription h3 {
font-size: 2rem;
color: #c9b8e0;
margin-bottom: 20px;
font-weight: 600;
}
.inscription p {
font-size: 1.1rem;
margin-bottom: 30px;
opacity: 0.9;
}
.btn {
display: inline-block;
background: linear-gradient(135deg, #9d8fbe, #6b5b95);
color: white;
padding: 15px 35px;
border-radius: 30px;
text-decoration: none;
font-weight: 600;
font-size: 1.1rem;
transition: all 0.3s ease;
box-shadow: 0 5px 15px rgba(107, 91, 149, 0.3);
}
.btn:hover {
transform: translateY(-3px);
box-shadow: 0 8px 25px rgba(107, 91, 149, 0.4);
}
/* Footer */
.bas-de-page {
background: rgba(0, 0, 0, 0.5);
text-align: center;
padding: 25px;
margin-top: 50px;
}
.bas-de-page p {
opacity: 0.8;
}
/* Responsive */
@media (max-width: 768px) {
.hero-content h1 {
font-size: 2.8rem;
}
.hero-content h2 {
font-size: 1.8rem;
}
.main-content {
padding: 40px 20px;
}
.mission,
.inscription {
padding: 30px;
}
.services {
grid-template-columns: 1fr;
}
.service-header {
flex-direction: column;
gap: 10px;
}
}
/* Compatibilité */
p, h2, h3 {
color: aliceblue;
}

75
css/menunav-inv.css Normal file
View File

@@ -0,0 +1,75 @@
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100..700;1,100..700&display=swap');
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Josefin Sans", sans-serif;
}
/* header */
header{
background-color: rgb(122, 97, 179);
padding: 25px;
}
header div{
display:inline-block;
}
header img{
margin-right: 20px;
}
a{
text-decoration: none;
}
/* navigation */
nav.menu ul li{
list-style-type:none ;
display: inline-block;
}
nav.menu ul li a{
color: white;
text-decoration: none;
background-color: rgb(122, 97, 179);
padding: 15px;
padding-left: 100px;
padding-bottom: 35px;
border-bottom: 8px solid rgb(98, 59, 190);
width: 100%;
}
nav.menu ul li:hover a{
color: white;
background-color: rgb(164, 146, 206);
transition: 0.2s;
}
div.connexion {
margin-left : 350px;
}
div.connexion button{
color: white;
background-color: black;
outline: none;
padding: 10px;
border-radius: 10px;
border: 0;
}
div.connexion button:hover{
transition: 0.2s;
cursor: pointer;
background-color: rgb(56, 56, 56);
}

84
css/menunav-user.css Normal file
View File

@@ -0,0 +1,84 @@
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100..700;1,100..700&display=swap');
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Josefin Sans", sans-serif;
}
header{
background-color: rgb(122, 97, 179);
padding: 25px;
}
header div{
display:inline-block;
}
header img{
margin-right: 20px;
}
a{
text-decoration: none;
}
/* navigation */
nav.menu-nav ul li{
list-style-type:none ;
display: inline-block;
}
nav.menu-nav ul li a{
color: white;
text-decoration: none;
background-color: rgb(122, 97, 179);
padding: 15px;
padding-left: 100px;
padding-bottom: 35px;
border-bottom: 8px solid rgb(98, 79, 145);
width: 100%;
}
nav.menu-nav ul li:hover a{
color: white;
background-color: rgb(164, 146, 206);
transition: 0.2s;
}
div.profil {
margin-left: 300px;
}
div.profil button{
color: white;
background-color: rgb(98, 79, 145);
outline: none;
padding: 10px 25px;
border-radius: 10px;
border: 0;
}
div.profil button:hover{
transition: 0.2s;
cursor: pointer;
background-color: rgb(54, 44, 80);
}
div.deco button{
color: white;
background-color: #d94c4c;
outline: none;
padding: 10px 25px;
border-radius: 10px;
border: 0;
}
div.deco button:hover{
transition: 0.2s;
cursor: pointer;
background-color: #b73838;
}

213
css/my_event.css Normal file
View File

@@ -0,0 +1,213 @@
/* Reprendre le style de event.css mais adapté */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Arial', sans-serif;
background: #0a0a0a;
color: #ffffff;
min-height: 100vh;
overflow-x: hidden;
}
/* Header identique */
header {
background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
padding: 1rem 0;
text-align: center;
border-bottom: 2px solid #333;
}
header h1 {
font-size: 2.5rem;
margin-bottom: 1rem;
background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: 0 0 30px rgba(255, 107, 107, 0.5);
}
nav {
display: flex;
justify-content: center;
gap: 2rem;
flex-wrap: wrap;
}
nav a {
color: #ffffff;
text-decoration: none;
padding: 0.7rem 1.5rem;
border: 2px solid transparent;
border-radius: 25px;
transition: all 0.3s ease;
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(5px);
}
nav a:hover,
nav a.active {
border-color: #4ecdc4;
background: rgba(78, 205, 196, 0.2);
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(78, 205, 196, 0.3);
}
nav span {
color: #4ecdc4;
padding: 0.7rem 1.5rem;
font-weight: bold;
}
/* Titre principal */
.grand-titre {
text-align: center;
margin: 3rem 0;
padding: 0 1rem;
}
.grand-titre h2 {
font-size: 2.5rem;
background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
margin-bottom: 1rem;
}
/* Messages */
.message {
padding: 1rem 2rem;
margin: 1rem auto;
max-width: 600px;
border-radius: 10px;
text-align: center;
font-weight: bold;
backdrop-filter: blur(10px);
}
.message.success {
background: rgba(40, 167, 69, 0.2);
border: 2px solid #28a745;
color: #4ecdc4;
box-shadow: 0 5px 20px rgba(40, 167, 69, 0.3);
}
.message.error {
background: rgba(220, 53, 69, 0.2);
border: 2px solid #dc3545;
color: #ff6b6b;
box-shadow: 0 5px 20px rgba(220, 53, 69, 0.3);
}
/* Container des événements */
.evenements {
max-width: 1400px;
margin: 0 auto;
padding: 2rem;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
gap: 2rem;
}
/* Style des cartes d'événements */
.evenement {
background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
border: 2px solid #333;
border-radius: 20px;
padding: 2rem;
position: relative;
transition: all 0.4s ease;
backdrop-filter: blur(10px);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.evenement:hover {
transform: translateY(-10px) scale(1.02);
border-color: #4ecdc4;
box-shadow: 0 20px 40px rgba(78, 205, 196, 0.2);
}
.evenement::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
background: linear-gradient(90deg, #ff6b6b, #4ecdc4);
border-radius: 20px 20px 0 0;
}
.evenement h3 {
font-size: 1.5rem;
margin-bottom: 1rem;
color: #4ecdc4;
text-shadow: 0 0 10px rgba(78, 205, 196, 0.5);
}
.evenement .adresse {
color: #ff6b6b;
font-size: 1rem;
margin-bottom: 1rem;
font-weight: 500;
}
.evenement .description {
color: #cccccc;
line-height: 1.6;
margin-bottom: 2rem;
font-size: 0.95rem;
}
/* Actions */
.actions {
text-align: center;
}
.btn-inscription {
display: inline-block;
padding: 1rem 2rem;
background: linear-gradient(45deg, #dc3545, #c82333);
color: white;
text-decoration: none;
border-radius: 25px;
font-weight: bold;
transition: all 0.3s ease;
border: 2px solid transparent;
text-transform: uppercase;
letter-spacing: 1px;
}
.btn-inscription:hover {
transform: translateY(-3px);
box-shadow: 0 10px 25px rgba(220, 53, 69, 0.4);
border-color: #dc3545;
text-decoration: none;
color: white;
}
/* Message aucun événement */
.aucun-evenement {
text-align: center;
padding: 3rem;
}
.aucun-evenement p {
font-size: 1.2rem;
color: #cccccc;
margin-bottom: 2rem;
}
.aucun-evenement .btn-inscription {
background: linear-gradient(45deg, #4ecdc4, #45b7b8);
}
.aucun-evenement .btn-inscription:hover {
box-shadow: 0 10px 25px rgba(78, 205, 196, 0.4);
border-color: #4ecdc4;
}

298
css/profil.css Normal file
View File

@@ -0,0 +1,298 @@
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100..700;1,100..700&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Josefin Sans", sans-serif;
}
html {
height: 100%;
margin: 0;
padding: 0;
}
body {
background: url('../img/cielprince.png') no-repeat center center fixed;
background-size: cover;
color: white;
font-family: 'Josefin Sans', sans-serif;
margin: 0;
}
.grand-titre {
text-align: center;
margin-bottom: 40px;
margin-left: 233px;
/* background-color: rgba(255, 255, 255, 0.1); */
background-color: rgb(122, 97, 179);
padding: 30px;
}
.grand-titre h1 {
font-size: 2.5rem;
margin-bottom: 10px;
color: white;
}
.grand-titre p {
font-size: 1.2rem;
opacity: 0.8;
}
/* navigation */
.menu {
position: fixed;
top:0px;
left: 0px;
height: 100%;
background-color: rgb(32, 32, 32);
padding-top: 100px;
}
.menu img{
margin-left: 25px;
position: fixed;
top: 20px;
}
.menu a{
text-decoration: none;
}
.menu ul .but1 {
list-style-type: none;
margin-top: 50px;
}
.menu ul .but1 a{
color: white;
width: 100%;
padding: 20px 40px;
text-decoration: none;
width: 50%;
transition: 0.2s;
}
.menu ul .but1 a:hover{
background-color: rgb(53, 53, 53);
}
/* déco */
.but2 a {
text-decoration: none;
padding: 10px 20px;
background-color: #d94c4c;
color: white;
border-radius: 8px;
transition: 0.2s;
}
.but2 a:hover {
background-color: #b73838;
}
.but2 {
position: absolute;
top: 35px;
right: 20px;
}
/* PROFIL */
.profile {
max-width: 800px;
}
.profile-header {
display: flex;
align-items: center;
margin-bottom: 40px;
background-color: rgba(255, 255, 255, 0.1);
padding: 30px;
border-radius: 15px;
backdrop-filter: blur(10px);
}
.logo {
width: 80px;
height: 80px;
border-radius: 50%;
background-color: rgb(122, 97, 179);
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
font-weight: 600;
margin-right: 25px;
}
.nom h2 {
font-size: 28px;
margin-bottom: 5px;
}
.pseudo {
opacity: 0.7;
font-size: 1.1rem;
}
.profile-info {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
gap: 30px;
}
.section {
background-color: rgba(17, 17, 17, 0.7);
padding: 25px;
border-radius: 15px;
backdrop-filter: blur(10px);
}
.section h3 {
color: rgb(122, 97, 179);
font-size: 1.3rem;
margin-bottom: 20px;
border-bottom: 2px solid rgba(122, 97, 179, 0.3);
padding-bottom: 10px;
}
.info {
display: flex;
justify-content: space-between;
margin-bottom: 15px;
padding: 10px 0;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.info label {
font-weight: 600;
color: rgb(122, 97, 179);
}
.info p {
opacity: 0.9;
}
/* Disposition en deux colonnes */
.profil-section {
display: flex;
gap: 30px;
max-width: 1200px;
margin-left: 250px; /* Pour éviter le menu */
padding: 20px;
}
.profile-info{
display: block;
}
.profil-section .profile {
flex: 1;
}
/* Styles pour les champs de formulaire */
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
margin-bottom: 5px;
color: #a17df5;
font-size: 14px;
}
.form-group input,
.form-group textarea {
width: 100%;
padding: 8px 12px;
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 5px;
color: white;
font-size: 14px;
box-sizing: border-box;
}
.form-group input:focus,
.form-group textarea:focus {
outline: none;
border-color: #a17df5;
}
.btn-modifier {
width: 100%;
background: linear-gradient(135deg, #a17df5, #8b5fbf);
color: white;
padding: 12px;
border: none;
border-radius: 25px;
font-size: 14px;
font-weight: bold;
cursor: pointer;
text-transform: uppercase;
letter-spacing: 1px;
margin-top: 15px;
}
.btn-modifier:hover {
transform: translateY(-1px);
}
/* Messages */
.message-alert {
padding: 10px;
margin: 20px auto 20px 270px; /* top right bottom left */
max-width: 800px;
border-radius: 8px;
text-align: center;
font-weight: bold;
}
.message-alert.success {
background: rgba(76, 175, 80, 0.2);
color: rgb(39, 173, 39);
border: 1px solid rgba(76, 175, 80, 0.3);
}
.message-alert.error {
background: rgba(244, 67, 54, 0.2);
color: rgb(216, 52, 40);
border: 1px solid rgba(244, 67, 54, 0.3);
}
/* Responsive */
@media (max-width: 768px) {
.profil-wrapper {
flex-direction: column;
}
}

115
css/register.css Normal file
View File

@@ -0,0 +1,115 @@
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100..700;1,100..700&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Josefin Sans", sans-serif;
}
body {
background-image: url('../img/cielprince.png');
background-position: center;
background-size: cover;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
header{
position: absolute;
left: 15px;
top: 20px;
}
header button{
padding: 20px;
cursor: pointer;
background-color: transparent;
font-size: 20px;
transition: 0.2s;
color: white;
border: 0;
}
header button:hover{
background-color: rgb(122, 97, 179,0.2);
border-radius: 10px;
}
section {
display: inline-block;
}
h2 {
color: white;
font-size: 20px;
margin-bottom: 40px;
text-align: center;
}
/* rentrer les informations */
.box {
margin-bottom: 15px;
}
.info {
display:inline-flex;
justify-content: space-between;
}
.box input {
width: 100%;
padding: 15px;
background-color: transparent;
border: 2px solid white;
color: white;
outline: none;
padding-right: 45px;
}
.box input::placeholder{
color: white;
}
.box i {
position: absolute;
right: 790px;
margin-top: 15px;
color: white;
}
/* -------------------------- */
.but1 {
width: 100%;
border-radius: 20px;
border: 0;
padding: 15px;
font-weight: bold;
cursor: pointer;
transition: 0.2s;
border: 2px solid transparent;
margin-bottom: 15px;
margin-top: 15px;
align-items: center;
}
.but1:hover {
background-color: transparent;
border: 2px solid rgba(255, 255, 255, 0.2);
color: white;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

BIN
img/cielprince.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

BIN
img/logogrey.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

BIN
img/logov2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

BIN
img/logowhite.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

BIN
img/logseul.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

BIN
img/postit.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

60
views/contact.php Normal file
View File

@@ -0,0 +1,60 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel='stylesheet' type='text/css' media='screen' href='../css/contact-style.css'>
<title>Document</title>
</head>
<header>
<div class="header-content">
<a href="index.php" class="logo-container">
<img src="../img/logowhite.png" class="image_header" alt="Logo" width="150px">
</a>
</header>
<body>
<h1>📬 Contactez-nous</h1>
<div class="contact-grid">
<!-- Coordonnées -->
<div class="contact-info">
<h2>📍 Notre adresse</h2>
<p>36 Rue Georges Charpak<br>77127 Lieusaint</p>
<h2>📧 Email</h2>
<p><a href="contact@vendeurdereve.com">contact@vendeurdereve.com</a></p>
<h2>📞 Téléphone</h2> <p>+33 6 51 85 52 03</p> <p>+33 6 50 61 44 17</p>
</div>
<!-- Formulaire -->
<div class="contact-form">
<h2>💬 Envoyez-nous un message</h2>
<form method="POST" action="traitement_contact.php">
<input type="text" name="nom" placeholder="Votre nom" required>
<input type="email" name="email" placeholder="Votre email" required>
<textarea name="message" rows="6" placeholder="Votre message..." required></textarea>
<button type="submit">Envoyer ✉️</button>
</form>
</div>
</div>
<!-- Carte Google Maps -->
<div class="map-container">
<h2>🗺️ Nous trouver</h2>
<iframe
src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2639.949874776728!2d2.570875315671765!3d48.63068407926678!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x47e5f0fc9fc8f68f%3A0x7275031d05bb93aa!2s36%20Rue%20Georges%20Charpak%2C%2077127%20Lieusaint!5e0!3m2!1sfr!2sfr!4v1717923543456!5m2!1sfr!2sfr"
width="100%"
height="400"
style="border:0;"
allowfullscreen=""
loading="lazy"
referrerpolicy="no-referrer-when-downgrade">
</iframe>
</div>
</section>
</body>

89
views/creator.php Normal file
View File

@@ -0,0 +1,89 @@
<?php include '../controler/actionCreator.php'; ?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Créateur d'événements</title>
<link rel="stylesheet" href="../css/creator.css">
</head>
<?php include '../controler/menu-profil.php'; ?>
<body>
<div class="bouton-deco">
<a href="../controler/logout.php">Se déconnecter</a>
</div>
<div class="titre-page">
<h1>CRÉATEUR D'ÉVÉNEMENTS</h1>
<p>Interface administration</p>
</div>
<?php if ($message): ?>
<div class="message <?php echo strpos($message, 'Super') !== false ? 'success' : 'error'; ?>">
<?php echo $message; ?>
</div>
<?php endif; ?>
<div class="main">
<div class="creator">
<!-- Créer un événement -->
<div class="creator-section">
<div class="box-creation">
<h3>Créer un nouvel événement</h3>
<form method="POST">
<div class="champ">
<label>Titre de l'événement</label>
<input type="text" name="titre" value="<?php echo isset($titre) ? htmlspecialchars($titre) : ''; ?>" placeholder="Ex: Concert de Jazz" required>
</div>
<div class="champ">
<label>Adresse</label>
<input type="text" name="adresse" value="<?php echo isset($adresse) ? htmlspecialchars($adresse) : ''; ?>" placeholder="Ex: 123 Rue de la Musique, Paris" required>
</div>
<div class="champ">
<label>Description</label>
<textarea name="description" rows="5"
placeholder="Raconte-nous ton événement..."><?php echo isset($description) ? htmlspecialchars($description) : ''; ?></textarea>
</div>
<button type="submit" class="bouton-creer">Créer l'événement</button>
</form>
</div>
</div>
<!-- Événements créés -->
<div class="liste">
<div class="box-liste">
<h3>📋 Événements récents</h3>
<div class="event-recent">
<?php
$events = getRecentEvents($mysqli);
if ($events->num_rows > 0) {
while ($event = $events->fetch_assoc()) {
echo '<div class="mini-event">';
echo '<h4>' . htmlspecialchars($event['titre']) . '</h4>';
echo '<p class="lieu">📍 ' . htmlspecialchars($event['adresse']) . '</p>';
if (!empty($event['description_'])) {
echo '<p class="desc">' . htmlspecialchars($event['description_']) . '...</p>';
}
echo '</div>';
}
} else {
echo '<p class="aucun-event">Aucun événement pour le moment...</p>';
}
?>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

123
views/event.php Normal file
View File

@@ -0,0 +1,123 @@
<?php
session_start();
include "../controler/database.php";
if(isset($_GET['recherche']) && !empty($_GET['recherche'])){
$recherche = $_GET['recherche'];
$stmt = $mysqli->prepare("SELECT id, titre, adresse, description_ FROM evenement WHERE titre LIKE ?");
$terme = "%" . $recherche . "%";
$stmt->bind_param("s", $terme);
} else {
$stmt = $mysqli->prepare("SELECT id, titre, adresse, description_ FROM evenement");
}
$stmt->execute();
$stmt->bind_result($id, $titre, $adresse, $description);
$evenements = [];
while ($stmt->fetch()) {
$evenements[] = [
'id' => $id,
'titre' => $titre,
'adresse' => $adresse,
'description' => $description
];
}
$stmt->close();
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Événements</title>
<link rel="stylesheet" href="../css/event.css">
</head>
<?php
if(!isset($_SESSION['pseudo'])){
include '../controler/menunav-inv.php';
} else {
include '../controler/menunav-user.php';
}
?>
<body>
<div class="page-header">
<h2>Liste des Événements</h2>
<!-- Barre de recherche -->
<form method="GET" class="recherche-form">
<input type="text" name="recherche" placeholder="Rechercher un événement..."
value="<?php echo isset($_GET['recherche']) ? $_GET['recherche'] : ''; ?>"
class="recherche-input">
<button type="submit" class="recherche-btn">Rechercher</button>
<?php if(isset($_GET['recherche'])): ?>
<a href="event.php" class="effacer-link">Effacer</a>
<?php endif; ?>
</form>
<?php if (isset($_GET['inscription'])) : ?>
<?php if ($_GET['inscription'] === "ok") : ?>
<p class="message success">✅ Inscription réussie !</p>
<?php elseif ($_GET['inscription'] === "deja") : ?>
<p class="message warning">⚠️ Vous êtes déjà inscrit à cet événement.</p>
<?php endif; ?>
<?php endif; ?>
</div>
<div class="evenement-container">
<!-- -->
<?php foreach ($evenements as $event) : ?>
<div class="evenement-card">
<h3><?php echo htmlspecialchars($event['titre']); ?></h3>
<p><strong>Adresse 📍:</strong> <?php echo htmlspecialchars($event['adresse']); ?></p>
<p><?php echo nl2br(htmlspecialchars($event['description'])); ?></p>
<!-- Affichage des commentaires -->
<div class="commentaires">
<h4>Commentaires :</h4>
<?php
$stmtCom = $mysqli->prepare("SELECT c.contenu, c.datepublication, u.pseudo
FROM commentaire c
JOIN utilisateur u ON c.id_utilisateur = u.id
WHERE c.id_evenement = ?
ORDER BY c.datepublication DESC");
$stmtCom->bind_param("i", $event['id']);
$stmtCom->execute();
$stmtCom->bind_result($contenu, $date, $auteur);
while ($stmtCom->fetch()) {
echo "<div class='commentaire'>";
echo "<p><strong>👤 " . htmlspecialchars($auteur) . " — " . htmlspecialchars($date) . "</strong><br>" .
nl2br(htmlspecialchars($contenu)) . "</p>";
echo "</div>";
}
$stmtCom->close();
?>
</div>
<!-- Formulaires -->
<?php if (isset($_SESSION['pseudo'])) : ?>
<form action="ajout_commentaire.php" method="post">
<input type="hidden" name="id_evenement" value="<?php echo $event['id']; ?>">
<textarea class="commentaire-textarea" name="contenu" placeholder="Ton commentaire..." required></textarea>
<button class="inscrire-btn" type="submit">Envoyer</button>
</form>
<form action="inscription_event.php" method="post">
<input type="hidden" name="id_evenement" value="<?php echo $event['id']; ?>">
<button type="submit" class="inscrire-btn">S'inscrire</button>
</form>
<?php endif; ?>
</div>
<?php endforeach; ?>
<!-- -->
</div>
</body>
</html>

91
views/index.php Normal file
View File

@@ -0,0 +1,91 @@
<?php
session_start();
include '../controler/database.php';
?>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>PID LOCAL</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<link rel='stylesheet' type='text/css' media='screen' href='../css/main.css'>
</head>
<?php
if(!isset($_SESSION['pseudo'])){
include '../controler/menunav-inv.php';
}else{
include '../controler/menunav-user.php';
}
?>
<body>
<!-- Section principale -->
<div class="hero">
<div class="hero-content">
<h1>DREAM SELLER</h1>
<h2>Vendeur de Rêve</h2>
<p>Plateforme d'accompagnement vers la réussite</p>
</div>
</div>
<!-- Contenu principal -->
<div class="main-content">
<!-- Notre mission -->
<div class="mission">
<h3>Notre Mission</h3>
<p>
Vendeur de Rêve est un projet engagé qui lutte pour l'égalité des chances.
Notre mission : accompagner, inspirer et aider celles et ceux qui n'ont pas
toujours les mêmes opportunités de réussir.
</p>
</div>
<!-- Services -->
<div class="services">
<div class="service">
<div class="service-header">
<span class="icon">💼</span>
<h4>Job Finder</h4>
</div>
<p>Trouve l'emploi de tes rêves grâce à notre plateforme dédiée</p>
</div>
<div class="service">
<div class="service-header">
<span class="icon">🎉</span>
<h4>Événements</h4>
</div>
<p>Participe à nos événements networking et de formation</p>
</div>
<div class="service">
<div class="service-header">
<span class="icon">🤝</span>
<h4>Accompagnement</h4>
</div>
<p>Bénéficie d'un suivi personnalisé avec nos conseillers</p>
</div>
</div>
<!-- Inscription -->
<div class="inscription">
<h3>Prêt à commencer ?</h3>
<p>Rejoins notre communauté et commence ton parcours vers la réussite</p>
<a href="inscription.php" class="btn">Rejoindre maintenant</a>
</div>
</div>
<footer class="bas-de-page">
<p>&copy; 2024 Dream Seller - Tous droits réservés</p>
</footer>
</body>
</html>

62
views/login.php Normal file
View File

@@ -0,0 +1,62 @@
<?php session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DREAM SELLER | Connexion</title>
<link rel="stylesheet" href="../css/login.css">
</head>
<body>
<section>
<header>
<a href="index.php"><button>ACCUEIL</button></a>
</header>
<h2>CONNEXION</h2>
<form method="post">
<div class="box">
<input type="email" name="email" id="email" placeholder="Adresse mail" required>
</div>
<div class="box">
<input type="password" name="mdp" id="mdp" placeholder="Mot de passe" required>
</div>
<div class="souvenir">
<label ><input type="checkbox">Se souvenir de moi</label>
</div>
<input class="but1" type="submit" name="formsend" id="formsend">
<div class="inscrire">
<a href="register.php">S'inscrire</a>
</div>
</form>
<div class="message">
</div>
<?php
include '../controler/actionLogin.php';
?>
<br>
<div class="message">
<?php
if(!empty($message)){
echo $message;
}
?>
</div>
</section>
</body>
</html>

110
views/my_event.php Normal file
View File

@@ -0,0 +1,110 @@
<?php
session_start();
include "../controler/database.php";
// Vérifier si l'utilisateur est connecté
if (!isset($_SESSION['pseudo'])) {
header("Location: login.php");
exit();
}
$pseudo = $_SESSION['pseudo'];
// Récupérer l'ID de l'utilisateur à partir du pseudo
$stmt = $mysqli->prepare("SELECT id FROM utilisateur WHERE pseudo = ?");
$stmt->bind_param("s", $pseudo);
$stmt->execute();
$stmt->bind_result($id_utilisateur);
$stmt->fetch();
$stmt->close();
// Gérer la désinscription
if (isset($_GET['desinscription']) && is_numeric($_GET['desinscription'])) {
$id_evenement = $_GET['desinscription'];
$stmt = $mysqli->prepare("DELETE FROM inscription WHERE id_utilisateur = ? AND id_evenement = ?");
$stmt->bind_param("ii", $id_utilisateur, $id_evenement);
if ($stmt->execute()) {
header("Location: my_event.php?desinscription=ok");
} else {
header("Location: my_event.php?desinscription=erreur");
}
exit();
}
// Récupérer les événements où l'utilisateur est inscrit
$stmt = $mysqli->prepare("
SELECT e.id, e.titre, e.adresse, e.description_
FROM evenement e
JOIN inscription i ON e.id = i.id_evenement
WHERE i.id_utilisateur = ?
");
$stmt->bind_param("i", $id_utilisateur);
$stmt->execute();
$result = $stmt->get_result();
$evenements = $result->fetch_all(MYSQLI_ASSOC);
$stmt->close();
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mes Événements</title>
<link rel="stylesheet" href="../css/event.css">
</head>
<body>
<?php include '../controler/menu-profil.php';?>
<!-- Titre principal -->
<div class="grand-titre">
<h1>Mes Événements Inscrits</h1>
</div>
<!-- Messages d'alerte -->
<?php if (isset($_GET['desinscription'])): ?>
<?php if ($_GET['desinscription'] == 'ok'): ?>
<div class="message success">
Désinscription réussie !
</div>
<?php elseif ($_GET['desinscription'] == 'erreur'): ?>
<div class="message error">
Erreur lors de la désinscription.
</div>
<?php endif; ?>
<?php endif; ?>
<!-- Container des événements -->
<div class="evenement-container">
<?php if (count($evenements) > 0): ?>
<?php foreach ($evenements as $evenement): ?>
<div class="evenement-card">
<h3><?= htmlspecialchars($evenement['titre']) ?></h3>
<p><strong>📍 <?= htmlspecialchars($evenement['adresse']) ?></strong></p>
<p><?= htmlspecialchars($evenement['description_']) ?></p>
<form method="GET">
<input type="hidden" name="desinscription" value="<?php $evenement['id'] ?>">
<button type="submit" class="desinscription">
Se désinscrire
</button>
</form>
</div>
<?php endforeach; ?>
<?php else: ?>
<div class="evenement-card aucun-evenement">
<h3>Aucun événement</h3>
<p>Vous n'êtes inscrit à aucun événement pour le moment.</p>
<a href="event.php">
<button class="inscrire-btn">Voir tous les événements</button>
</a>
</div>
<?php endif; ?>
</div>
</body>
</html>

148
views/profil.php Normal file
View File

@@ -0,0 +1,148 @@
<?php
session_start();
include '../controler/database.php';
include '../controler/actionModif.php';
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Profil</title>
<link rel="stylesheet" href="../css/profil.css">
</head>
<header>
<div class="grand-titre">
<h1>MON PROFIL</h1>
<p>Vos informations personnelles</p>
</div>
</header>
<body>
<?php include '../controler/menu-profil.php';?>
<div class="but2">
<a href="../controler/logout.php">Se déconnecter</a>
</div>
<!-- PROFIL -->
<?php if ($message): ?>
<div class="message-alert <?php echo strpos($message, 'succès') !== false ? 'success' : 'error'; ?>">
<?php echo $message; ?>
</div>
<?php endif; ?>
<div class="profil-section">
<!-- PROFIL (à gauche) -->
<div class="profile">
<div class="profile-header">
<div class="logo"></div>
<div class="nom">
<h2><?php echo $prenom;?> <?php echo $nom;?></h2>
<p class="pseudo">@<?php echo $pseudo;?></p>
</div>
</div>
<div class="profile-info">
<div class="section">
<h3>Informations personnelles</h3>
<div class="info">
<label>Nom :</label>
<p><?php echo $nom;?></p>
</div>
<div class="info">
<label>Prénom :</label>
<p><?php echo $prenom;?></p>
</div>
<div class="info">
<label>Nom d'utilisateur :</label>
<p><?php echo $pseudo;?></p>
</div>
<div class="info">
<label>Email :</label>
<p><?php echo $email;?></p>
</div>
<div class="info">
<label>Âge :</label>
<p><?php echo $age;?></p>
</div>
</div>
<div class="section">
<h3>Statistiques</h3>
<div class="info">
<label>Événements rejoints :</label>
<p><?php echo $nombre_evenements;?></p>
</div>
<div class="info">
<label>Membre depuis :</label>
<p><?php echo $date;?></p>
</div>
</div>
</div>
</div>
<div class="profile">
<div class="profile-info">
<div class="section">
<h3>Modifier mes informations</h3>
<form method="POST">
<div class="section">
<h3>Informations personnelles</h3>
<div class="form-group">
<label>Nom :</label>
<input type="text" name="nom" value="<?php echo htmlspecialchars($nom);?>" required>
</div>
<div class="form-group">
<label>Prénom :</label>
<input type="text" name="prenom" value="<?php echo htmlspecialchars($prenom);?>" required>
</div>
<div class="form-group">
<label>Email :</label>
<input type="email" name="email" value="<?php echo htmlspecialchars($email);?>" required>
</div>
<div class="form-group">
<label>Âge :</label>
<input type="number" name="age" value="<?php echo $age;?>" min="1" max="120">
</div>
</div>
<div class="section">
<h3>Changer le mot de passe</h3>
<div class="form-group">
<label>Nouveau mot de passe :</label>
<input type="password" name="nouveau_mdp" placeholder="Laisser vide pour ne pas changer">
</div>
<div class="form-group">
<label>Confirmer le nouveau mot de passe :</label>
<input type="password" name="confirmer_mdp" placeholder="Confirmer le mot de passe">
</div>
</div>
<button type="submit" class="btn-modifier">Sauvegarder les modifications</button>
</form>
</div>
</div>
</div>
</div>
</body>
</html>

71
views/register.php Normal file
View File

@@ -0,0 +1,71 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DREAM SELLER | Inscription</title>
<link rel="stylesheet" href="../css/register.css">
</head>
<body>
<header>
<a href="index.php"><button>ACCUEIL</button></a>
</header>
<section>
<h2>INSCRIPTION</h2>
<form method="post">
<div class="info">
<div class="box">
<input type="text" name="nom" id="nom" placeholder="Nom" required>
</div>
<div class="box">
<input type="text" name="prenom" id="prenom" placeholder="Prénom" required>
</div>
</div>
<!-- -->
<div class="box">
<input type="number" name="age" id="age" placeholder="Âge" required>
</div>
<div class="box">
<input type="text" name="pseudo" id="pseudo" placeholder="Nom d'utilisateur" required>
</div>
<div class="box">
<input type="email" name="email" id="email" placeholder="Adresse Mail" required>
</div>
<div class="box">
<input type="password" name="mdp" id="mdp" placeholder="Mot de passe" required>
</div>
<div class="box">
<input type="password" name="cmdp" id="cmdp" placeholder="Confirmer votre mot de passe" required>
</div>
<input class="but1" type="submit" name="formsend" id="formsend">
<!-- -->
</form>
<?php
include '../controler/actionRegister.php';
?>
</section>
</body>