diff options
Diffstat (limited to 'www/login.php')
| -rw-r--r-- | www/login.php | 13 |
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'> |
