summaryrefslogtreecommitdiffstats
path: root/include/logout.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/logout.php')
-rw-r--r--include/logout.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/logout.php b/include/logout.php
new file mode 100644
index 0000000..d74f091
--- /dev/null
+++ b/include/logout.php
@@ -0,0 +1,15 @@
+<?php
+/* make sure that we are not called from outside the scripts,
+ * use a variable defined in config.php to check this
+ */
+if(!isset($HOST))
+ exit;
+
+/* distroy the session */
+session_unset();
+session_destroy();
+$_SESSION = array();
+
+echo "<div class=\"message\"><span class=\"bigger\">You are now logged out!</span><br />\n".
+"(<a href=\"$INDEX\">This will take you back to the home-page</a>)</div>";
+?> \ No newline at end of file