Initial commit.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?
|
||||
require_once("../session.lib.php");
|
||||
if (isset($_SESSION['editor'])) {
|
||||
if (isset($_COOKIE[session_name()])) {
|
||||
setcookie(session_name(), '', time()-42000, '/');
|
||||
}
|
||||
session_destroy();
|
||||
}
|
||||
delete_persistent_login();
|
||||
if (isset($_SESSION['referrer'])) {
|
||||
$url = $_SERVER['HTTPS'] ? "https://" : "http://";
|
||||
$url .= $_SERVER['HTTP_HOST'];
|
||||
$url .= $_SESSION['referrer'];
|
||||
unset($_SESSION['referrer']);
|
||||
if (preg_match("/logout(\.php)?$/i", $url)) {
|
||||
$url = "/";
|
||||
}
|
||||
header("Location: $url");
|
||||
return;
|
||||
} else {
|
||||
header("Location: /");
|
||||
return;
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user