summaryrefslogtreecommitdiff
path: root/www/login.php
diff options
context:
space:
mode:
authorroot2014-02-18 00:14:54 +0100
committerroot2014-02-18 00:14:54 +0100
commitf0173a728245241b083a823de026c3b9587d5098 (patch)
tree3806c48491bde853df214d88d0ec429df59a37c2 /www/login.php
parentd955e7b3df670ec8d849b2301e217c963503462e (diff)
downloadfiles.iamfabulous.de-f0173a728245241b083a823de026c3b9587d5098.tar.gz
logout
Diffstat (limited to 'www/login.php')
-rw-r--r--www/login.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/www/login.php b/www/login.php
index c1d3207..e9c7c93 100644
--- a/www/login.php
+++ b/www/login.php
@@ -48,9 +48,22 @@ if($_SERVER['REQUEST_METHOD'] == 'POST') {
/*Prints the GET version*/
+ foreach ($_GET as $argument => $value) {
+ if(preg_match("/logout/",$argument)){
+ session_destroy();
+ header("Refresh: 0; /login?success");
+ exit;
+ } else {
+ if(preg_match("/success/",$argument))
+ $logout="Successfull loged out!";
+ }
+ }
+
if($_SESSION["login"]){
header("Refresh: 0; /");
} else {
+ echo $logout;
+
echo "<form method='post' action='/login.php'>
<p>Name: <input type='text' name='username'></p>
<p>Password: <input type='password' name='password'>