Contributions by Keith Gable This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. In addition to being restricted by the GNU General Public License, Essence Engine may not be sold, rented, sublicensed, or leased; you are not permitted to generate revenue with the Essence Engine source code. You may, however, use Essence Engine to run a website that generates revenue via other means. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA $Id$ */ // Logout processor // Logs out the user session_start(); setcookie("er41loggedin","",0); session_destroy(); session_start(); if ($_GET["disabled"]) $_SESSION["sysmsgs"][] = "Your account has been disabled. Please contact an Administrator for more information."; else $_SESSION["sysmsgs"][] = "You are now logged out."; // Redirect back to page the user logged out from if possible if ($_SERVER["HTTP_REFERER"]) header("Location: " . $_SERVER["HTTP_REFERER"]); else { $dirname = dirname($_SERVER['PHP_SELF']); if ($dirname == "/") header("Location: http://" . $_SERVER['HTTP_HOST'] . "/index.php"); else header("Location: http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/index.php"); } ?>