login) { http_response_code(303); $target = urlencode($_SERVER['REQUEST_URI']); header("Location: /login?goto=$target"); exit; } elseif ($User->admin('user') and $username = @$_REQUEST['login']) { try { $user = new User("profile/$username"); } catch (Exception $e) { printf('

%s

', $e->getMessage()); return; } $Article->title = $user->login . ': ' . $Article->title; } else { $user = $User; } $Place['login/name'] = $user->name ?: 'bewoner'; $Place['user'] = $user->login; if ( $password = trim(@file_get_contents("{$user->dir}/.passwd")) ) { if (substr($password, 0, 1) == '$') { $password = NULL; // hashed } $Place['pass'] = htmlspecialchars($password) ?: 'zelf ingesteld'; } else { $Place['pass'] = 'onbekend'; } print ''."\n";