X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/cfc77b27b98cdf180110d772f39c211b0d973002..8302e2ddeac5e241ad3f8bfaea0dbdfd069f26ef:/login.php diff --git a/login.php b/login.php index 6781211..bcc2856 100644 --- a/login.php +++ b/login.php @@ -1,11 +1,42 @@ $message]; + print getoutput($part); + return TRUE; +} + +if (isset($_GET['goto'])) { + ob_clean(); + $target = ltrim($_GET['goto'], '/'); + header("Location: /$target"); + http_response_code(302); exit; } -http_response_code(307); -header('Location: /'); +$part = [ + 'user' => $User['name'], +]; +print getoutput($part); +if (empty($Args) and !empty($User['admin'])) { + include_once 'admin/index.html'; + include_once 'admin.php'; +}