mirror of
https://github.com/c0de-archive/GAMA-Site.git
synced 2024-12-22 01:32:40 +00:00
Simple logout script for eventual user system
This commit is contained in:
parent
8b569a1a15
commit
7661b3c133
14
logout.php
Normal file
14
logout.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
if(!isset($_SERVER['HTTP_REFERER']) || $_SERVER['HTTP_REFERER'] == null || $_SERVER['HTTP_REFERER'] == '') $_SERVER['HTTP_REFERER'] = "index.php";
|
||||
|
||||
if(empty($_GET['token']) || $_GET['token'] != $_SESSION['token'])
|
||||
{
|
||||
header("location:".$_SERVER['HTTP_REFERER']);
|
||||
}
|
||||
|
||||
session_unset();
|
||||
session_destroy();
|
||||
header("location:".$_SERVER['HTTP_REFERER']);
|
||||
?>
|
Loading…
Reference in New Issue
Block a user