X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/8f0144192a6b624de74bb73e1a73cc16bd4b09e1..621fc2f9638a1a92aa8535310e7852de5542f11e:/login/index.php diff --git a/login/index.php b/login/index.php index d2f22ac..6783a47 100644 --- a/login/index.php +++ b/login/index.php @@ -35,18 +35,34 @@ 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'])) { $target = ltrim($_REQUEST['goto'], '/'); $target = new ArchiveArticle("$target.html"); + + if ($Page = $target->handler and $target->handler == 'melding') { + $caller = $Article; + $Article = $target; + $Args = $target->path; + ob_start(); + include "./{$target->handler}/index.php"; + ob_end_clean(); + $Article = $caller; + } + 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'])) { @@ -59,7 +75,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'; }