LuminaWebsite/map_frame.php
Maaxxs 62d6634829 Impressum and privacy policy, third-party videos and images load only after a click
- 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>
2026-09-24 16:26:54 +02:00

38 lines
1.6 KiB
PHP

<?php
/**
* Liefert den Karten-Viewer (assets/map/index.html) mit Versionskennung an Skripten und Stylesheet
* aus. Sonst behalten Browser nach einem Update die alten Dateien im Zwischenspeicher, und neue
* Funktionen (z.B. Orte teilen/auswaehlen) fehlen, bis jemand den Cache leert.
* Der Ordner assets/map/ darf selbst kein PHP ausfuehren (siehe .htaccess dort) - deshalb hier.
* Die Parameter (?karte=...&x=...&pick=1) liest der Viewer selbst aus der Adresse.
*/
declare(strict_types=1);
require_once __DIR__ . '/includes/bootstrap.php';
// Nur fuer freigeschaltete Mitglieder - Kacheln und Marker stammen von interactivemap.app und sind
// nicht fuer die Oeffentlichkeit gedacht (Karte auf map.php, Ortsauswahl im Kalender).
$frameUser = current_user();
if (!$frameUser || $frameUser['status'] !== 'active') {
show_not_found();
}
$dir = __DIR__ . '/assets/map/';
$html = (string) file_get_contents($dir . 'index.html');
// Relative Pfade (styles.css, js/..., data/...) weiter auf assets/map/ beziehen
$html = str_replace('<head>', "<head>\n <base href=\"/assets/map/\">", $html);
// Versionskennung = Aenderungsdatum der Datei
$html = (string) preg_replace_callback(
'~(<script src="|<link rel="stylesheet" href=")([^"?]+\.(?:js|css))"~',
static function (array $m) use ($dir): string {
$file = $dir . $m[2];
return $m[1] . $m[2] . (is_file($file) ? '?v=' . filemtime($file) : '') . '"';
},
$html
);
header('Content-Type: text/html; charset=UTF-8');
// Die Seite selbst nicht zwischenspeichern - sie ist klein und traegt die Versionen
header('Cache-Control: no-cache');
echo $html;