admin: unify templates, dynamic navigation, and PHP cleanup

This commit is contained in:
Théophile Gervreau-Mercier
2026-02-06 14:31:23 +01:00
parent 52decc3e5f
commit df611b0333
8 changed files with 91 additions and 602 deletions

View File

@@ -55,15 +55,15 @@ function wasSelected($key, $value)
return $formData[$key] == $value;
}
?>
<?php include "inc/head.php"?>
<?php require_once __DIR__ . "/inc/head.php"; ?>
<main>
<?php if ($error): ?>
<div class="error-message" style="background: #fee; border: 2px solid #c00; padding: 1rem; margin-bottom: 1rem; border-radius: 4px; color: #c00;">
<div class="error-message">
<strong>⚠️ Erreur:</strong> <?php echo htmlspecialchars($error); ?>
</div>
<?php endif; ?>
<form action="formulaire.php" method="post" enctype="multipart/form-data">
<form action="actions/formulaire.php" method="post" enctype="multipart/form-data">
<!-- CSRF Protection -->
<input type="hidden" name="csrf_token" value="<?php echo htmlspecialchars(
$_SESSION["csrf_token"],
@@ -175,7 +175,7 @@ function wasSelected($key, $value)
"problématique",
); ?></textarea>
<label>Langue(s) du TFE * (sélection multiple possible)</label>
<ul style="list-style: none;">
<ul class="no-style">
<?php foreach ($languages as $language): ?>
<li>
<label class="checkbox-label">
@@ -194,7 +194,7 @@ function wasSelected($key, $value)
</ul>
<label>Format(s) (sélection multiple possible)</label>
<ul style="list-style: none;">
<ul class="no-style">
<?php foreach ($formatTypes as $format): ?>
<li>
<label class="checkbox-label">
@@ -246,4 +246,4 @@ function wasSelected($key, $value)
</form>
</main>
<?php include "inc/footer.php"?>
<?php require_once __DIR__ . "/inc/footer.php"; ?>