Project

General

Profile

1 2 Manuela
<?php
2
/**
3
 *
4
 * @category        frontend
5
 * @package         account
6
 * @author          WebsiteBaker Project
7
 * @copyright       Ryan Djurovich
8
 * @copyright       WebsiteBaker Org. e.V.
9
 * @link            http://websitebaker.org/
10
 * @license         http://www.gnu.org/licenses/gpl.html
11
 * @platform        WebsiteBaker 2.8.3
12
 * @requirements    PHP 5.3.6 and higher
13
 * @version         $Id$
14
 * @filesource      $HeadURL$
15
 * @lastmodified    $Date$
16
 *
17
 */
18
19
if( !defined( 'WB_PATH' ) ){ require(dirname(__DIR__).'/config.php'); }
20
21
if(isset($_COOKIE['REMEMBER_KEY'])) {
22
    setcookie('REMEMBER_KEY', '', time()-3600, '/');
23
}
24
$redirect_url = ((isset($_SESSION['HTTP_REFERER']) && $_SESSION['HTTP_REFERER'] != '') ? $_SESSION['HTTP_REFERER'] : WB_URL );
25
$redirect_url = ( isset($redirect) && ($redirect!='') ? $redirect : $redirect_url);
26
$page_id = @$_SESSION['PAGE_ID'] ?: 0;
27
28
$_SESSION['USER_ID'] = null;
29
$_SESSION['GROUP_ID'] = null;
30
$_SESSION['GROUPS_ID'] = null;
31
$_SESSION['USERNAME'] = null;
32
$_SESSION['PAGE_PERMISSIONS'] = null;
33
$_SESSION['SYSTEM_PERMISSIONS'] = null;
34
$_SESSION = array();
35
36
session_unset();
37
unset($_COOKIE[session_name()]);
38
session_destroy();
39
40
if( !FRONTEND_LOGIN && INTRO_PAGE) {
41
    header('Location: '.WB_URL.'/index.php');
42
    exit;
43
} else {
44
    $no_intro = true;
45
    require(WB_PATH.'/index.php');
46
}