menu ok graphiquement et page 404 ok
This commit is contained in:
+24
-10
@@ -1,16 +1,30 @@
|
||||
<?php
|
||||
// On envoie explicitement le code d'erreur 404 au navigateur
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
http_response_code(404);
|
||||
|
||||
require_once('header.php');
|
||||
$pageStylesheets = ['/css/404.css'];
|
||||
$bodyClass = 'page-404';
|
||||
|
||||
require_once __DIR__ . '/header.php';
|
||||
?>
|
||||
|
||||
<div style="text-align: center; padding: 50px; color: white;">
|
||||
<h1>Erreur 404</h1>
|
||||
<p>Désolé, la page que vous recherchez est introuvable.</p>
|
||||
<a href="/index.php" style="color: #007bff;">Retour à l'accueil</a>
|
||||
</div>
|
||||
<section class="error-shell">
|
||||
<article class="error-card">
|
||||
<h1 class="error-headline">404</h1>
|
||||
<p class="error-subtitle">La transaction est introuvable. Le cours de cette page a chuté et le marché n’en veut plus.</p>
|
||||
|
||||
<?php
|
||||
require_once('footer.php');
|
||||
?>
|
||||
<div class="error-meta">
|
||||
<span class="meta-chip">Route : /404</span>
|
||||
<span class="meta-chip">Status : Page non cotée</span>
|
||||
<span class="meta-chip">Session : <?= htmlspecialchars((string) ($_SESSION['user_id'] ?? 'invité'), ENT_QUOTES, 'UTF-8') ?></span>
|
||||
</div>
|
||||
|
||||
<div class="error-actions">
|
||||
<a href="/index.php" class="button-return">Retour à la base</a>
|
||||
</div>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<?php require_once __DIR__ . '/footer.php'; ?>
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
</main>
|
||||
<footer class="footer">
|
||||
<?php if (isset($_SESSION['user_id'])): ?>
|
||||
<a class="logout-button footer-logout" href="/php/menu.php?action=logout">Se déconnecter</a>
|
||||
<a class="logout-button footer-logout" href="/php/logout.php">Se déconnecter</a>
|
||||
<?php endif; ?>
|
||||
<p>© 2026 - Jean-François GIRAUD - Positions en bourse - Tous droits réservés</p>
|
||||
</footer>
|
||||
|
||||
+6
-1
@@ -5,9 +5,14 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Bourse - Page d'Accueil</title>
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
<?php if (!empty($pageStylesheets) && is_array($pageStylesheets)): ?>
|
||||
<?php foreach ($pageStylesheets as $sheet): ?>
|
||||
<link rel="stylesheet" href="<?= htmlspecialchars($sheet, ENT_QUOTES, 'UTF-8') ?>">
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
<link rel="shortcut icon" href="/assets/images/favicon.png" type="image/x-icon">
|
||||
</head>
|
||||
<body>
|
||||
<body class="<?= !empty($bodyClass) ? htmlspecialchars($bodyClass, ENT_QUOTES, 'UTF-8') : '' ?>">
|
||||
<header class="header">
|
||||
<div class="container">
|
||||
<div class="logo">
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
require_once __DIR__ . '/session.php';
|
||||
|
||||
// Destroy the PHP session and clear the session cookie.
|
||||
session_unset();
|
||||
session_destroy();
|
||||
setcookie(session_name(), '', time() - 42000, '/');
|
||||
|
||||
// Redirect to the public login/home page.
|
||||
header('Location: https://giraud-finance.com');
|
||||
exit;
|
||||
+70
-26
@@ -4,40 +4,84 @@ declare(strict_types=1);
|
||||
|
||||
require_once __DIR__ . '/session.php';
|
||||
|
||||
// Logout action
|
||||
if (isset($_GET['action']) && $_GET['action'] === 'logout') {
|
||||
session_unset();
|
||||
session_destroy();
|
||||
setcookie(session_name(), '', time() - 42000, '/');
|
||||
header('Location: ../index.php');
|
||||
exit;
|
||||
// Si l'utilisateur n'est pas connecté, redirection vers l'accueil.
|
||||
if (empty($_SESSION['user_id'])) {
|
||||
header('Location: ../index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
// Require login
|
||||
if (empty($_SESSION['user_id'])) {
|
||||
header('Location: ../index.php');
|
||||
exit;
|
||||
}
|
||||
// Ajoute le CSS spécifique à cette page et une classe body dédiée.
|
||||
$pageStylesheets = ['/css/menu.css'];
|
||||
$bodyClass = 'menu-page';
|
||||
|
||||
require_once __DIR__ . '/header.php';
|
||||
?>
|
||||
|
||||
<div class="login-container">
|
||||
<div class="login-box">
|
||||
<h2 class="login-title">Espace utilisateur</h2>
|
||||
<section class="menu-shell">
|
||||
<article class="menu-card">
|
||||
<header class="menu-card__header">
|
||||
<div>
|
||||
<h2 class="menu-card__title">Espace de gestion</h2>
|
||||
<p class="menu-card__subtitle">Accédez aux fonctions clés de l'application financière.</p>
|
||||
</div>
|
||||
<span class="menu-card__badge">v1.0</span>
|
||||
</header>
|
||||
|
||||
<p>Session ID : <?php echo htmlspecialchars(session_id(), ENT_QUOTES, 'UTF-8'); ?></p>
|
||||
<p>User ID : <?php echo htmlspecialchars((string)($_SESSION['user_id'] ?? ''), ENT_QUOTES, 'UTF-8'); ?></p>
|
||||
<p>Login : <?php echo htmlspecialchars((string)($_SESSION['user_login'] ?? ''), ENT_QUOTES, 'UTF-8'); ?></p>
|
||||
<p>Nom : <?php echo htmlspecialchars((string)($_SESSION['user_name'] ?? ''), ENT_QUOTES, 'UTF-8'); ?></p>
|
||||
<p>Dernière activité (timestamp) : <?php echo htmlspecialchars((string)time(), ENT_QUOTES, 'UTF-8'); ?></p>
|
||||
<p>Adresse IP : <?php echo htmlspecialchars($_SERVER['REMOTE_ADDR'] ?? '', ENT_QUOTES, 'UTF-8'); ?></p>
|
||||
<form name="menu" class="menu-grid" action="#" method="post" autocomplete="off" novalidate>
|
||||
<button type="button" class="menu-button" data-target="/php/order_gf.php">
|
||||
<div class="menu-button__content">
|
||||
<span class="menu-button__title">Ordre GF</span>
|
||||
<span class="menu-button__text">Envoyer un ordre GF</span>
|
||||
</div>
|
||||
<span class="menu-button__icon">⇄</span>
|
||||
</button>
|
||||
|
||||
<div style="margin-top:16px;">
|
||||
<a class="btn-submit" href="menu.php?action=logout" style="display:inline-block;text-decoration:none;">Se déconnecter</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="menu-button" data-target="/php/order_jfg.php">
|
||||
<div class="menu-button__content">
|
||||
<span class="menu-button__title">Ordre JFG</span>
|
||||
<span class="menu-button__text">Envoyer un ordre JFG</span>
|
||||
</div>
|
||||
<span class="menu-button__icon">↻</span>
|
||||
</button>
|
||||
|
||||
<button type="button" class="menu-button" data-target="/php/account_gf.php">
|
||||
<div class="menu-button__content">
|
||||
<span class="menu-button__title">Compte GF</span>
|
||||
<span class="menu-button__text">Consulter le compte GF</span>
|
||||
</div>
|
||||
<span class="menu-button__icon">💼</span>
|
||||
</button>
|
||||
|
||||
<button type="button" class="menu-button" data-target="/php/account_jfg.php">
|
||||
<div class="menu-button__content">
|
||||
<span class="menu-button__title">Compte JFG</span>
|
||||
<span class="menu-button__text">Consulter le compte JFG</span>
|
||||
</div>
|
||||
<span class="menu-button__icon">📊</span>
|
||||
</button>
|
||||
|
||||
<button type="button" class="menu-button" data-target="/php/actions.php">
|
||||
<div class="menu-button__content">
|
||||
<span class="menu-button__title">Actions</span>
|
||||
<span class="menu-button__text">Voir les actions et transactions</span>
|
||||
</div>
|
||||
<span class="menu-button__icon">⚡</span>
|
||||
</button>
|
||||
|
||||
<button type="button" class="menu-button" data-target="/php/csv.php">
|
||||
<div class="menu-button__content">
|
||||
<span class="menu-button__title">CSV</span>
|
||||
<span class="menu-button__text">Importer / exporter les données</span>
|
||||
</div>
|
||||
<span class="menu-button__icon">📁</span>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<p class="menu-note">Giraud Finance : Accès sécurisé. Veillez à fermer votre session après chaque utilisation.</p>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<script src="/js/menu.js" defer></script>
|
||||
|
||||
<?php require_once __DIR__ . '/footer.php'; ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user