20 lines
868 B
PHP
20 lines
868 B
PHP
<?php
|
|
error_reporting(E_ALL ^E_NOTICE);
|
|
$basepath='';
|
|
require_once 'core/init_core.inc.php';
|
|
$plugin->run_hook('logout_begin');
|
|
$session->page_begin('Logout', TRUE);
|
|
if($_GET['sid'] === $session->sid){
|
|
$ldata=array('domain'=>$config['domain'],'uid'=>$session->uid);
|
|
$plugin->run_hook('logout_end',array($ldata));
|
|
$session->destroy_session($session->sid);
|
|
$session->setcookie($config['cookiename'] . '_base', 0, time()-3600, $config['path'],$config['domain']);
|
|
if(isset($_GET['url']) && $_GET['url']!==''){
|
|
$core->message($lang->_('LOGGEDOUT'),$lang->_('SUCCSESSFULLYLOGGEDOUT'),TRUE,$_GET['url'],3,FALSE,FALSE);
|
|
}else{
|
|
$core->message($lang->_('LOGGEDOUT'),$lang->_('SUCCSESSFULLYLOGGEDOUT'),TRUE,$config['path'].'/index.php',3,FALSE,FALSE);
|
|
}
|
|
}else{
|
|
$core->message($lang->_('ERROR'),$lang->_('LOGOUTFAIL'),FALSE,$config['path'].'/index.php');
|
|
}
|
|
?>
|