Revision 1473
Added by Luisehahne over 14 years ago
| logout.php | ||
|---|---|---|
| 1 |
<?php |
|
| 2 |
/** |
|
| 3 |
* |
|
| 4 |
* @category frontend |
|
| 5 |
* @package account |
|
| 6 |
* @author WebsiteBaker Project |
|
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
| 9 |
* @link http://www.websitebaker2.org/ |
|
| 10 |
* @license http://www.gnu.org/licenses/gpl.html |
|
| 11 |
* @platform WebsiteBaker 2.8.x |
|
| 12 |
* @requirements PHP 5.2.2 and higher |
|
| 13 |
* @version $Id$ |
|
| 14 |
* @filesource $HeadURL$ |
|
| 15 |
* @lastmodified $Date$ |
|
| 16 |
* |
|
| 17 |
*/ |
|
| 18 |
|
|
| 19 |
require("../config.php");
|
|
| 20 |
|
|
| 21 |
if(isset($_COOKIE['REMEMBER_KEY'])) {
|
|
| 22 |
setcookie('REMEMBER_KEY', '', time()-3600, '/');
|
|
| 23 |
} |
|
| 24 |
|
|
| 25 |
$_SESSION['USER_ID'] = null; |
|
| 26 |
$_SESSION['GROUP_ID'] = null; |
|
| 27 |
$_SESSION['GROUPS_ID'] = null; |
|
| 28 |
$_SESSION['USERNAME'] = null; |
|
| 29 |
$_SESSION['PAGE_PERMISSIONS'] = null; |
|
| 30 |
$_SESSION['SYSTEM_PERMISSIONS'] = null; |
|
| 31 |
$_SESSION = array(); |
|
| 32 |
session_unset(); |
|
| 33 |
unset($_COOKIE[session_name()]); |
|
| 34 |
session_destroy(); |
|
| 35 |
|
|
| 36 |
if(INTRO_PAGE) {
|
|
| 37 |
header('Location: '.WB_URL.PAGES_DIRECTORY.'/index.php');
|
|
| 38 |
} else {
|
|
| 39 |
header('Location: '.WB_URL.'/index.php');
|
|
| 40 |
} |
|
| 41 |
|
|
| 42 |
?> |
|
| 1 |
<?php |
|
| 2 |
/** |
|
| 3 |
* |
|
| 4 |
* @category frontend |
|
| 5 |
* @package account |
|
| 6 |
* @author WebsiteBaker Project |
|
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
| 9 |
* @link http://www.websitebaker2.org/ |
|
| 10 |
* @license http://www.gnu.org/licenses/gpl.html |
|
| 11 |
* @platform WebsiteBaker 2.8.x |
|
| 12 |
* @requirements PHP 5.2.2 and higher |
|
| 13 |
* @version $Id$ |
|
| 14 |
* @filesource $HeadURL$ |
|
| 15 |
* @lastmodified $Date$ |
|
| 16 |
* |
|
| 17 |
*/ |
|
| 18 |
|
|
| 19 |
require("../config.php");
|
|
| 20 |
|
|
| 21 |
if(isset($_COOKIE['REMEMBER_KEY'])) {
|
|
| 22 |
setcookie('REMEMBER_KEY', '', time()-3600, '/');
|
|
| 23 |
} |
|
| 24 |
|
|
| 25 |
$redirect = (isset($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : WB_URL.'/index.php'; |
|
| 26 |
|
|
| 27 |
$_SESSION['USER_ID'] = null; |
|
| 28 |
$_SESSION['GROUP_ID'] = null; |
|
| 29 |
$_SESSION['GROUPS_ID'] = null; |
|
| 30 |
$_SESSION['USERNAME'] = null; |
|
| 31 |
$_SESSION['PAGE_PERMISSIONS'] = null; |
|
| 32 |
$_SESSION['SYSTEM_PERMISSIONS'] = null; |
|
| 33 |
$_SESSION = array(); |
|
| 34 |
session_unset(); |
|
| 35 |
unset($_COOKIE[session_name()]); |
|
| 36 |
session_destroy(); |
|
| 37 |
|
|
| 38 |
if(INTRO_PAGE) {
|
|
| 39 |
header('Location: '.WB_URL.PAGES_DIRECTORY.'/index.php');
|
|
| 40 |
} else {
|
|
| 41 |
header('Location: '.$redirect);
|
|
| 42 |
} |
|
| 43 |
|
|
Also available in: Unified diff
found more backlinks to fix
remove not working ftan in frontend
fixed redirect in login procedure (Tks to mr-fan)
update droplet LoginBox, additional parameter $redirect
remove double config call in media (Tks to Testör)