X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/0c5eed59b9187f54cedadc383bf2326f5ba354e0..882347cba815e99ba8e7ad28d077420aa986e7c5:/login/index.php diff --git a/login/index.php b/login/index.php index 86af074..9ebc4cb 100644 --- a/login/index.php +++ b/login/index.php @@ -39,18 +39,29 @@ if (empty($User)) { ob_clean(); require_once 'login/form.inc.php'; $Place['warn'] = $message; + $Place['title'] = 'Inloggen'; + if (isset($_REQUEST['goto'])) { + require_once 'nieuws.inc.php'; + $target = ltrim($_REQUEST['goto'], '/'); + $target = new ArchiveArticle("$target.html"); + if ($target->file) { + if ($target->title) { + $Place['title'] .= ' voor ' . $target->title; + } + } + } return TRUE; } -if (isset($_GET['goto'])) { +if (isset($_REQUEST['goto'])) { ob_clean(); - $target = ltrim($_GET['goto'], '/'); + $target = ltrim($_REQUEST['goto'], '/'); header("Location: /$target"); http_response_code(302); exit; } -if (empty($Args) and !empty($User['admin'])) { +if (empty($Args) and $User and $User->admin) { include_once 'login/admin.html'; }