4 if (isset($_POST['login'])) {
5 if ($User = login($_POST['login'], $_POST['pass'])) {
9 $message = 'Ongeldige gebruikersnaam of wachtwoord.';
12 elseif (isset($_GET['logout'])) {
13 setcookie('login', '', time(), '/'); # expire immediately
15 $message = 'Uitgelogd.';
20 require_once 'login.inc.php';
24 if (isset($_GET['goto'])) {
26 $target = ltrim($_GET['goto'], '/');
27 header("Location: /$target");
28 http_response_code(302);
33 'user' => $User['name'],
35 print getoutput($part);
37 if (!empty($User['admin'])) {
38 include_once 'admin/index.html';
39 include_once 'admin.php';