une session admin expire après 24h

This commit is contained in:
Esenjin 2025-01-06 20:27:50 +01:00
parent 386792b5f6
commit 831a2ec875

View File

@ -1,6 +1,13 @@
<?php
require_once 'fonctions.php';
session_start();
$timeout = 86400;
if (isset($_SESSION['last_activity']) && time() - $_SESSION['last_activity'] > $timeout) {
session_destroy();
header('Location: admin.php?action=login');
exit;
}
$_SESSION['last_activity'] = time();
// Vérifier si un utilisateur est connecté
function checkAuth() {