mirror of
https://github.com/c0de-archive/GAMA-Site.git
synced 2024-11-01 02:27:46 +00:00
14 lines
379 B
PHP
14 lines
379 B
PHP
|
<?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']);
|
||
|
?>
|