X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/09d27318fca191b0ac6a1b0866395065f609b7e3..62c99bb3ff5dee600a20fe6749f28c45b6cce7fd:/login.php diff --git a/login.php b/login.php index db276d1..9c5f06e 100644 --- a/login.php +++ b/login.php @@ -1,29 +1,34 @@ -

Inloggen

+$message = NULL; -Ongeldige gebruikersnaam of wachtwoord.

'."\n\n"; } -elseif (!empty($User)) { +elseif (isset($_GET['logout'])) { setcookie('login', '', time(), '/'); # expire immediately - echo '

Uitgelogd.

'."\n\n"; + $User = NULL; + $message = 'Uitgelogd.'; } +if (empty($User)) { + ob_clean(); + require_once 'login.inc.php'; + return TRUE; +} + +if (isset($_GET['goto'])) { + ob_clean(); + $target = ltrim($_GET['goto'], '/'); + header("Location: /$target"); + http_response_code(302); + exit; +} ?> -
- - - -
+

Ingelogd als .

+ +