89 lines
3.5 KiB
PHP
89 lines
3.5 KiB
PHP
<?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>
|