- impressum.php (§ 18 MStV) and datenschutz.php, which describes what the website and the Discord bot actually process: Discord login scopes, member area, bot data (raids, premades, player reports with the automatic 48 h timeout, activity checks), cookies and browser storage keys, retention periods and rights. Both stay reachable in maintenance mode and are noindex. Operator data defaults to the c/o address of the Impressum service Online-Impressum.de (LEGAL_OPERATOR_DEFAULT), the hoster to Living-Bots; both can be changed under Admin -> Impressum & Datenschutz (new permission site.legal, schema v43). The audit/Discord log only records which fields changed, not the name or address. - Links in the footer of all public pages, the start page footer, the sidebar and the maintenance page, plus a short data notice on the login page. - Wiki and profile texts: YouTube, Twitch and Vimeo players and images or video files from other servers render as placeholders and load only after a click (embed_consent_html(), assets/js/embed-consent.js). "immer direkt laden" is remembered per provider in localStorage and can be reset in the privacy policy. Image URLs are now protected from inline formatting (e.g. _underscores_ in the address). - map_frame.php only serves logged-in, active members. - Deleting a user also removes the avatar file; audit_log entries older than 12 months are deleted automatically (AUDIT_LOG_KEEP_MONTHS). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
60 lines
2.1 KiB
PHP
60 lines
2.1 KiB
PHP
<?php
|
|
require_once __DIR__ . '/includes/bootstrap.php';
|
|
|
|
if ($user = current_user()) {
|
|
redirect($user['status'] === 'pending' ? '/pending.php' : '/dashboard.php');
|
|
}
|
|
|
|
$error = null;
|
|
|
|
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|
verify_csrf();
|
|
|
|
$username = trim((string) ($_POST['username'] ?? ''));
|
|
$password = (string) ($_POST['password'] ?? '');
|
|
|
|
if ($username === '' || $password === '') {
|
|
$error = 'Bitte Benutzername und Passwort eingeben.';
|
|
} else {
|
|
$error = attempt_login($username, $password);
|
|
if ($error === '') {
|
|
redirect('/dashboard.php');
|
|
}
|
|
}
|
|
}
|
|
|
|
$pageTitle = 'Login';
|
|
include __DIR__ . '/includes/header.php';
|
|
?>
|
|
<div class="panel panel-narrow login-panel">
|
|
<h1>Login</h1>
|
|
<p class="text-muted">Melde dich mit deinem Discord-Account vom Legions-Server an.</p>
|
|
|
|
<a class="button discord-connect-button login-discord-button" href="/discord_login.php">
|
|
<?= discord_logo(22) ?> Mit Discord einloggen
|
|
</a>
|
|
<p class="login-privacy text-muted">
|
|
Beim Login übernimmt die Website von Discord deine Discord-ID, deinen Namen, dein Profilbild
|
|
und deine Rollen auf unserem Server. Mehr dazu in der <a href="/datenschutz.php#discord-login">Datenschutzerklärung</a>.
|
|
</p>
|
|
|
|
<details class="login-password"<?= $error ? ' open' : '' ?>>
|
|
<summary>Mit Benutzername und Passwort anmelden</summary>
|
|
<?php if ($error): ?>
|
|
<div class="flash flash-error"><?= e($error) ?></div>
|
|
<?php endif; ?>
|
|
<form method="post" action="/login.php">
|
|
<?= csrf_field() ?>
|
|
<div>
|
|
<label for="username">Benutzername</label>
|
|
<input type="text" id="username" name="username" required value="<?= e($_POST['username'] ?? '') ?>">
|
|
</div>
|
|
<div>
|
|
<label for="password">Passwort</label>
|
|
<input type="password" id="password" name="password" required>
|
|
</div>
|
|
<button type="submit" class="button-secondary">Anmelden</button>
|
|
</form>
|
|
</details>
|
|
</div>
|
|
<?php include __DIR__ . '/includes/footer.php'; ?>
|