diff --git a/assets/css/style.css b/assets/css/style.css
index a4361bd..6d8438e 100644
--- a/assets/css/style.css
+++ b/assets/css/style.css
@@ -9161,3 +9161,79 @@ a.members-chip, a.members-chip:hover { text-decoration: none; }
.role-preview-bar .inline-form { flex-shrink: 0; }
.role-preview-picker { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin: 0.75rem 0 1rem; }
.role-preview-picker label { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; }
+
+/* ---- Checkliste (checklist.php, Karte im Dashboard) ---- */
+.checklist-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
+.checklist-head h1 { margin: 0 0 0.25rem; }
+.checklist-head p { margin: 0; }
+.checklist-head-actions { display: inline-flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
+.checklist-open-toggle.is-active { background: var(--gold); border-color: var(--gold); color: #1a1a1a; }
+.checklist-dashboard .raid-header { margin-bottom: 1rem; }
+
+.checklist-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
+.checklist-char { background: var(--bg-panel-alt); border: 1px solid var(--border); border-top: 3px solid var(--text-muted); border-radius: 10px; padding: 0.7rem 0.9rem; }
+.checklist-char-main { border-top-color: var(--gold); }
+.checklist-char.is-full { border-color: rgba(76, 175, 80, 0.6); border-top-color: var(--success); background: rgba(76, 175, 80, 0.08); }
+.checklist-char-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
+.checklist-char-head strong { display: inline-flex; align-items: center; gap: 0.35rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+.checklist-role { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
+.checklist-char-main .checklist-role { color: var(--gold); }
+.checklist-bar-label { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); margin-top: 0.45rem; }
+.checklist-bar-label span { color: var(--text); font-weight: 600; }
+.checklist-bar { height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; margin-top: 0.2rem; }
+.checklist-bar i { display: block; height: 100%; background: var(--gold); border-radius: 3px; transition: width 0.2s; }
+.checklist-bar.is-full i { background: var(--success); }
+.checklist-class-icon { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; vertical-align: middle; }
+
+.checklist-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1rem; align-items: start; }
+/* Aufladung: unter beiden Tabellen, Eintraege nebeneinander */
+.checklist-card-info { grid-column: 1 / -1; }
+.checklist-info-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0 1.25rem; }
+@media (max-width: 1000px) { .checklist-columns { grid-template-columns: minmax(0, 1fr); } }
+.checklist-card { background: var(--bg-panel-alt); border: 1px solid var(--border); border-radius: 10px; padding: 0.9rem 1rem; }
+.checklist-card-head { display: flex; justify-content: space-between; align-items: center; }
+.checklist-card-head h3 { margin: 0; }
+.checklist-pill { background: var(--bg); color: var(--gold); font-weight: 700; font-size: 0.8rem; padding: 0.15rem 0.7rem; border-radius: 99px; }
+.checklist-reset { color: var(--text-muted); font-size: 0.82rem; margin: 0.2rem 0 0.6rem; }
+.checklist-reset.is-urgent { color: #e2937a; font-weight: 600; }
+
+.checklist-table { overflow-x: auto; }
+.checklist-row { display: grid; grid-template-columns: minmax(130px, 1fr) repeat(var(--checklist-cols), minmax(44px, 72px)); align-items: center; gap: 0.25rem; padding: 0.55rem 0.25rem; border-bottom: 1px solid var(--border); }
+.checklist-table .checklist-row:nth-last-child(2) { border-bottom: 0; }
+.checklist-row > :not(:first-child) { justify-self: center; }
+.checklist-row:not(.checklist-row-head):hover { background: rgba(255, 255, 255, 0.03); }
+.checklist-row-head { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; padding-top: 0.2rem; }
+.checklist-row-head span:not(:first-child) { display: inline-flex; align-items: center; justify-content: center; gap: 0.2rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-bottom: 0.15rem; box-shadow: inset 0 -2px 0 var(--border); }
+.checklist-row-head .checklist-col-main { color: var(--gold); box-shadow: inset 0 -2px 0 var(--gold); }
+.checklist-row-head .checklist-class-icon { width: 14px; height: 14px; }
+.checklist-task { min-width: 0; }
+.checklist-amt { display: inline-block; min-width: 2.4em; color: var(--gold); font-weight: 700; }
+.checklist-dash { color: var(--text-muted); }
+.checklist-row.is-done .checklist-task { color: var(--text-muted); text-decoration: line-through; }
+.checklist-row.is-done .checklist-amt { opacity: 0.6; }
+.checklist-check { appearance: none; width: 24px; height: 24px; margin: 0; border-radius: 6px; background: var(--bg); border: 1.5px solid #555c68; cursor: pointer; display: grid; place-items: center; }
+.checklist-check:hover { border-color: var(--gold); }
+.checklist-check:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
+.checklist-check:checked { background: var(--gold); border-color: var(--gold); }
+.checklist-check:checked::after { content: "✓"; color: #1a1a1a; font-weight: 800; font-size: 0.9rem; line-height: 1; }
+.checklist-check:disabled { opacity: 0.6; cursor: progress; }
+.checklist-empty { display: none; color: var(--text-muted); padding: 0.6rem 0.25rem; }
+.is-open-only .checklist-row.is-done { display: none; }
+.is-open-only .checklist-table.is-all-done .checklist-empty { display: block; }
+.is-open-only .checklist-table.is-all-done .checklist-row-head { display: none; }
+
+.checklist-info { padding: 0.6rem 0; border-top: 1px solid var(--border); }
+.checklist-info strong { color: var(--gold); margin-left: 0.25rem; font-weight: 600; }
+.checklist-info-who { display: table; margin-top: 0.3rem; font-size: 0.75rem; color: var(--text-muted); background: var(--bg); border-radius: 99px; padding: 0.05rem 0.6rem; }
+
+.checklist-settings { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.6rem 1rem; }
+.checklist-setting { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; background: var(--bg-panel-alt); border: 1px solid var(--border); border-radius: 10px; padding: 0.5rem 0.75rem; }
+.checklist-setting label { display: inline-flex; align-items: center; gap: 0.35rem; margin: 0; min-width: 0; }
+.checklist-setting select { width: auto; margin: 0; }
+
+@media (max-width: 600px) {
+ .checklist-row { grid-template-columns: minmax(105px, 1fr) repeat(var(--checklist-cols), minmax(40px, 58px)); }
+ .checklist-check { width: 28px; height: 28px; }
+ .checklist-card { padding: 0.75rem 0.6rem; }
+}
+@media (prefers-reduced-motion: reduce) { .checklist-bar i { transition: none; } }
diff --git a/assets/js/checklist.js b/assets/js/checklist.js
new file mode 100644
index 0000000..fd78a04
--- /dev/null
+++ b/assets/js/checklist.js
@@ -0,0 +1,162 @@
+// Checkliste (checklist.php, Karte im Dashboard): Haken sofort speichern, Zaehler und Balken
+// nachziehen, Reset-Countdown und der Filter "Nur offene" (Browserspeicher lumina-checklist-open).
+(function () {
+ 'use strict';
+
+ var root = document.querySelector('[data-checklist]');
+ if (!root) {
+ return;
+ }
+ var tokenMeta = document.querySelector('meta[name="csrf-token"]');
+ var OPEN_KEY = 'lumina-checklist-open';
+ // Uhrzeit des Servers - eine falsch gehende Uhr im Browser soll den Countdown nicht verschieben
+ var clockOffset = root.dataset.checklistNow ? Number(root.dataset.checklistNow) - Date.now() / 1000 : 0;
+
+ function checks(selector) {
+ return Array.prototype.slice.call(root.querySelectorAll('.checklist-check' + (selector || '')));
+ }
+
+ // Zaehler, Balken und erledigte Zeilen aus den Haken neu berechnen
+ function refresh() {
+ var counts = {};
+ var pills = {};
+ checks().forEach(function (box) {
+ var key = box.dataset.kind + '|' + box.dataset.char;
+ counts[key] = counts[key] || { done: 0, total: 0 };
+ pills[box.dataset.kind] = pills[box.dataset.kind] || { done: 0, total: 0 };
+ counts[key].total++;
+ pills[box.dataset.kind].total++;
+ if (box.checked) {
+ counts[key].done++;
+ pills[box.dataset.kind].done++;
+ }
+ });
+ Object.keys(counts).forEach(function (key) {
+ var c = counts[key];
+ var label = root.querySelector('[data-checklist-count="' + key + '"]');
+ var bar = root.querySelector('[data-checklist-bar="' + key + '"]');
+ if (label) {
+ label.textContent = c.done + '/' + c.total;
+ }
+ if (bar) {
+ bar.firstElementChild.style.width = (c.total ? c.done / c.total * 100 : 0) + '%';
+ bar.classList.toggle('is-full', c.done === c.total);
+ }
+ });
+ Array.prototype.forEach.call(root.querySelectorAll('[data-checklist-char]'), function (card) {
+ var id = card.dataset.checklistChar;
+ var full = ['daily', 'weekly'].every(function (kind) {
+ var c = counts[kind + '|' + id];
+ return !c || c.done === c.total;
+ });
+ card.classList.toggle('is-full', full);
+ });
+ Object.keys(pills).forEach(function (kind) {
+ var pill = root.querySelector('[data-checklist-pill="' + kind + '"]');
+ if (pill) {
+ pill.textContent = pills[kind].done + '/' + pills[kind].total;
+ }
+ });
+ Array.prototype.forEach.call(root.querySelectorAll('.checklist-row:not(.checklist-row-head)'), function (row) {
+ var boxes = row.querySelectorAll('.checklist-check');
+ var done = Array.prototype.every.call(boxes, function (b) { return b.checked; });
+ row.classList.toggle('is-done', done);
+ });
+ Array.prototype.forEach.call(root.querySelectorAll('.checklist-table'), function (table) {
+ table.classList.toggle('is-all-done', !table.querySelector('.checklist-row:not(.checklist-row-head):not(.is-done)'));
+ });
+ }
+
+ root.addEventListener('change', function (event) {
+ var box = event.target;
+ if (!box.classList || !box.classList.contains('checklist-check')) {
+ return;
+ }
+ refresh();
+ box.disabled = true;
+ fetch('/checklist_action.php', {
+ method: 'POST',
+ headers: { 'Content-Type': 'application/json' },
+ credentials: 'same-origin',
+ body: JSON.stringify({
+ csrf_token: tokenMeta ? tokenMeta.content : '',
+ character_id: Number(box.dataset.char),
+ task: box.dataset.task,
+ done: box.checked
+ })
+ }).then(function (response) {
+ return response.json().catch(function () { return { status: 'error', message: 'Speichern fehlgeschlagen.' }; });
+ }).then(function (data) {
+ if (data.status !== 'success') {
+ throw new Error(data.message || 'Speichern fehlgeschlagen.');
+ }
+ }).catch(function (error) {
+ box.checked = !box.checked;
+ refresh();
+ window.alert(error.message || 'Speichern fehlgeschlagen. Bitte die Seite neu laden.');
+ }).then(function () {
+ box.disabled = false;
+ });
+ });
+
+ // Nur offene Aufgaben zeigen
+ var openToggle = root.querySelector('[data-checklist-open-only]');
+ function setOpenOnly(on) {
+ root.classList.toggle('is-open-only', on);
+ if (openToggle) {
+ openToggle.setAttribute('aria-pressed', on ? 'true' : 'false');
+ openToggle.classList.toggle('is-active', on);
+ }
+ }
+ try {
+ setOpenOnly(window.localStorage.getItem(OPEN_KEY) === '1');
+ } catch (e) {
+ setOpenOnly(false);
+ }
+ if (openToggle) {
+ openToggle.addEventListener('click', function () {
+ var on = !root.classList.contains('is-open-only');
+ setOpenOnly(on);
+ try {
+ if (on) {
+ window.localStorage.setItem(OPEN_KEY, '1');
+ } else {
+ window.localStorage.removeItem(OPEN_KEY);
+ }
+ } catch (e) { /* ohne Browserspeicher gilt der Filter nur bis zum Neuladen */ }
+ });
+ }
+
+ // Countdown bis zum Reset; ist er vorbei, die Seite neu laden (neuer Zeitraum, leere Haken)
+ function countdown(seconds) {
+ var minutes = Math.max(0, Math.floor(seconds / 60));
+ var days = Math.floor(minutes / 1440);
+ var hours = Math.floor(minutes % 1440 / 60);
+ return days > 0 ? days + ' ' + (days === 1 ? 'Tag' : 'Tagen') + ' ' + hours + ' Std' : hours + ' Std ' + (minutes % 60) + ' Min';
+ }
+ function tick() {
+ var now = Date.now() / 1000 + clockOffset;
+ var expired = false;
+ Array.prototype.forEach.call(root.querySelectorAll('[data-checklist-reset]'), function (el) {
+ var left = Number(el.dataset.checklistReset) - now;
+ if (left <= 0) {
+ expired = true;
+ }
+ el.querySelector('span').textContent = countdown(left);
+ el.classList.toggle('is-urgent', left < Number(el.dataset.checklistUrgent));
+ });
+ if (expired) {
+ window.location.reload();
+ }
+ }
+ window.setInterval(tick, 30000);
+
+ // Rollen-Auswahl auf checklist.php speichert sofort
+ Array.prototype.forEach.call(document.querySelectorAll('[data-checklist-autosubmit]'), function (select) {
+ select.addEventListener('change', function () {
+ select.form.submit();
+ });
+ });
+
+ refresh();
+})();
diff --git a/checklist.php b/checklist.php
new file mode 100644
index 0000000..b392966
--- /dev/null
+++ b/checklist.php
@@ -0,0 +1,80 @@
+ $c['role'] !== 'hidden'));
+$periods = checklist_periods();
+$ticks = checklist_ticks($userId, $periods);
+$weekdays = [1 => 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag'];
+$resetTime = sprintf('%02d:00 Uhr', CHECKLIST_RESET_HOUR);
+
+$pageTitle = 'Checkliste';
+include __DIR__ . '/includes/header.php';
+?>
+
+
+
+
Checkliste
+
Reset täglich um = e($resetTime) ?> · wöchentlich = e($weekdays[CHECKLIST_WEEKLY_DAY]) ?>, = e($resetTime) ?> (deutsche Zeit). Main-Charaktere sehen alle Aufgaben, Twinks nur ihre.
+
+
+
Nur offene
+
+
+
+ = checklist_no_characters_html() ?>
+
+
Alle deine Charaktere sind ausgeblendet – unten unter „Charaktere in der Checkliste“ holst du sie zurück.
+
+ = checklist_summary_html($characters, $ticks) ?>
+
+ = checklist_table_html('daily', $characters, $ticks, $periods) ?>
+ = checklist_table_html('weekly', $characters, $ticks, $periods) ?>
+
+
Aufladung
+
Lädt sich von selbst auf
+
+
+
+ = e($info['name']) ?> = e($info['val']) ?>
+ = e($info['who']) ?>
+
+
+
+
+
+
+
+
+
+
+
Charaktere in der Checkliste
+
Automatisch ist dein Hauptcharakter Main und alle anderen sind Twinks. Hier kannst du das je Charakter ändern oder einen ganz ausblenden.
+ Charaktere anlegen und umbenennen geht auf deiner Profilseite .
+
+
+
+
+
+
+
+
+
+
diff --git a/checklist_action.php b/checklist_action.php
new file mode 100644
index 0000000..eb86bee
--- /dev/null
+++ b/checklist_action.php
@@ -0,0 +1,49 @@
+prepare('UPDATE member_characters SET checklist_role = ? WHERE id = ?')
+ ->execute([$role !== '' ? $role : null, (int) $character['id']]);
+ set_flash('success', '„' . $character['name'] . '“: ' . CHECKLIST_ROLES[$role] . ($role === '' ? ' (Hauptcharakter = Main, sonst Twink)' : '') . '.');
+ redirect('/checklist.php#einstellungen');
+}
+
+// Haken (JSON)
+$body = read_json_body();
+verify_csrf_token($body['csrf_token'] ?? '');
+$character = $ownCharacter((int) ($body['character_id'] ?? 0));
+$task = checklist_task((string) ($body['task'] ?? ''));
+if ($character === null || $task === null || !checklist_applies($task, $character['role'])) {
+ json_response(false, 'Diese Aufgabe gibt es für den Charakter nicht (mehr). Bitte die Seite neu laden.');
+}
+checklist_set($userId, (int) $character['id'], $task, !empty($body['done']));
+json_response(true);
diff --git a/dashboard.php b/dashboard.php
index 8c589af..fd08cc3 100644
--- a/dashboard.php
+++ b/dashboard.php
@@ -5,6 +5,7 @@ require_once __DIR__ . '/includes/contributions.php';
require_once __DIR__ . '/includes/bugs.php';
require_once __DIR__ . '/includes/activity_points.php';
require_once __DIR__ . '/includes/premade_banner.php';
+require_once __DIR__ . '/includes/checklist.php';
require_login();
// Mitglieder verbuendeter Legionen haben ihre eigene Startseite (consilium.php) - hierher kommen sie nach dem Login
if (consilium_only()) {
@@ -141,6 +142,17 @@ try {
$myBugs = [];
}
$bugForm = $_SESSION['bug_form'] ?? null;
+
+// Checkliste der eigenen Charaktere (includes/checklist.php) - ausgeblendete Charaktere nicht
+$checklistCharacters = [];
+$checklistAny = false;
+if (user_has_permission('checklist.view')) {
+ $checklistAll = checklist_characters((int) $user['id']);
+ $checklistAny = $checklistAll !== [];
+ $checklistCharacters = array_values(array_filter($checklistAll, static fn (array $c): bool => $c['role'] !== 'hidden'));
+ $checklistPeriods = checklist_periods();
+ $checklistTicks = checklist_ticks((int) $user['id'], $checklistPeriods);
+}
unset($_SESSION['bug_form']);
$pageTitle = 'Dashboard';
@@ -166,6 +178,30 @@ include __DIR__ . '/includes/header.php';
+
+
+
+
+ = checklist_no_characters_html() ?>
+
+ = checklist_summary_html($checklistCharacters, $checklistTicks) ?>
+
+ = checklist_table_html('daily', $checklistCharacters, $checklistTicks, $checklistPeriods) ?>
+ = checklist_table_html('weekly', $checklistCharacters, $checklistTicks, $checklistPeriods) ?>
+
+
+
+
+
+
@@ -460,6 +496,9 @@ if (empty($user['tour_completed_at'])):
$tourSteps[] = ['target' => $link('/members.php'), 'title' => 'Mitglieder', 'text' => 'Hier findest du alle Mitglieder der Legion, sortiert nach ihren Rängen. Ein Klick auf einen Namen öffnet die Profilseite mit Charakteren und Galerie.'];
$tourSteps[] = ['target' => $link('/gallery.php'), 'title' => 'Galerie', 'text' => 'Die Screenshots aller Mitglieder auf einer Seite. Die Zahl am Menüpunkt zeigt, wie viele seit deinem letzten Besuch dazugekommen sind. Eigene lädst du auf deiner Profilseite hoch.'];
}
+ if (user_has_permission('checklist.view')) {
+ $tourSteps[] = ['target' => '[data-tour="checklist"]', 'title' => 'Checkliste', 'text' => 'Deine täglichen und wöchentlichen Aufgaben in Aion 2 zum Abhaken - für jeden Charakter aus deinem Profil. Die Haken setzen sich beim Reset von selbst zurück. Unter „Checkliste“ im Menü siehst du alles auf einer Seite und legst fest, welcher Charakter Main oder Twink ist.'];
+ }
if ($myPoints !== null) {
$tourSteps[] = ['target' => '[data-tour="points"]', 'title' => 'Lumipunkte', 'text' => 'Für deinen Einsatz in der Legion, z.B. bei Raids, bekommst du Lumipunkte - und für jeden Tag, an dem du vorbeischaust, eine kleine Belohnung. Hier siehst du deinen Stand und deinen Platz in der Rangliste.'];
}
diff --git a/datenschutz.php b/datenschutz.php
index 3d0fb2c..5636ee0 100644
--- a/datenschutz.php
+++ b/datenschutz.php
@@ -140,6 +140,11 @@ include __DIR__ . '/includes/header.php';
Anbieter, deren Videos oder Bilder du „immer direkt laden“ möchtest (Abschnitt = $number['eingebettete-inhalte'] + 1 ?> )
bis du die Freigabe zurücksetzt
+
+ lumina-checklist-openBrowserspeicher
+ ob die Checkliste nur offene Aufgaben zeigt
+ bis du den Filter ausschaltest
+
gear-plan-note, gear-dv-board, premades-editing, premades-openSitzungsspeicher
kleine Zwischenstände im Gear-Planer und bei den Premades (z. B. welche Leads aufgeklappt sind)
@@ -222,6 +227,7 @@ include __DIR__ . '/includes/header.php';
Im Mitgliederbereich verarbeiten wir, was du selbst einträgst oder was bei der Nutzung entsteht - je nach Funktion:
Profil: Anzeigename, Klassen und Main-Klasse, Profiltext und -hintergrund, Profilbild, deine Charaktere (Name, Klasse, Stufe, Notiz, Bilder, Berufe mit Stufe und Hauptberuf, Sammel-Spezialisierung – die Berufe stehen auch in der Übersicht „Berufe“; verknüpfst du einen Charakter mit dem Spiel, außerdem dessen Server und Kennung bei NCSoft sowie seine Spieldaten: Ausrüstung, Kampfkraft, Werte, Skills, freigeschaltete Daevanion-Felder, Titel und Portrait), Galeriebilder mit Beschreibung (und ob eins davon auf der Startseite gezeigt wird), Kommentare und Reaktionen sowie Gear-Sets, die du auf deinem Profil zeigst oder per Link bzw. Buildcode teilst – wer den Link oder Code hat, sieht das Set mit deinem Namen und kann es als eigenes übernehmen, solange du es teilst.
+ Checkliste: welche Aufgaben du für welchen Charakter im laufenden Tag bzw. in der laufenden Woche abgehakt hast und ob ein Charakter dort als Main, Twink oder ausgeblendet gilt. Das siehst nur du; abgelaufene Haken löschen wir nach drei Wochen.
Aktivität: wann du dich zuletzt angemeldet hast und zuletzt aktiv warst (in der Mitgliederliste sichtbar), deine tägliche Lumipunkte-Belohnung, die Einführungstour, gelesene Patchnotes, wann du zuletzt in die Galerie und auf die Raid-Seite geschaut hast (für die Anzeige neuer Bilder und Raids) und die Reihenfolge deiner Menüpunkte.
Raids und Premades: deine Anmeldungen mit Klasse und Gruppe, deine Anwesenheit (anwesend, abwesend, entschuldigt) und die dafür vergebenen Lumipunkte; bei Raids, die du selbst anlegst, dass du ihr Raid-Lead bist (für alle sichtbar). Leitest du eine Premade, das Banner, das du für sie wählst oder hochlädst - eigene Bilder mit dem Vermerk, wer sie hochgeladen hat, und mit derselben Freigabe wie Galeriebilder. Bewirbst du dich bei einer Premade, die Klasse, den gewünschten Platz (Gruppe oder Reserve), deine Nachricht und die Antwort samt Begründung - das sehen du, der Lead der Premade und die Legionsleitung.
Lumipunkte und Lumishop: Punktevergaben und -abzüge, deine Shop-Anträge mit Bemerkung (z. B. Charaktername) und deren Bearbeitung.
diff --git a/includes/checklist.php b/includes/checklist.php
new file mode 100644
index 0000000..773ec51
--- /dev/null
+++ b/includes/checklist.php
@@ -0,0 +1,265 @@
+ [
+ ['id' => 'duty', 'amt' => '5×', 'name' => 'Pflicht-Quests', 'm' => true, 't' => false],
+ ['id' => 'feld', 'amt' => '2×', 'name' => 'Feldbosse', 'm' => true, 't' => false],
+ ],
+ 'weekly' => [
+ ['id' => 'dd', 'amt' => '14×', 'name' => 'Täglicher Dungeon', 'm' => true, 't' => false],
+ ['id' => 'asz', 'amt' => '3×', 'name' => 'Aszensionsritus', 'm' => true, 't' => true],
+ ['id' => 'sf', 'amt' => '3×', 'name' => 'Schlachtfeld', 'm' => true, 't' => true],
+ ['id' => 'weih', 'amt' => '1×', 'name' => 'Weihstätte', 'm' => true, 't' => true],
+ ['id' => 'pve', 'amt' => '12×', 'name' => 'PvE-Händler-Aufträge', 'm' => true, 't' => false],
+ ['id' => 'pvp', 'amt' => '20×', 'name' => 'PvP-Händler-Aufträge', 'm' => true, 't' => false],
+ ['id' => 'konv16', 'amt' => '16×', 'name' => 'Konvertierung Energie', 'm' => true, 't' => false],
+ ['id' => 'konv4', 'amt' => '4×', 'name' => 'Konvertierung Energie', 'm' => true, 't' => true],
+ ['id' => 'penr16', 'amt' => '16×', 'name' => 'Pass Energie', 'm' => true, 't' => false],
+ ['id' => 'penr4', 'amt' => '4×', 'name' => 'Pass Energie', 'm' => true, 't' => true],
+ ['id' => 'pexp', 'amt' => 'X', 'name' => 'Pass EXP', 'm' => true, 't' => true],
+ ],
+];
+
+const CHECKLIST_KIND_LABELS = ['daily' => 'Täglich', 'weekly' => 'Wöchentlich'];
+
+// Was sich von selbst auflaedt - nur zur Info, ohne Haken
+const CHECKLIST_INFO = [
+ ['name' => 'Expedition / Transzendenz', 'val' => '15 Energie / 3 Std', 'who' => 'Main + Twink'],
+ ['name' => 'Alptraum', 'val' => '2 Tickets / Tag', 'who' => 'Main + Twink'],
+ ['name' => 'Shugo', 'val' => '3 Schlüssel / Tag', 'who' => 'Nur Main'],
+ ['name' => 'Beritra', 'val' => '1 Schlüssel / Tag', 'who' => 'Nur Main'],
+ ['name' => 'Abyss', 'val' => '0–3 Artefakte / Periode', 'who' => 'Main + Twink'],
+];
+
+// Einstellung je Charakter (member_characters.checklist_role); '' = automatisch
+const CHECKLIST_ROLES = ['' => 'Automatisch', 'main' => 'Main', 'twink' => 'Twink', 'hidden' => 'Ausblenden'];
+
+/**
+ * Beginn des laufenden taeglichen und woechentlichen Zeitraums (Datum des Reset-Tages) und die naechsten Resets.
+ *
+ * @return array{daily: string, weekly: string, next_daily: int, next_weekly: int}
+ */
+function checklist_periods(?int $now = null): array
+{
+ $tz = new DateTimeZone('Europe/Berlin');
+ $nowDate = (new DateTimeImmutable('@' . ($now ?? time())))->setTimezone($tz);
+ // Vor der Reset-Uhrzeit gehoert die Zeit noch zum Vortag
+ $day = $nowDate->modify('-' . CHECKLIST_RESET_HOUR . ' hours')->setTime(0, 0);
+ $week = $day->modify('-' . ((((int) $day->format('N')) - CHECKLIST_WEEKLY_DAY + 7) % 7) . ' days');
+ return [
+ 'daily' => $day->format('Y-m-d'),
+ 'weekly' => $week->format('Y-m-d'),
+ 'next_daily' => $day->modify('+1 day')->setTime(CHECKLIST_RESET_HOUR, 0)->getTimestamp(),
+ 'next_weekly' => $week->modify('+7 days')->setTime(CHECKLIST_RESET_HOUR, 0)->getTimestamp(),
+ ];
+}
+
+/** Aufgabe nach id, mit ihrer Art (daily/weekly) - oder null. */
+function checklist_task(string $id): ?array
+{
+ foreach (CHECKLIST_TASKS as $kind => $tasks) {
+ foreach ($tasks as $task) {
+ if ($task['id'] === $id) {
+ return $task + ['kind' => $kind];
+ }
+ }
+ }
+ return null;
+}
+
+function checklist_applies(array $task, string $role): bool
+{
+ return $role === 'main' ? $task['m'] : ($role === 'twink' && $task['t']);
+}
+
+/**
+ * Charaktere eines Mitglieds mit ihrer Rolle in der Checkliste ('main', 'twink' oder 'hidden').
+ * Ohne Einstellung: der Hauptcharakter ist Main, die anderen Twinks; ist keiner als Hauptcharakter
+ * markiert, gilt der erste als Main.
+ *
+ * @return list>
+ */
+function checklist_characters(int $userId): array
+{
+ $stmt = db()->prepare(
+ 'SELECT id, name, class_name, level, is_main, checklist_role FROM member_characters
+ WHERE user_id = ? ORDER BY is_main DESC, sort_order, id'
+ );
+ $stmt->execute([$userId]);
+ $characters = $stmt->fetchAll();
+ $hasMain = (bool) array_filter($characters, static fn (array $c): bool => (int) $c['is_main'] === 1);
+ foreach ($characters as $i => &$character) {
+ $setting = (string) ($character['checklist_role'] ?? '');
+ $character['setting'] = isset(CHECKLIST_ROLES[$setting]) ? $setting : '';
+ $character['auto_role'] = ((int) $character['is_main'] === 1 || (!$hasMain && $i === 0)) ? 'main' : 'twink';
+ $character['role'] = $character['setting'] !== '' ? $character['setting'] : $character['auto_role'];
+ }
+ unset($character);
+ return $characters;
+}
+
+/**
+ * Haken des laufenden Zeitraums: ["|" => true].
+ *
+ * @return array
+ */
+function checklist_ticks(int $userId, array $periods): array
+{
+ $stmt = db()->prepare('SELECT task_id, character_id, period FROM checklist_ticks WHERE user_id = ? AND period IN (?, ?)');
+ $stmt->execute([$userId, $periods['daily'], $periods['weekly']]);
+ $ticks = [];
+ foreach ($stmt->fetchAll() as $row) {
+ $task = checklist_task((string) $row['task_id']);
+ if ($task !== null && $row['period'] === $periods[$task['kind']]) {
+ $ticks[$row['task_id'] . '|' . $row['character_id']] = true;
+ }
+ }
+ return $ticks;
+}
+
+/** Haken setzen oder entfernen (Charakter und Aufgabe pruefen die Aufrufer). */
+function checklist_set(int $userId, int $characterId, array $task, bool $done): void
+{
+ $periods = checklist_periods();
+ $pdo = db();
+ if ($done) {
+ $pdo->prepare('INSERT IGNORE INTO checklist_ticks (user_id, character_id, task_id, period) VALUES (?, ?, ?, ?)')
+ ->execute([$userId, $characterId, $task['id'], $periods[$task['kind']]]);
+ } else {
+ $pdo->prepare('DELETE FROM checklist_ticks WHERE character_id = ? AND task_id = ? AND period = ?')
+ ->execute([$characterId, $task['id'], $periods[$task['kind']]]);
+ }
+ // Alte Zeitraeume gelegentlich wegraeumen
+ if (random_int(1, 50) === 1) {
+ $pdo->prepare('DELETE FROM checklist_ticks WHERE period < ?')
+ ->execute([date('Y-m-d', time() - CHECKLIST_KEEP_DAYS * 86400)]);
+ }
+}
+
+/** Erledigt/gesamt eines Charakters fuer eine Art (daily/weekly). */
+function checklist_progress(array $character, string $kind, array $ticks): array
+{
+ $done = 0;
+ $total = 0;
+ foreach (CHECKLIST_TASKS[$kind] as $task) {
+ if (checklist_applies($task, $character['role'])) {
+ $total++;
+ if (isset($ticks[$task['id'] . '|' . $character['id']])) {
+ $done++;
+ }
+ }
+ }
+ return ['done' => $done, 'total' => $total];
+}
+
+/** "4 Std 12 Min" bzw. "2 Tagen 5 Std" bis zum Zeitpunkt (wie in der Vorlage). */
+function checklist_countdown(int $until, ?int $now = null): string
+{
+ $minutes = max(0, intdiv($until - ($now ?? time()), 60));
+ $days = intdiv($minutes, 1440);
+ $hours = intdiv($minutes % 1440, 60);
+ return $days > 0 ? $days . ' ' . ($days === 1 ? 'Tag' : 'Tagen') . ' ' . $hours . ' Std' : $hours . ' Std ' . ($minutes % 60) . ' Min';
+}
+
+function checklist_class_icon(array $character): string
+{
+ $url = $character['class_name'] ? class_icon_url((string) $character['class_name']) : null;
+ return $url !== null ? ' ' : '';
+}
+
+/** Fortschritt je Charakter (Kaertchen mit zwei Balken). */
+function checklist_summary_html(array $characters, array $ticks): string
+{
+ $html = '';
+ foreach ($characters as $c) {
+ $bars = '';
+ $full = true;
+ foreach (CHECKLIST_KIND_LABELS as $kind => $label) {
+ $p = checklist_progress($c, $kind, $ticks);
+ if ($p['total'] === 0) {
+ continue; // z.B. Twinks haben keine taeglichen Aufgaben
+ }
+ $full = $full && $p['done'] === $p['total'];
+ $percent = $p['total'] > 0 ? round($p['done'] / $p['total'] * 100) : 0;
+ $bars .= '
' . e($label)
+ . ' ' . $p['done'] . '/' . $p['total'] . '
'
+ . '
'
+ . '
';
+ }
+ $html .= '
'
+ . '
' . checklist_class_icon($c) . e((string) $c['name']) . ' '
+ . '' . e(CHECKLIST_ROLES[$c['role']]) . '
'
+ . $bars . '
';
+ }
+ return $html . '
';
+}
+
+/** Tabelle einer Art: Aufgaben in Zeilen, Charaktere in Spalten. */
+function checklist_table_html(string $kind, array $characters, array $ticks, array $periods): string
+{
+ $done = 0;
+ $total = 0;
+ $rows = '';
+ foreach (CHECKLIST_TASKS[$kind] as $task) {
+ $cells = '';
+ $all = true;
+ foreach ($characters as $c) {
+ if (!checklist_applies($task, $c['role'])) {
+ $cells .= '– ';
+ continue;
+ }
+ $on = isset($ticks[$task['id'] . '|' . $c['id']]);
+ $total++;
+ $done += $on ? 1 : 0;
+ $all = $all && $on;
+ $cells .= ' ';
+ }
+ $rows .= ''
+ . '' . e($task['amt']) . ' ' . e($task['name']) . ' ' . $cells . '
';
+ }
+ $head = '';
+ foreach ($characters as $c) {
+ $head .= ''
+ . checklist_class_icon($c) . e((string) $c['name']) . ' ';
+ }
+ $next = $kind === 'daily' ? $periods['next_daily'] : $periods['next_weekly'];
+ // Rot, wenn der Reset bald kommt: taeglich unter 3 Stunden, woechentlich unter einem Tag
+ $urgent = $next - time() < ($kind === 'daily' ? 3 * 3600 : 86400);
+ return ''
+ . '
' . e(CHECKLIST_KIND_LABELS[$kind]) . ' '
+ . '' . $done . '/' . $total . ' '
+ . '
'
+ . 'Reset in ' . e(checklist_countdown($next)) . '
'
+ . '
'
+ . '
Aufgabe ' . $head . '
' . $rows
+ . '
Alles erledigt 🎉
';
+}
+
+/** Hinweis, wenn noch keine Charaktere da sind. */
+function checklist_no_characters_html(): string
+{
+ $link = user_has_permission('members.view')
+ ? 'Lege auf deiner Profilseite einen Charakter an '
+ : 'Lege auf deiner Profilseite einen Charakter an';
+ return '' . $link . ' – dann erscheinen hier seine Aufgaben zum Abhaken.
';
+}
diff --git a/includes/data_export.php b/includes/data_export.php
index b5dca1e..f887952 100644
--- a/includes/data_export.php
+++ b/includes/data_export.php
@@ -196,6 +196,7 @@ function data_export_collect(int $userId): array
'reaktionen' => data_export_strip(data_export_rows('SELECT * FROM reactions WHERE user_id = ? ORDER BY id', [$userId]), ['user_id', 'id']),
'gemeldete_inhalte' => data_export_strip(data_export_rows('SELECT * FROM content_reports WHERE reporter_id = ? ORDER BY id', [$userId]), ['reporter_id']),
'gear_sets' => $gearSets,
+ 'checkliste_haken' => data_export_rows('SELECT character_id, task_id, period, created_at FROM checklist_ticks WHERE user_id = ? ORDER BY period, character_id', [$userId]),
'kalender_termine' => data_export_strip(data_export_rows('SELECT * FROM calendar_entries WHERE user_id = ? ORDER BY starts_at', [$userId]), ['user_id']),
'kalender_teilnahmen' => data_export_rows(
'SELECT e.id AS termin_id, e.title, e.starts_at, p.created_at AS angemeldet_am
diff --git a/includes/functions.php b/includes/functions.php
index 5914a88..bebc4df 100644
--- a/includes/functions.php
+++ b/includes/functions.php
@@ -7,7 +7,7 @@ declare(strict_types=1);
// kann sie unter "Menü anpassen" umsortieren (users.sidebar_order, sidebar_action.php) - der
// Admin-Bereich wird getrennt sortiert und bleibt unter seiner Ueberschrift.
const SIDEBAR_NAV_MAIN = [
- '/dashboard.php', '/consilium.php', '/profile.php', '/members.php', '/gallery.php', '/contributions.php', '/shop.php', 'gap',
+ '/dashboard.php', '/checklist.php', '/consilium.php', '/profile.php', '/members.php', '/gallery.php', '/contributions.php', '/shop.php', 'gap',
'/wiki.php', '/raids.php', '/premades.php', '/calendar.php', '/events.php',
'/map.php', '/raidplan.php', '/gear.php', '/professions.php', '/warehouse.php',
];
@@ -156,6 +156,7 @@ function icon(string $name): string
'chevron-down' => ' ',
'chevron-up' => ' ',
'check' => ' ',
+ 'checklist' => ' ',
'heart' => ' ',
'bag' => ' ',
'box' => ' ',
diff --git a/includes/header.php b/includes/header.php
index 27ca71d..e237b89 100644
--- a/includes/header.php
+++ b/includes/header.php
@@ -21,6 +21,7 @@ $canManageDues = $currentUser && user_has_permission('dues.manage');
$canViewMap = $currentUser && user_has_permission('map.view');
$canViewWarehouse = $currentUser && user_has_permission('warehouse.view');
$canViewGear = $currentUser && user_has_permission('gear.view');
+$canViewChecklist = $currentUser && user_has_permission('checklist.view');
$canViewContributions = $currentUser && user_has_permission('contributions.view');
$canViewShop = $currentUser && user_has_permission('shop.view');
// Taegliche Belohnung: beim ersten Seitenaufruf des Tages Lumipunkte (includes/contributions.php)
@@ -65,6 +66,7 @@ $showAdminMenu = $canViewUsers || $canOpenRoles || $canManageActivity || $canMan
$currentScript = basename((string) ($_SERVER['SCRIPT_NAME'] ?? ''));
$isDashboardActive = $currentScript === 'dashboard.php';
+$isChecklistActive = $currentScript === 'checklist.php';
$isProfileActive = $currentScript === 'profile.php';
$isRaidsActive = $currentScript === 'raids.php';
$isPremadesActive = $currentScript === 'premades.php';
@@ -98,6 +100,7 @@ $isConsiliumAdminActive = $currentScript === 'consilium.php' && !$isConsiliumAct
// Jeder Bereich bekommt ein eigenes, dezentes Hintergrundbild.
$pageBackgrounds = [
'dashboard.php' => 'bg-dashboard',
+ 'checklist.php' => 'bg-dashboard',
'profile.php' => 'bg-profile',
'raids.php' => 'bg-raids',
'raid_attendance.php' => 'bg-raids',
@@ -283,6 +286,11 @@ $brandLogo = $isConsiliumOnly
= icon('home') ?>Dashboard
+
+ class="sidebar-link= $isChecklistActive ? ' active' : '' ?>" title="Checkliste: tägliche und wöchentliche Aufgaben deiner Charaktere">
+ = icon('checklist') ?>Checkliste
+
+
class="sidebar-link= $isConsiliumActive ? ' active' : '' ?>" title="= e(CONSILIUM_NAME) ?>: das Bündnis mit anderen Legionen">
= icon($isConsiliumOnly ? 'home' : 'shield-check') ?>= e(CONSILIUM_NAME) ?>
diff --git a/includes/patchnotes.php b/includes/patchnotes.php
index eec8197..6c47f27 100644
--- a/includes/patchnotes.php
+++ b/includes/patchnotes.php
@@ -19,6 +19,18 @@ const PATCHNOTE_TYPES = [
];
const PATCHNOTES = [
+ [
+ 'id' => '2026-10-09-a',
+ 'date' => '2026-10-09',
+ 'title' => 'Checkliste für deine Charaktere',
+ 'summary' => 'Hake deine täglichen und wöchentlichen Aufgaben in Aion 2 direkt auf der Website ab – für jeden deiner Charaktere, mit Reset-Countdown.',
+ 'changes' => [
+ ['type' => 'neu', 'area' => 'Checkliste', 'text' => 'Neu im Menü und als Karte ganz oben im Dashboard: die Checkliste mit den täglichen Aufgaben (Pflicht-Quests, Feldbosse) und den wöchentlichen (Täglicher Dungeon, Aszensionsritus, Schlachtfeld, Weihstätte, Händler-Aufträge, Konvertierung, Pass). Die Charaktere kommen aus deinem Profil. Main-Charaktere sehen alle Aufgaben, Twinks nur ihre. Ein Klick auf ein Kästchen speichert sofort, die Balken zeigen deinen Fortschritt je Charakter.'],
+ ['type' => 'neu', 'area' => 'Checkliste', 'text' => 'Die Haken setzen sich von selbst zurück: täglich um 9:00 Uhr, wöchentlich mittwochs um 9:00 Uhr. Bis zum Reset läuft ein Countdown mit, der rot wird, wenn es knapp wird. Da die Haken auf der Website gespeichert sind, siehst du am Handy denselben Stand wie am PC. Mit „Nur offene“ blendest du Erledigtes aus.'],
+ ['type' => 'neu', 'area' => 'Checkliste', 'text' => 'Automatisch ist dein Hauptcharakter Main und alle anderen sind Twinks. Auf der Seite „Checkliste“ unter „Charaktere in der Checkliste“ stellst du das je Charakter um oder blendest einen aus. Dort steht auch, was sich von selbst auflädt (Expedition, Alptraum, Shugo, Beritra, Abyss).'],
+ ['type' => 'neu', 'area' => 'Verwaltung', 'text' => 'Neues Recht checklist.view – alle Gruppen mit Zugang zum Dashboard haben es automatisch bekommen.', 'audience' => 'leitung'],
+ ],
+ ],
[
'id' => '2026-10-07-a',
'date' => '2026-10-07',
diff --git a/includes/permissions.php b/includes/permissions.php
index 786fe6a..9921a62 100644
--- a/includes/permissions.php
+++ b/includes/permissions.php
@@ -48,6 +48,7 @@ const CORE_PERMISSIONS = [
['key' => 'consilium.manage', 'description' => 'Elyos Allianz: verbündete Legionen anlegen, umbenennen und löschen und ihre Mitglieder den Legionen zuordnen'],
['key' => 'professions.manage', 'description' => 'Berufe: Zielzahlen je Beruf festlegen - was darunter liegt, sehen alle als „Gerade gesucht“'],
['key' => 'gear.view', 'description' => 'Gear-Planer: eigene Ausrüstungssets anlegen und vergleichen, freigegebene Sets anderer ansehen'],
+ ['key' => 'checklist.view', 'description' => 'Checkliste: tägliche und wöchentliche Aufgaben der eigenen Charaktere abhaken (Seite Checkliste und Karte im Dashboard)'],
['key' => 'gear.manage', 'description' => 'Gear-Planer: Gegenstände und ihre Werte von aion2hub übernehmen, abgleichen und löschen'],
['key' => 'calendar.leadership', 'description' => 'Kalender: Termine nur für die Leitung eintragen („Nur Leitung nimmt teil“ oder „Intern“), interne Termine sehen und bei Leitungs-Terminen teilnehmen'],
['key' => 'comments.moderate', 'description' => 'Moderation: Galeriebilder, Kommentare und Kalender-Termine der Mitglieder freigeben, ausblenden und löschen (Freigabe-Liste, Meldungen)'],
diff --git a/includes/schema.php b/includes/schema.php
index a6e8dfc..97ee65c 100644
--- a/includes/schema.php
+++ b/includes/schema.php
@@ -909,6 +909,21 @@ CREATE TABLE IF NOT EXISTS armory_cache (
fetched_at DATETIME NOT NULL,
INDEX idx_armory_cache_time (fetched_at)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
+SQL,
+ // Haken der Aion-2-Checkliste (includes/checklist.php) - period = erster Tag des Zeitraums (Reset-Tag)
+ 'checklist_ticks' => <<<'SQL'
+CREATE TABLE IF NOT EXISTS checklist_ticks (
+ user_id INT UNSIGNED NOT NULL,
+ character_id INT UNSIGNED NOT NULL,
+ task_id VARCHAR(20) NOT NULL,
+ period DATE NOT NULL,
+ created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (character_id, task_id, period),
+ FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
+ FOREIGN KEY (character_id) REFERENCES member_characters(id) ON DELETE CASCADE,
+ INDEX idx_checklist_ticks_user (user_id, period),
+ INDEX idx_checklist_ticks_period (period)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
SQL,
];
}
@@ -1046,6 +1061,8 @@ function schema_column_upgrades(): array
'aion_data' => "ALTER TABLE member_characters ADD COLUMN aion_data MEDIUMTEXT NULL AFTER aion_server_id",
'aion_fetched_at' => "ALTER TABLE member_characters ADD COLUMN aion_fetched_at DATETIME NULL AFTER aion_data",
'aion_error' => "ALTER TABLE member_characters ADD COLUMN aion_error VARCHAR(255) NULL AFTER aion_fetched_at",
+ // Rolle in der Checkliste (includes/checklist.php): main, twink, hidden - NULL = automatisch
+ 'checklist_role' => "ALTER TABLE member_characters ADD COLUMN checklist_role VARCHAR(10) NULL AFTER is_main",
],
// Freigabe von Galeriebildern (Moderation) - vorhandene Bilder bleiben sichtbar
'member_gallery' => [
@@ -1263,8 +1280,8 @@ function schema_sync_core_permissions(): void
$pdo->prepare('INSERT IGNORE INTO role_permissions (role_id, permission_id) VALUES (?, ?)')
->execute([$adminRoleId, $newPermissionId]);
}
- // Das Wiki und den Gear-Planer sollen alle nutzen duerfen, die ins Dashboard kommen.
- if (in_array($permission['key'], ['wiki.view', 'gear.view'], true)) {
+ // Das Wiki, den Gear-Planer und die Checkliste sollen alle nutzen duerfen, die ins Dashboard kommen.
+ if (in_array($permission['key'], ['wiki.view', 'gear.view', 'checklist.view'], true)) {
$pdo->prepare(
"INSERT IGNORE INTO role_permissions (role_id, permission_id)
SELECT rp.role_id, ? FROM role_permissions rp
diff --git a/sql/schema.sql b/sql/schema.sql
index 494be61..36753d2 100644
--- a/sql/schema.sql
+++ b/sql/schema.sql
@@ -545,6 +545,8 @@ CREATE TABLE IF NOT EXISTS member_characters (
portrait_filename VARCHAR(120) NULL,
image_filename VARCHAR(120) NULL,
is_main TINYINT(1) NOT NULL DEFAULT 0,
+ -- Rolle in der Checkliste (includes/checklist.php): main, twink, hidden - NULL = automatisch
+ checklist_role VARCHAR(10) NULL,
sort_order INT NOT NULL DEFAULT 0,
-- Verknuepfung mit dem Charakter im Spiel und dessen Live-Daten (includes/armory.php)
aion_char_id VARCHAR(120) NULL,
@@ -565,6 +567,20 @@ CREATE TABLE IF NOT EXISTS armory_cache (
INDEX idx_armory_cache_time (fetched_at)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+-- Haken der Aion-2-Checkliste (includes/checklist.php) - period = erster Tag des Zeitraums (Reset-Tag)
+CREATE TABLE IF NOT EXISTS checklist_ticks (
+ user_id INT UNSIGNED NOT NULL,
+ character_id INT UNSIGNED NOT NULL,
+ task_id VARCHAR(20) NOT NULL,
+ period DATE NOT NULL,
+ created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (character_id, task_id, period),
+ FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
+ FOREIGN KEY (character_id) REFERENCES member_characters(id) ON DELETE CASCADE,
+ INDEX idx_checklist_ticks_user (user_id, period),
+ INDEX idx_checklist_ticks_period (period)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+
-- Berufe der Charaktere (includes/professions.php, Uebersicht professions.php)
CREATE TABLE IF NOT EXISTS character_professions (
character_id INT UNSIGNED NOT NULL,