mirror of
https://github.com/Supernova3339/anonupload.git
synced 2026-01-12 18:32:06 +01:00
12 lines
247 B
PHP
12 lines
247 B
PHP
|
|
<?php
|
||
|
|
// (A) START SESSION
|
||
|
|
session_start();
|
||
|
|
|
||
|
|
// (B) LOGOUT REQUEST
|
||
|
|
if (isset($_POST["logout"])) { unset($_SESSION["user"]); }
|
||
|
|
|
||
|
|
// (C) REDIRECT TO LOGIN PAGE IF NOT LOGGED IN
|
||
|
|
if (!isset($_SESSION["user"])) {
|
||
|
|
header("Location: ../");
|
||
|
|
exit();
|
||
|
|
}
|