X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/0080b6c4c668dd3cc4e309afe4ab33c62393d8c2..a5cbc9ddb6ad65b17f83d2931e3318d94e498a0e:/login/index.php diff --git a/login/index.php b/login/index.php index 0ac33ac..897346d 100644 --- a/login/index.php +++ b/login/index.php @@ -35,9 +35,10 @@ elseif (isset($_GET['logout'])) { $message = "Je bent uitgelogd. Graag tot ziens!"; } -if (empty($User)) { +if (!$User or !$User->login) { $Article->title = 'Inloggen'; if (isset($_REQUEST['goto'])) { + if (empty($message)) http_response_code(403); $target = ltrim($_REQUEST['goto'], '/'); $target = new ArchiveArticle("$target.html"); @@ -54,10 +55,15 @@ if (empty($User)) { if ($target->title) { $Article->title .= ' voor ' . $target->title; } + if ($target->image) { + $Article->image = $target->image; + } } + ob_start(); require_once 'login/form.inc.php'; + $Article->raw = ob_get_clean(); $Place['warn'] = $message; - return; + return TRUE; } if (isset($_REQUEST['goto'])) { @@ -70,7 +76,7 @@ if (isset($_REQUEST['goto'])) { if (isset($Article->raw)) { print $Article->raw; } -if (empty($Args) and $User and $User->admin) { +if (empty($Args) and $User->admin) { include_once 'login/admin.html'; }