summaryrefslogtreecommitdiff
path: root/account/signout.php
diff options
context:
space:
mode:
Diffstat (limited to 'account/signout.php')
-rw-r--r--account/signout.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/account/signout.php b/account/signout.php
new file mode 100644
index 0000000..f971d4a
--- /dev/null
+++ b/account/signout.php
@@ -0,0 +1,16 @@
+<?php
+include_once $_SERVER["DOCUMENT_ROOT"] . '/../src/accounts.php';
+include_once $_SERVER["DOCUMENT_ROOT"] . '/../src/alert.php';
+
+if (!isset($_GET["local"])) {
+ header("Location: /");
+ exit;
+}
+
+session_start();
+
+setcookie("secret_key", "", time() - 1000, "/");
+session_unset();
+session_destroy();
+
+generate_alert("/", "Signed out!", 200); \ No newline at end of file