umfassende updates

This commit is contained in:
torsten 2026-10-18 21:40:43 +02:00
parent 3331f08091
commit 50cd802d33
16 changed files with 441 additions and 78 deletions

View file

@ -52,7 +52,7 @@ $exactExamples = ['1:0', '2:1', '2:2', '3:1', '3:2', '4:2', '5:3'];
<tr><td><strong>Richtige Tendenz</strong> (Sieg Heim / Unentschieden / Sieg Gast richtig, Ergebnis falsch)</td><td>1</td></tr>
<tr><td><strong>Exaktes Ergebnis</strong></td><td>2 + Torbonus</td></tr>
<tr><td>Mit <strong>Joker</strong></td><td>Punkte des Spiels × 2</td></tr>
<tr><td><strong>Rundenbonus</strong>: Jedes Spiel der Runde bringt dir mindestens einen Punkt</td><td>+ <?php echo Tipp::ALL_HITS_BONUS; ?> (wird nicht verdoppelt)</td></tr>
<tr><td><strong>Rundenbonus</strong>: Alle 4 Spiele der Runde haben mindestens die Tendenz getroffen</td><td>+ <?php echo Tipp::ALL_HITS_BONUS; ?> (wird nicht verdoppelt)</td></tr>
</tbody>
</table>

View file

