summaryrefslogtreecommitdiff
path: root/final/app/deco.php
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2018-07-05 00:25:51 +0200
committerLudovic Pouzenc <ludovic@pouzenc.fr>2018-07-05 00:25:51 +0200
commitac54f5224d4470de9d8ae088e1338dea52668c9d (patch)
tree7f77b2a8176343e6632fbd99ff431c21974ef482 /final/app/deco.php
parent9738017972a6d4fea655926525b3c67dd85740cf (diff)
download2007-AWOR-ac54f5224d4470de9d8ae088e1338dea52668c9d.tar.gz
2007-AWOR-ac54f5224d4470de9d8ae088e1338dea52668c9d.tar.bz2
2007-AWOR-ac54f5224d4470de9d8ae088e1338dea52668c9d.zip
Renommage beta_accents -> final pour diffs
Diffstat (limited to 'final/app/deco.php')
-rw-r--r--final/app/deco.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/final/app/deco.php b/final/app/deco.php
new file mode 100644
index 0000000..d91cabc
--- /dev/null
+++ b/final/app/deco.php
@@ -0,0 +1,36 @@
+<?php
+session_start();
+
+// Si vous voulez d&eacute;truire compl&egrave;tement la session, effacez &eacute;galement le cookie de session.
+// Note : cela d&eacute;truira la session et pas seulement les donn&eacute;es de session !
+if (isset($_COOKIE[session_name()])) {
+setcookie(session_name(), '', time()-42000, '/');
+}
+
+require_once('include/ludo/html_elements.inc.php');
+generate_html_doctype_and_head("D&eacute;connexion");
+?>
+<body>
+ <h1>Deconnexion</h1>
+ <div>
+ <?php
+ if ( isset($_SESSION['session_loginP']) )
+ {
+ // D&eacute;truit toutes les variables de session
+ $_SESSION = array();
+
+ // On a d&eacute;j&agrave; d&eacute;truit le cookie qui permet la r&eacute;-emission par le client du sessionid
+
+ // Finalement, on d&eacute;truit la session.
+ session_destroy();
+ echo 'Vous avez bien &eacute;t&eacute; d&eacute;connect&eacute;' . "\n";
+ }
+ else
+ {
+ echo 'Deconnexion impossible : aucune session en cours' . "\n";
+ }
+ ?>
+ </div>
+<?php generate_html_div_back(); ?>
+</body>
+</html> \ No newline at end of file