From 7e93f950eb21b5ba7ed073d81b5fa6e4f2cfe892 Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Sun, 21 Sep 2014 12:42:46 +0100 Subject: Add a sign out function --- index.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index b8eadfc..acd7de7 100644 --- a/index.php +++ b/index.php @@ -1,6 +1,16 @@ Sign out'; + +if (isset($_GET['signout'])) { + if (isset($_COOKIE['password'])) { + unset($_COOKIE['password']); + setcookie('password', null, -1, '/', $_SERVER['SERVER_NAME']); + header('Location: ' . $url); + } +} + if ($_POST && $pass) { if ((hash("sha256", $_POST['password']) == $pass)) { if (isset($_POST['rememberme'])) { @@ -40,6 +50,8 @@ if ($_POST && $pass) { -
Icon  Name                    Last modified      Size
+
Icon  Name                    Last modified      Size        
 
23) { -- cgit v1.2.3