This repository has been archived on 2023-05-26. You can view files and clone it, but cannot push or open issues or pull requests.
web/deconnexion.php

39 lines
959 B
PHP
Executable File

<?php include "inc/debut.php";
head("deconnexion.php"); ?>
<?php session_destroy();
if (isset($_GET['depuis'])) { ?>
<div>
<h1>
Vous avez été déconnecté·e
</h1>
<h2>
Votre session PHP a été effacée avec l'instruction <code>session_destroy()</code>.
</h2>
Vous allez être redirigé·e vers la page d'où vous venez.
<script type="text/javascript">
setTimeout("document.location.href='<?php echo htmlspecialchars($_GET['depuis']); ?>'", 0);
</script>
</div>
<?php } else { ?>
<div>
<h1>
Vous avez été déconnecté·e
</h1>
<h2>
Votre session PHP a été effacée avec l'instruction <code>session_destroy()</code>.
</h2>
Vous allez être redirigé·e vers la page d'accueil.
<script type="text/javascript">
setTimeout("document.location.href='index.php'", 0);
</script>
</div>
<?php }
include "inc/footer.php"; ?>