noalyss Version-9
logout.php
Go to the documentation of this file.
1<?php
2/*
3 * This file is part of NOALYSS.
4 *
5 * NOALYSS is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * NOALYSS is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with NOALYSS; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18*/
19// Copyright Author Dany De Bontridder danydb@aevalys.eu
20/*! \file
21 * \brief Logout
22 */
23require_once '../include/constant.php';
24require_once ("lib/ac_common.php");
25require_once('class/database.class.php');
26
27html_page_start("classic");
28
29/* clean Global variable */
30if(DEBUGNOALYSS>1) {
31 echo h1(_("try to clean session"));
32 var_dump($_SESSION);
33}
34Noalyss_user::clean_session();
35//
36// Clean the possible cookies
37//
38if (isset($_SERVER['HTTP_COOKIE'])) {
39 $cookies = explode(';', $_SERVER['HTTP_COOKIE']);
40 foreach($cookies as $cookie) {
41 $parts = explode('=', $cookie);
42 $name = trim($parts[0]);
43 @setcookie($name, '', time()-1000);
44 @setcookie($name, '', time()-1000, '/');
45 }
46}
47echo '<h2 class="info">'._('Vous êtes déconnecté').'</h2>';
48
49if(DEBUGNOALYSS>1) {
50 echo h1(_("Session after cleansing"));
51 var_dump($_SESSION);
52
53} else {
54 echo '<META HTTP-EQUIV="REFRESH" content="0;url=index.html">';
55}
57?>
html_page_stop()
end tag
Definition: ac_common.php:468
html_page_start($p_theme="", $p_script="", $p_script2="")
Default page header for each page.
Definition: ac_common.php:275
h1($p_string, $p_class="")
Definition: ac_common.php:72