-?>
-<form action="" method="post">
- <input id="login" name="login" placeholder="Huisnummer" />
- <input id="pass" name="pass" type="password" value="" placeholder="Wachtwoord" />
- <input type="submit" value="Log in" />
-</form>
+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;
+}
+
+$part = [
+ 'user' => $User['name'],
+];
+print getoutput($part);
+
+if (empty($Args) and !empty($User['admin'])) {
+ include_once 'admin/index.html';
+ include_once 'admin.php';
+}