Location: PHPKode > projects > Gnew > Gnew-2013.1/users/logout.php
<?php
// -----------------------------------------------------------------------------
// $Id: logout.php 573 2013-03-12 08:05:00Z raoul $
//
// Copyright (C) 2013 Raoul Proença
// License: GNU GPL version 3 (see copying.txt file)
// Website: http://www.gnew.fr/
// -----------------------------------------------------------------------------
// 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 3 of the License, or (at your option) any later
// version.
//
// 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, see <http://www.gnu.org/licenses/>.
// -----------------------------------------------------------------------------

include('./../includes/common.php');

page_header($lang['USERS_LOGOUT']);

// User logged?
if ($_SESSION['user_id'] > 0)
{
    session_destroy();
    success_template($lang['USER_OFFLINE'], './../index.php');
}
else
{
    error_template($lang['ERROR_SESSION_DESTRUCTION']);
}

page_footer();

?>
Return current item: Gnew