00001 <?php
00002 # This file is part of the Savane project
00003 # <http://gna.org/projects/savane/>
00004 #
00005 # $Id: logout.php 5450 2006-02-19 18:00:27Z yeupou $
00006 #
00007 # Copyright 1999-2000 (c) The SourceForge Crew
00008 # Copyright 2000-2002 (c) Free Software Foundation
00009 #
00010 # Copyright 2004-2006 (c) Mathieu Roy <yeupou--gnu.org>
00011 #
00012 # The Savane project is free software; you can redistribute it and/or
00013 # modify it under the terms of the GNU General Public License
00014 # as published by the Free Software Foundation; either version 2
00015 # of the License, or (at your option) any later version.
00016 #
00017 # The Savane project is distributed in the hope that it will be useful,
00018 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00020 # GNU General Public License for more details.
00021 #
00022 # You should have received a copy of the GNU General Public License
00023 # along with the Savane project; if not, write to the Free Software
00024 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00025
00026
00027 require "../include/pre.php";
00028
00029 register_globals_off();
00030
00031 if (user_isloggedin())
00032 {
00033 # If the session was validated, we can assume that the cookie session_hash
00034 # is reliable
00035 db_query("DELETE FROM session WHERE session_hash='".sane_cookie("session_hash")."'");
00036 session_cookie('session_hash','');
00037 session_cookie('session_uid','');
00038 }
00039
00040 session_redirect($GLOBALS['sys_home']);
00041
00042 ?>
00043