@ -0,0 +1,115 @@
<?php
use App\Models\Quota;
use App\Models\Season;
$pageTitle = 'Anleitung-Admin';
require __DIR__ . '/../partials/header.php';
$defaults = Quota::defaults();
$euro = fn($amount) => number_format($amount, 2, ',', '.') . ' €';
?>
<div class="guide">
<h1>Anleitung-Admin</h1>
<p class="lead">So verwaltest du Saisons und Quoten. Dieser Bereich richtet sich ausschließlich an Administratoren.</p>
<nav class="guide-toc">
<a href="#saison-anlegen">Saison anlegen</a>
<a href="#saison-umschalten">Saison umschalten</a>
<a href="#quoten">Quoten</a>
</nav>
<h2 id="saison-anlegen">1. Neue Saison anlegen</h2>
<ol>
<li>Öffne unter <em>Administration → Saisons verwalten</em> die Saisonverwaltung.</li>
<li>Fülle das Formular „Neue Saison anlegen" aus:
<ul>
<li><strong>Name:</strong> z.&nbsp;B. „HINRUNDE 26/27".</li>
<li><strong>Runden:</strong> Anzahl der Spieltage. Pro Runde werden automatisch <strong><?php echo Season::GAMES_PER_ROUND; ?> Spiele</strong> angelegt.</li>
<li><strong>Max. gleiche Joker:</strong> Wie oft dasselbe Ergebnis pro Saison mit Joker getippt werden darf (Standard <?php echo Season::DEFAULT_MAX_IDENTICAL_JOKERTIPPS; ?>).</li>
</ul>
</li>
<li>Lege die Quoten fest (siehe <a href="#quoten">Abschnitt Quoten</a>). Es gelten die Standardwerte, du kannst sie aber anpassen.</li>
<li>Klicke <strong>„Anlegen"</strong>. Die Saison wird erstellt und automatisch als <strong>aktiv</strong> gesetzt.</li>
</ol>
<div class="example">
<strong>Wichtig nach dem Anlegen:</strong> Die Saison enthält zunächst nur Platzhalter-Runden
(„1. Spieltag", „2. Spieltag", …) mit Platzhalter-Spielen („Mannschaft 1" bis „Mannschaft 8"),
deren Anstoßzeiten 7 Monate in der Zukunft liegen. Trage unter
<em>Administration → Spiele &amp; Ergebnisse eintragen</em> die echten Paarungen und Anstoßzeiten ein.
Erst dadurch werden die Runden tippbar und später (nach dem Anpfiff) gesperrt.
</div>
<h2 id="saison-umschalten">2. Saison umschalten &amp; verwalten</h2>
<ul>
<li>Die <strong>Saison-Liste</strong> zeigt alle Saisons; die aktive ist fett markiert (Spalte „Aktiv").</li>
<li>Mit <strong>„Als aktiv setzen"</strong> wechselst du die aktive Saison. Alle Bereiche
(Startseite, Tipps, Rangliste, Quoten, Erinnerungen) beziehen sich danach auf die neue Saison.</li>
<li>Über <strong>„Bearbeiten"</strong> kannst du Name, Rundenanzahl, Joker-Limit und Quoten nachträglich anpassen.
Hinweis: Eine Änderung der Rundenanzahl legt keine neuen Runden an und löscht keine.</li>
<li><strong>„Löschen"</strong> entfernt eine Saison samt Runden, Spielen, Tipps, Zahlungen und Quoten.
Die <strong>aktive Saison kann nicht gelöscht werden</strong> – schalte zuerst auf eine andere um.</li>
</ul>
<h2 id="quoten">3. Wie die Quoten funktionieren</h2>
<p>Die Quoten legen fest, wie der Pott verteilt wird. Der <strong>Pott</strong> ergibt sich aus
<em>bezahlte Spieler × Einsatz</em>.</p>
<h3>Die drei Quoten-Gruppen</h3>
<table class="guide-table">
<thead><tr><th>Quote</th><th>Bedeutung</th><th>Standard</th></tr></thead>
<tbody>
<tr><td><strong>Einsatz</strong></td><td>Betrag, den jeder aktive Spieler pro Saison zahlt (in €)</td><td><?php echo $defaults['einsatz']; ?> €</td></tr>
<tr><td><strong>Tagessieg</strong></td><td>Anteil des Potts für die Tagessiege (in %)</td><td><?php echo $defaults['tagessieg']; ?> %</td></tr>
<tr><td><strong>Platzierung</strong></td><td>Anteil des Potts für das Platzierungsgeld (in %)</td><td><?php echo $defaults['platzierung']; ?> %</td></tr>
<tr><td><strong>Platz 1 … <?php echo Quota::PLACES; ?></strong></td><td>Aufteilung des Platzierungstopfs auf die Plätze (in %)</td><td>siehe Tabelle unten</td></tr>
</tbody>
</table>
<p><strong>Regeln:</strong> Tagessieg + Platzierung müssen zusammen <strong>100 %</strong> ergeben,
und Platz 1 bis <?php echo Quota::PLACES; ?> ebenfalls <strong>100 %</strong>. Das Formular prüft das beim Speichern.</p>
<h3>Standard-Platzierungsquoten</h3>
<table class="guide-table compact">
<thead>
<tr><th>Platz</th><?php for ($place = 1; $place <= Quota::PLACES; $place++): ?><th><?php echo $place; ?></th><?php endfor; ?></tr>
</thead>
<tbody>
<tr><td>Anteil</td>
<?php for ($place = 1; $place <= Quota::PLACES; $place++): ?>
<td><?php echo $defaults['platz' . $place]; ?> %</td>
<?php endfor; ?>
</tr>
</tbody>
</table>
<h3>So wird gerechnet</h3>
<ul>
<li><strong>Pott</strong> = bezahlte Spieler × Einsatz.</li>
<li><strong>Tagessieg je Runde</strong> = Pott × Tagessieg-% ÷ Rundenzahl, abgerundet auf einen durch 6 teilbaren Betrag.
Der Rundungsrest wandert in den Platzierungstopf.</li>
<li><strong>Platzierungstopf</strong> = Pott × Platzierung-% + Rundungsrest der Tagessiege.</li>
<li><strong>Platz N</strong> = Platzierungstopf × Platz-N-%, abgerundet auf einen durch 6 teilbaren Betrag.</li>
<li>Was danach vom Pott übrig bleibt (Rundungsreste), geht <strong>zusätzlich an Platz 1</strong>.</li>
</ul>
<p class="hint">Die konkreten Beträge für die aktive Saison siehst du in der Saisonverwaltung
(rechts neben jedem Quotenfeld) und unter <a href="/index.php?page=info_quotas">Quoten</a>.</p>
</div>
<style>
.guide { max-width: 900px; line-height: 1.5; }
.guide .lead { color: #555; }
.guide h2 { margin-top: 1.8em; border-bottom: 1px solid #ddd; padding-bottom: 0.2em; scroll-margin-top: 1em; }
.guide-toc { background: none; padding: 0; margin: 0 0 1em; }
.guide-toc a { margin-right: 1em; font-weight: normal; color: var(--link); }
.guide-table { width: auto; margin: 0.8em 0; }
.guide-table td:last-child, .guide-table th:last-child { text-align: center; }
.guide-table.compact td, .guide-table.compact th { padding: 4px 10px; text-align: center; }
.guide-table.compact td:first-child, .guide-table.compact th:first-child { text-align: left; }
.guide .example { background: #f9f9f9; border: 1px solid #ddd; padding: 0.8em 1em; margin: 1em 0; }
.guide .hint { color: #666; font-size: 0.9em; }
</style>
<?php require __DIR__ . '/../partials/footer.php'; ?>

View file

@ -5,6 +5,7 @@ require __DIR__ . '/../partials/header.php';
$myId = (int)$user['id'];
?>
<div class="money-centered">
<h1>Geldrangliste</h1>
<table class="money-table">
@ -25,6 +26,7 @@ $myId = (int)$user['id'];
<?php endforeach; ?>
</tbody>
</table>
</div>
<script>
// Wie im Legacy (Link auf #playerid_<eigene ID>): ohne Anker zur eigenen Zeile springen
@ -35,7 +37,8 @@ if (!location.hash) {
</script>
<style>
.money-table { width: auto; min-width: 400px; }
.money-centered { text-align: center; }
.money-table { width: auto; min-width: 400px; margin: 1em auto 0; text-align: left; }
.money-table td.amount { text-align: right; }
.money-table tr.me td { background: #fff3cd; font-weight: bold; }
.money-table tr:target td { background: #fff3cd; }

View file

@ -3,6 +3,7 @@ $pageTitle = 'Ausschüttungsübersicht';
require __DIR__ . '/../partials/header.php';
?>
<div class="money-centered">
<h1>Ausschüttungsübersicht <?php echo htmlspecialchars($detailUser['name']); ?></h1>
<table class="money-table">
@ -31,9 +32,11 @@ require __DIR__ . '/../partials/header.php';
</table>
<p><a href="/index.php?page=money_ranking#playerid_<?php echo (int)$detailUser['id']; ?>">Zurück</a></p>
</div>
<style>
.money-table { width: auto; min-width: 400px; }
.money-centered { text-align: center; }
.money-table { width: auto; min-width: 400px; margin: 1em auto 0; text-align: left; }
.money-table td.amount { text-align: right; }
.money-table tr.total td { font-weight: bold; border-top: 2px solid #999; }
</style>

View file

@ -10,8 +10,10 @@ $euro = fn($amount) => number_format($amount, 2, ',', '.') . ' €';
<?php if (!$currentSeason): ?>
<p>Es gibt noch keine Saison.</p>
<?php else: ?>
<div class="quota-centered">
<h1><?php echo htmlspecialchars($currentSeason['name']); ?></h1>
<h2>Ausschüttungs-Quoten</h2>
</div>
<div class="quota-section">
<h3>Spiel-Einsatz</h3>
@ -39,6 +41,7 @@ $euro = fn($amount) => number_format($amount, 2, ',', '.') . ' €';
<?php endif; ?>
<style>
.quota-centered { text-align: center; }
.quota-section { text-align: center; }
.info-table { width: auto; min-width: 350px; margin-left: auto; margin-right: auto; }
.info-table th { width: 200px; font-weight: normal; }