Compare commits
2 Commits
0b8cc216b4
...
aeb2d87cf5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aeb2d87cf5 | ||
|
|
d48b8457de |
@@ -158,7 +158,7 @@ require_once 'inc/header.php';
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<div class="card shadow">
|
<div class="card shadow">
|
||||||
<div class="card-header bg-secondary bg-opacity-50 text-secondary d-flex justify-content-between align-items-center">
|
<div class="card-header bg-primary-subtle text-secondary d-flex justify-content-between align-items-center">
|
||||||
<h4 class="mb-0">Aktuelle Farben</h4>
|
<h4 class="mb-0">Aktuelle Farben</h4>
|
||||||
<?php if ($is_admin): ?>
|
<?php if ($is_admin): ?>
|
||||||
<a class="btn btn-sm d-flex align-items-center justify-content-center" data-bs-toggle="collapse" href="#colorFormCollapse" role="button" aria-expanded="false" aria-controls="colorFormCollapse">Add
|
<a class="btn btn-sm d-flex align-items-center justify-content-center" data-bs-toggle="collapse" href="#colorFormCollapse" role="button" aria-expanded="false" aria-controls="colorFormCollapse">Add
|
||||||
|
|||||||
@@ -62,4 +62,8 @@ pre {
|
|||||||
/* Optional: Kleiner Abstand für bessere Lesbarkeit */
|
/* Optional: Kleiner Abstand für bessere Lesbarkeit */
|
||||||
.collapse:not(.show) {
|
.collapse:not(.show) {
|
||||||
display: none;
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge-outline-normal {
|
||||||
|
font-weight: normal !important;
|
||||||
}
|
}
|
||||||
@@ -168,7 +168,7 @@ include('inc/header.php');
|
|||||||
$formatted_time = date('H:i', strtotime($meeting['date']));
|
$formatted_time = date('H:i', strtotime($meeting['date']));
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="card-header d-flex justify-content-between bg-secondary bg-opacity-25 text-dark align-items-center">
|
<div class="card-header bg-primary-subtle text-secondary d-flex justify-content-between align-items-center">
|
||||||
<div class="mb-0 fs-6 fs-md-5 fw-bold">
|
<div class="mb-0 fs-6 fs-md-5 fw-bold">
|
||||||
Treffen am <?= $weekday ?> <?= $formatted_date ?> um <?= $formatted_time ?> Uhr
|
Treffen am <?= $weekday ?> <?= $formatted_date ?> um <?= $formatted_time ?> Uhr
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
82
index.php
82
index.php
@@ -265,7 +265,7 @@ $german_weekdays = [
|
|||||||
];
|
];
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="container py-0">
|
<div class="container pt-0">
|
||||||
<?php if (isset($auto_declined) && $auto_declined === 'declined'): ?>
|
<?php if (isset($auto_declined) && $auto_declined === 'declined'): ?>
|
||||||
<div class="alert alert-info alert-dismissible fade show" role="alert">
|
<div class="alert alert-info alert-dismissible fade show" role="alert">
|
||||||
Abwesenheitsmodus aktiv.
|
Abwesenheitsmodus aktiv.
|
||||||
@@ -289,10 +289,6 @@ $german_weekdays = [
|
|||||||
<?php unset($_SESSION['error_message']); ?>
|
<?php unset($_SESSION['error_message']); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<div class="text-center mb-4">
|
|
||||||
<h2 class="fw-bold">Farbe des nächsten Treffens</h2>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php if ($row): ?>
|
<?php if ($row): ?>
|
||||||
<?php
|
<?php
|
||||||
$english_weekday = date('D', strtotime($row['meeting_date']));
|
$english_weekday = date('D', strtotime($row['meeting_date']));
|
||||||
@@ -303,13 +299,11 @@ $german_weekdays = [
|
|||||||
$color_row = mysqli_fetch_assoc(mysqli_stmt_get_result($color_stmt));
|
$color_row = mysqli_fetch_assoc(mysqli_stmt_get_result($color_stmt));
|
||||||
?>
|
?>
|
||||||
<div class="card mx-auto bg-light shadow mb-4" style="max-width: 500px;">
|
<div class="card mx-auto bg-light shadow mb-4" style="max-width: 500px;">
|
||||||
|
<div class="card-header bg-primary-subtle text-secondary d-flex justify-content-between align-items-center">
|
||||||
|
<h4 class="mb-0">nächstes Treffens</h4>
|
||||||
|
</div>
|
||||||
<div class="card-body text-center">
|
<div class="card-body text-center">
|
||||||
<div class="rounded-4 mb-3 mx-auto d-flex flex-column justify-content-center align-items-center color-box" style="background-image: linear-gradient(135deg, <?= htmlspecialchars($color_row['hex_code']) ?>, <?= darken_color($color_row['hex_code']) ?>);">
|
<p class="text-muted h3 fw-bold mb-2"><?= $german_weekday . ' ' . date('d.m.Y H:i', strtotime($row['meeting_date'])) . " Uhr" ?></p>
|
||||||
<p class="fs-5 fw-semibold m-0" style="color: <?= get_readable_text_color($color_row['hex_code']) ?>;"><?= htmlspecialchars($color_row['name']) ?></p>
|
|
||||||
<p class="fs-6 fw-normal m-0" style="color: <?= get_readable_text_color($color_row['hex_code']) ?>;"><?= htmlspecialchars($row['reason']) ?></p>
|
|
||||||
</div>
|
|
||||||
<p class="text-muted">nächster Termin:</p>
|
|
||||||
<p class="text-muted h3 fw-bold mb-2"><?= $german_weekday . ' ' . date('d.m.Y H:i', strtotime($row['meeting_date'])) ?></p>
|
|
||||||
<?php
|
<?php
|
||||||
$has_active_proposal = false;
|
$has_active_proposal = false;
|
||||||
if ($row) {
|
if ($row) {
|
||||||
@@ -331,55 +325,66 @@ $german_weekdays = [
|
|||||||
Dein Terminverschiebungsvorschlag befindet sich noch in der Abstimmung.
|
Dein Terminverschiebungsvorschlag befindet sich noch in der Abstimmung.
|
||||||
</div>
|
</div>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<button class="btn btn-sm btn-outline-primary" type="button" data-bs-toggle="collapse" data-bs-target="#rescheduleForm" aria-expanded="false" aria-controls="rescheduleForm">
|
<button class="btn btn-sm btn-outline-secondary mb-2" type="button" data-bs-toggle="collapse" data-bs-target="#rescheduleForm" aria-expanded="false" aria-controls="rescheduleForm">
|
||||||
Terminverschiebung vorschlagen
|
Terminverschiebung vorschlagen
|
||||||
</button>
|
</button>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- Verschiebungsformular -->
|
||||||
|
<div class="collapse" id="rescheduleForm">
|
||||||
|
<div class="card card-body bg-light mt-3 mx-auto" style="max-width: 90%;">
|
||||||
|
<h5>Anderen Termin vorschlagen</h5>
|
||||||
|
<form method="POST">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="new_date" class="form-label">Neuer Termin:</label>
|
||||||
|
<input type="datetime-local" class="form-control" id="new_date" name="new_date" value="<?= date('Y-m-d\TH:i', strtotime($row['meeting_date'])) ?>" required>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="reason" class="form-label">Grund/Bemerkung:</label>
|
||||||
|
<textarea class="form-control" id="reason" name="reason" rows="2" placeholder="Warum soll der Termin verschoben werden?"></textarea>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex gap-2">
|
||||||
|
<button type="submit" name="propose_reschedule" class="btn btn-sm btn-outline-primary">Vorschlag einreichen</button>
|
||||||
|
<button type="button" class="btn btn-sm btn-outline-secondary" data-bs-toggle="collapse" data-bs-target="#rescheduleForm">Abbrechen</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Verschiebungsformular -->
|
<!-- Horizontale Linie hier einfügen -->
|
||||||
<div class="collapse" id="rescheduleForm">
|
<hr class="my-2">
|
||||||
<div class="card card-body bg-light mt-3 mx-auto" style="max-width: 90%;">
|
|
||||||
<h5>Anderen Termin vorschlagen</h5>
|
<p class="text-muted">Farbe des Treffens:</p>
|
||||||
<form method="POST">
|
<div class="rounded-4 my-1 mx-auto d-flex flex-column justify-content-center align-items-center color-box" style="background-image: linear-gradient(135deg, <?= htmlspecialchars($color_row['hex_code']) ?>, <?= darken_color($color_row['hex_code']) ?>);">
|
||||||
<div class="mb-3">
|
<p class="fs-5 fw-semibold m-0" style="color: <?= get_readable_text_color($color_row['hex_code']) ?>;"><?= htmlspecialchars($color_row['name']) ?></p>
|
||||||
<label for="new_date" class="form-label">Neuer Termin:</label>
|
<p class="fs-6 fw-normal m-0" style="color: <?= get_readable_text_color($color_row['hex_code']) ?>;"><?= htmlspecialchars($row['reason']) ?></p>
|
||||||
<input type="datetime-local" class="form-control" id="new_date" name="new_date" value="<?= date('Y-m-d\TH:i', strtotime($row['meeting_date'])) ?>" required>
|
|
||||||
</div>
|
|
||||||
<div class="mb-3">
|
|
||||||
<label for="reason" class="form-label">Grund/Bemerkung:</label>
|
|
||||||
<textarea class="form-control" id="reason" name="reason" rows="2" placeholder="Warum soll der Termin verschoben werden?"></textarea>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex gap-2">
|
|
||||||
<button type="submit" name="propose_reschedule" class="btn btn-sm btn-outline-primary">Vorschlag einreichen</button>
|
|
||||||
<button type="button" class="btn btn-sm btn-outline-secondary" data-bs-toggle="collapse" data-bs-target="#rescheduleForm">Abbrechen</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="d-flex justify-content-center pt-2 pb-3" style="max-width: 500px; margin-left: auto; margin-right: auto; flex-direction: column; align-items: center;">
|
<!-- Horizontale Linie hier einfügen -->
|
||||||
|
<hr class="my-1">
|
||||||
|
|
||||||
|
<div class="d-flex justify-content-center py-2" style="max-width: 500px; margin-left: auto; margin-right: auto; flex-direction: column; align-items: center;">
|
||||||
<?php if ($user_attendance_status === 'accepted'): ?>
|
<?php if ($user_attendance_status === 'accepted'): ?>
|
||||||
<p class="text-success fw-bold mb-4">Du hast zugesagt!</p>
|
<p class="text-success fw-bold mb-3">Du hast zugesagt!</p>
|
||||||
<div class="d-flex justify-content-center">
|
<div class="d-flex justify-content-center">
|
||||||
<a href="index.php?action=decline&meeting_id=<?= htmlspecialchars($meeting_id); ?>" class="btn btn-sm btn-outline-danger me-2">Absagen</a>
|
<a href="index.php?action=decline&meeting_id=<?= htmlspecialchars($meeting_id); ?>" class="btn btn-sm btn-outline-danger me-2">Absagen</a>
|
||||||
<a href="index.php?action=maybe&meeting_id=<?= htmlspecialchars($meeting_id); ?>" class="btn btn-sm btn-outline-info">noch unklar</a>
|
<a href="index.php?action=maybe&meeting_id=<?= htmlspecialchars($meeting_id); ?>" class="btn btn-sm btn-outline-info">noch unklar</a>
|
||||||
</div>
|
</div>
|
||||||
<?php elseif ($user_attendance_status === 'declined'): ?>
|
<?php elseif ($user_attendance_status === 'declined'): ?>
|
||||||
<p class="text-danger fw-bold mb-4">Du hast abgesagt!</p>
|
<p class="text-danger fw-bold mb-3">Du hast abgesagt!</p>
|
||||||
<div class="d-flex justify-content-center">
|
<div class="d-flex justify-content-center">
|
||||||
<a href="index.php?action=accept&meeting_id=<?= htmlspecialchars($meeting_id); ?>" class="btn btn-sm btn-outline-success me-2">Zusagen</a>
|
<a href="index.php?action=accept&meeting_id=<?= htmlspecialchars($meeting_id); ?>" class="btn btn-sm btn-outline-success me-2">Zusagen</a>
|
||||||
<a href="index.php?action=maybe&meeting_id=<?= htmlspecialchars($meeting_id); ?>" class="btn btn-sm btn-outline-info">noch unklar</a>
|
<a href="index.php?action=maybe&meeting_id=<?= htmlspecialchars($meeting_id); ?>" class="btn btn-sm btn-outline-info">noch unklar</a>
|
||||||
</div>
|
</div>
|
||||||
<?php elseif ($user_attendance_status === 'maybe'): ?>
|
<?php elseif ($user_attendance_status === 'maybe'): ?>
|
||||||
<p class="text-muted fw-bold mb-4">Vielleicht dabei!</p>
|
<p class="text-muted fw-bold mb-3">Vielleicht dabei!</p>
|
||||||
<div class="d-flex justify-content-center">
|
<div class="d-flex justify-content-center">
|
||||||
<a href="index.php?action=accept&meeting_id=<?= htmlspecialchars($meeting_id); ?>" class="btn btn-sm btn-outline-success me-2">Zusagen</a>
|
<a href="index.php?action=accept&meeting_id=<?= htmlspecialchars($meeting_id); ?>" class="btn btn-sm btn-outline-success me-2">Zusagen</a>
|
||||||
<a href="index.php?action=decline&meeting_id=<?= htmlspecialchars($meeting_id); ?>" class="btn btn-sm btn-outline-danger">Absagen</a>
|
<a href="index.php?action=decline&meeting_id=<?= htmlspecialchars($meeting_id); ?>" class="btn btn-sm btn-outline-danger">Absagen</a>
|
||||||
</div>
|
</div>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<p class="text-muted fw-bold mb-4">Bist du dabei?</p>
|
<p class="text-muted fw-bold mb-3">Bist du dabei?</p>
|
||||||
<div class="d-flex justify-content-center">
|
<div class="d-flex justify-content-center">
|
||||||
<a href="index.php?action=accept&meeting_id=<?= htmlspecialchars($meeting_id); ?>" class="btn btn-sm btn-outline-success me-2">Zusagen</a>
|
<a href="index.php?action=accept&meeting_id=<?= htmlspecialchars($meeting_id); ?>" class="btn btn-sm btn-outline-success me-2">Zusagen</a>
|
||||||
<a href="index.php?action=decline&meeting_id=<?= htmlspecialchars($meeting_id); ?>" class="btn btn-sm btn-outline-danger me-2">Absagen</a>
|
<a href="index.php?action=decline&meeting_id=<?= htmlspecialchars($meeting_id); ?>" class="btn btn-sm btn-outline-danger me-2">Absagen</a>
|
||||||
@@ -388,6 +393,9 @@ $german_weekdays = [
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Horizontale Linie hier einfügen -->
|
||||||
|
<hr class="my-1">
|
||||||
|
|
||||||
<?php if ($next_payer_username): ?>
|
<?php if ($next_payer_username): ?>
|
||||||
<div class="text-center my-2 mx-auto" style="max-width: 500px; border-radius: 0.5rem;">
|
<div class="text-center my-2 mx-auto" style="max-width: 500px; border-radius: 0.5rem;">
|
||||||
<p class="fw-bold mb-1">Rechnung wird bezahlt von:</p>
|
<p class="fw-bold mb-1">Rechnung wird bezahlt von:</p>
|
||||||
@@ -395,7 +403,7 @@ $german_weekdays = [
|
|||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<div class="d-flex justify-content-center my-3" style="max-width: 500px; margin-left: auto; margin-right: auto;">
|
<div class="d-flex justify-content-center my-1" style="max-width: 500px; margin-left: auto; margin-right: auto;">
|
||||||
<a href="participant.php?id=<?= htmlspecialchars($row['id']) ?>" class="btn btn-sm btn-outline-secondary">Teilnahme eintragen</a>
|
<a href="participant.php?id=<?= htmlspecialchars($row['id']) ?>" class="btn btn-sm btn-outline-secondary">Teilnahme eintragen</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ require_once 'inc/header.php';
|
|||||||
<h2 class="mb-4">Kasse & Auswertung</h2>
|
<h2 class="mb-4">Kasse & Auswertung</h2>
|
||||||
|
|
||||||
<div class="card shadow mb-4">
|
<div class="card shadow mb-4">
|
||||||
<div class="card-header bg-danger-subtle text-danger">
|
<div class="card-header bg-primary-subtle text-secondary">
|
||||||
<h4 class="mb-0">Strafen seit letztem Abschluss</h4>
|
<h4 class="mb-0">Strafen seit letztem Abschluss</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
@@ -108,7 +108,7 @@ require_once 'inc/header.php';
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card shadow mb-4">
|
<div class="card shadow mb-4">
|
||||||
<div class="card-header bg-success-subtle text-success">
|
<div class="card-header bg-primary-subtle text-secondary">
|
||||||
<h4 class="mb-0">Rechnungen</h4>
|
<h4 class="mb-0">Rechnungen</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ require_once 'inc/header.php';
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<div class="card shadow">
|
<div class="card shadow">
|
||||||
<div class="card-header bg-secondary bg-opacity-50 text-secondary d-flex justify-content-between align-items-center">
|
<div class="card-header bg-primary-subtle text-secondary d-flex justify-content-between align-items-center">
|
||||||
<h4 class="mb-0">Anstehende Termine</h4>
|
<h4 class="mb-0">Anstehende Termine</h4>
|
||||||
<?php if ($is_admin): ?>
|
<?php if ($is_admin): ?>
|
||||||
<a class="btn btn-sm d-flex align-items-center justify-content-center" data-bs-toggle="collapse" href="#planningFormCollapse" role="button" aria-expanded="false" aria-controls="planningFormCollapse">Add
|
<a class="btn btn-sm d-flex align-items-center justify-content-center" data-bs-toggle="collapse" href="#planningFormCollapse" role="button" aria-expanded="false" aria-controls="planningFormCollapse">Add
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ require_once 'inc/header.php';
|
|||||||
<h2 class="mb-4">Statistiken & Ranking</h2>
|
<h2 class="mb-4">Statistiken & Ranking</h2>
|
||||||
|
|
||||||
<div class="card shadow mb-4">
|
<div class="card shadow mb-4">
|
||||||
<div class="card-header bg-secondary bg-opacity-50 text-muted">
|
<div class="card-header bg-primary-subtle text-secondary">
|
||||||
<h4 class="mb-0">Gesamt-Statistiken</h4>
|
<h4 class="mb-0">Gesamt-Statistiken</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ require_once 'inc/header.php';
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<div class="card shadow">
|
<div class="card shadow">
|
||||||
<div class="card-header bg-secondary bg-opacity-50 text-secondary d-flex justify-content-between align-items-center">
|
<div class="card-header bg-primary-subtle text-secondary d-flex justify-content-between align-items-center">
|
||||||
<h4 class="mb-0">Mitglieder</h4>
|
<h4 class="mb-0">Mitglieder</h4>
|
||||||
<?php if ($is_admin): ?>
|
<?php if ($is_admin): ?>
|
||||||
<a class="btn btn-sm d-flex align-items-center justify-content-center" data-bs-toggle="collapse" href="#userFormCollapse" role="button" aria-expanded="false" aria-controls="userFormCollapse">Add
|
<a class="btn btn-sm d-flex align-items-center justify-content-center" data-bs-toggle="collapse" href="#userFormCollapse" role="button" aria-expanded="false" aria-controls="userFormCollapse">Add
|
||||||
|
|||||||
60
version.php
60
version.php
@@ -38,7 +38,7 @@ if ($is_admin) {
|
|||||||
if (isset($_GET['action']) && $_GET['action'] === 'publish' && isset($_GET['id'])) {
|
if (isset($_GET['action']) && $_GET['action'] === 'publish' && isset($_GET['id'])) {
|
||||||
$id = (int)$_GET['id'];
|
$id = (int)$_GET['id'];
|
||||||
|
|
||||||
$stmt_data = mysqli_prepare($conn, "SELECT version, release_date, features, bugfixes FROM releases WHERE id = ?");
|
$stmt_data = mysqli_prepare($conn, "SELECT version, release_date, features, bugfixes, improvements FROM releases WHERE id = ?");
|
||||||
mysqli_stmt_bind_param($stmt_data, "i", $id);
|
mysqli_stmt_bind_param($stmt_data, "i", $id);
|
||||||
mysqli_stmt_execute($stmt_data);
|
mysqli_stmt_execute($stmt_data);
|
||||||
$release_data = mysqli_fetch_assoc(mysqli_stmt_get_result($stmt_data));
|
$release_data = mysqli_fetch_assoc(mysqli_stmt_get_result($stmt_data));
|
||||||
@@ -57,7 +57,6 @@ if ($is_admin) {
|
|||||||
mysqli_stmt_close($stmt);
|
mysqli_stmt_close($stmt);
|
||||||
|
|
||||||
if ($success) {
|
if ($success) {
|
||||||
// 🔹 Sende E-Mail an alle Benutzer mit gültiger E-Mail
|
|
||||||
$all_users = get_all_user_emails($conn);
|
$all_users = get_all_user_emails($conn);
|
||||||
|
|
||||||
if (!empty($all_users) && file_exists(__DIR__ . '/vendor/autoload.php')) {
|
if (!empty($all_users) && file_exists(__DIR__ . '/vendor/autoload.php')) {
|
||||||
@@ -70,6 +69,7 @@ if ($is_admin) {
|
|||||||
|
|
||||||
$features = array_filter(array_map('trim', explode("\n", $release_data['features'] ?? '')));
|
$features = array_filter(array_map('trim', explode("\n", $release_data['features'] ?? '')));
|
||||||
$bugs = array_filter(array_map('trim', explode("\n", $release_data['bugfixes'] ?? '')));
|
$bugs = array_filter(array_map('trim', explode("\n", $release_data['bugfixes'] ?? '')));
|
||||||
|
$improvements = array_filter(array_map('trim', explode("\n", $release_data['improvements'] ?? '')));
|
||||||
|
|
||||||
foreach ($all_users as $user) {
|
foreach ($all_users as $user) {
|
||||||
$recipient_email = $user['email'];
|
$recipient_email = $user['email'];
|
||||||
@@ -101,6 +101,13 @@ if ($is_admin) {
|
|||||||
}
|
}
|
||||||
$text_body .= "\n";
|
$text_body .= "\n";
|
||||||
}
|
}
|
||||||
|
if (!empty($improvements)) {
|
||||||
|
$text_body .= "Verbesserungen:\n";
|
||||||
|
foreach ($improvements as $i) {
|
||||||
|
$text_body .= "- " . strip_tags(parse_formatting($i)) . "\n";
|
||||||
|
}
|
||||||
|
$text_body .= "\n";
|
||||||
|
}
|
||||||
if (!empty($bugs)) {
|
if (!empty($bugs)) {
|
||||||
$text_body .= "Behobene Fehler:\n";
|
$text_body .= "Behobene Fehler:\n";
|
||||||
foreach ($bugs as $b) {
|
foreach ($bugs as $b) {
|
||||||
@@ -122,6 +129,15 @@ if ($is_admin) {
|
|||||||
$html_features .= "</ul>\n";
|
$html_features .= "</ul>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$html_improvements = '';
|
||||||
|
if (!empty($improvements)) {
|
||||||
|
$html_improvements .= "<p style=\"margin: 0.5em 0;\"><strong>Verbesserungen:</strong></p>\n<ul style=\"margin-top: 0.5em; margin-bottom: 0.5em;\">";
|
||||||
|
foreach ($improvements as $i) {
|
||||||
|
$html_improvements .= "<li>" . parse_formatting($i) . "</li>\n";
|
||||||
|
}
|
||||||
|
$html_improvements .= "</ul>\n";
|
||||||
|
}
|
||||||
|
|
||||||
$html_bugs = '';
|
$html_bugs = '';
|
||||||
if (!empty($bugs)) {
|
if (!empty($bugs)) {
|
||||||
$html_bugs .= "<p style=\"margin: 0.5em 0;\"><strong>Behobene Fehler:</strong></p>\n<ul style=\"margin-top: 0.5em; margin-bottom: 0.5em;\">";
|
$html_bugs .= "<p style=\"margin: 0.5em 0;\"><strong>Behobene Fehler:</strong></p>\n<ul style=\"margin-top: 0.5em; margin-bottom: 0.5em;\">";
|
||||||
@@ -141,6 +157,7 @@ if ($is_admin) {
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
$html_features
|
$html_features
|
||||||
|
$html_improvements
|
||||||
$html_bugs
|
$html_bugs
|
||||||
<p><a href=\"$app_url\" style=\"color: #0d6efd; text-decoration: none;\">Direkt zur App</a></p>
|
<p><a href=\"$app_url\" style=\"color: #0d6efd; text-decoration: none;\">Direkt zur App</a></p>
|
||||||
<p><em>Dein DoMiLi-Admin</em></p>
|
<p><em>Dein DoMiLi-Admin</em></p>
|
||||||
@@ -186,7 +203,7 @@ if ($is_admin) {
|
|||||||
|
|
||||||
if (isset($_GET['action']) && $_GET['action'] === 'edit' && isset($_GET['id'])) {
|
if (isset($_GET['action']) && $_GET['action'] === 'edit' && isset($_GET['id'])) {
|
||||||
$id = (int)$_GET['id'];
|
$id = (int)$_GET['id'];
|
||||||
$stmt = mysqli_prepare($conn, "SELECT id, version, release_date, features, bugfixes, is_draft FROM releases WHERE id = ?");
|
$stmt = mysqli_prepare($conn, "SELECT id, version, release_date, features, bugfixes, improvements, is_draft FROM releases WHERE id = ?");
|
||||||
mysqli_stmt_bind_param($stmt, "i", $id);
|
mysqli_stmt_bind_param($stmt, "i", $id);
|
||||||
mysqli_stmt_execute($stmt);
|
mysqli_stmt_execute($stmt);
|
||||||
$edit_release = mysqli_fetch_assoc(mysqli_stmt_get_result($stmt));
|
$edit_release = mysqli_fetch_assoc(mysqli_stmt_get_result($stmt));
|
||||||
@@ -203,6 +220,7 @@ if ($is_admin) {
|
|||||||
$date = trim($_POST['date'] ?? '');
|
$date = trim($_POST['date'] ?? '');
|
||||||
$features = trim($_POST['features'] ?? '');
|
$features = trim($_POST['features'] ?? '');
|
||||||
$bugfixes = trim($_POST['bugfixes'] ?? '');
|
$bugfixes = trim($_POST['bugfixes'] ?? '');
|
||||||
|
$improvements = trim($_POST['improvements'] ?? '');
|
||||||
$id = !empty($_POST['id']) ? (int)$_POST['id'] : null;
|
$id = !empty($_POST['id']) ? (int)$_POST['id'] : null;
|
||||||
|
|
||||||
if (empty($version) || empty($date)) {
|
if (empty($version) || empty($date)) {
|
||||||
@@ -216,11 +234,11 @@ if ($is_admin) {
|
|||||||
$_SESSION['message_type'] = 'danger';
|
$_SESSION['message_type'] = 'danger';
|
||||||
} else {
|
} else {
|
||||||
if ($id) {
|
if ($id) {
|
||||||
$stmt = mysqli_prepare($conn, "UPDATE releases SET version = ?, release_date = ?, features = ?, bugfixes = ? WHERE id = ?");
|
$stmt = mysqli_prepare($conn, "UPDATE releases SET version = ?, release_date = ?, features = ?, bugfixes = ?, improvements = ? WHERE id = ?");
|
||||||
mysqli_stmt_bind_param($stmt, "ssssi", $version, $date, $features, $bugfixes, $id);
|
mysqli_stmt_bind_param($stmt, "sssssi", $version, $date, $features, $bugfixes, $improvements, $id);
|
||||||
} else {
|
} else {
|
||||||
$stmt = mysqli_prepare($conn, "INSERT INTO releases (version, release_date, features, bugfixes, is_draft) VALUES (?, ?, ?, ?, 1)");
|
$stmt = mysqli_prepare($conn, "INSERT INTO releases (version, release_date, features, bugfixes, improvements, is_draft) VALUES (?, ?, ?, ?, ?, 1)");
|
||||||
mysqli_stmt_bind_param($stmt, "ssss", $version, $date, $features, $bugfixes);
|
mysqli_stmt_bind_param($stmt, "sssss", $version, $date, $features, $bugfixes, $improvements);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mysqli_stmt_execute($stmt)) {
|
if (mysqli_stmt_execute($stmt)) {
|
||||||
@@ -245,15 +263,16 @@ if (isset($_SESSION['message'])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($is_admin) {
|
if ($is_admin) {
|
||||||
$result = mysqli_query($conn, "SELECT id, version, release_date, features, bugfixes, is_draft FROM releases ORDER BY release_date DESC, id DESC");
|
$result = mysqli_query($conn, "SELECT id, version, release_date, features, bugfixes, improvements, is_draft FROM releases ORDER BY release_date DESC, id DESC");
|
||||||
} else {
|
} else {
|
||||||
$result = mysqli_query($conn, "SELECT id, version, release_date, features, bugfixes FROM releases WHERE is_draft = 0 ORDER BY release_date DESC, id DESC");
|
$result = mysqli_query($conn, "SELECT id, version, release_date, features, bugfixes, improvements FROM releases WHERE is_draft = 0 ORDER BY release_date DESC, id DESC");
|
||||||
}
|
}
|
||||||
|
|
||||||
$releases = [];
|
$releases = [];
|
||||||
while ($row = mysqli_fetch_assoc($result)) {
|
while ($row = mysqli_fetch_assoc($result)) {
|
||||||
$row['features_list'] = array_filter(array_map('trim', explode("\n", $row['features'] ?? '')));
|
$row['features_list'] = array_filter(array_map('trim', explode("\n", $row['features'] ?? '')));
|
||||||
$row['bugfixes_list'] = array_filter(array_map('trim', explode("\n", $row['bugfixes'] ?? '')));
|
$row['bugfixes_list'] = array_filter(array_map('trim', explode("\n", $row['bugfixes'] ?? '')));
|
||||||
|
$row['improvements_list'] = array_filter(array_map('trim', explode("\n", $row['improvements'] ?? '')));
|
||||||
$releases[] = $row;
|
$releases[] = $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -278,10 +297,10 @@ require_once('inc/header.php');
|
|||||||
|
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-lg-8">
|
<div class="col-lg-8">
|
||||||
<h2 class="mb-4">ℹ️ Info & Versionshinweise</h2>
|
<h2 class="mb-4">📋 Versionsübersicht</h2>
|
||||||
|
|
||||||
<div class="card shadow">
|
<div class="card shadow">
|
||||||
<div class="card-header bg-secondary bg-opacity-50 text-secondary d-flex justify-content-between align-items-center">
|
<div class="card-header bg-primary-subtle text-secondary d-flex justify-content-between align-items-center">
|
||||||
<h4 class="mb-0">Release Notes</h4>
|
<h4 class="mb-0">Release Notes</h4>
|
||||||
<?php if ($is_admin): ?>
|
<?php if ($is_admin): ?>
|
||||||
<a class="btn btn-sm d-flex align-items-center justify-content-center" data-bs-toggle="collapse" href="#releaseFormCollapse" role="button" aria-expanded="false" aria-controls="releaseFormCollapse">Add
|
<a class="btn btn-sm d-flex align-items-center justify-content-center" data-bs-toggle="collapse" href="#releaseFormCollapse" role="button" aria-expanded="false" aria-controls="releaseFormCollapse">Add
|
||||||
@@ -314,6 +333,12 @@ require_once('inc/header.php');
|
|||||||
</label>
|
</label>
|
||||||
<textarea class="form-control" name="features" rows="4"><?= htmlspecialchars($edit_release['features'] ?? '') ?></textarea>
|
<textarea class="form-control" name="features" rows="4"><?= htmlspecialchars($edit_release['features'] ?? '') ?></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="form-label">Verbesserungen (ein Punkt pro Zeile)<br>
|
||||||
|
<small class="text-muted">Verwende [b]fett[/b] oder [i]kursiv[/i] für Hervorhebungen.</small>
|
||||||
|
</label>
|
||||||
|
<textarea class="form-control" name="improvements" rows="4"><?= htmlspecialchars($edit_release['improvements'] ?? '') ?></textarea>
|
||||||
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label">Behobene Fehler (ein Punkt pro Zeile)<br>
|
<label class="form-label">Behobene Fehler (ein Punkt pro Zeile)<br>
|
||||||
<small class="text-muted">Verwende [b]fett[/b] oder [i]kursiv[/i] für Hervorhebungen.</small>
|
<small class="text-muted">Verwende [b]fett[/b] oder [i]kursiv[/i] für Hervorhebungen.</small>
|
||||||
@@ -338,9 +363,9 @@ require_once('inc/header.php');
|
|||||||
<h5 class="mt-4 mb-1">
|
<h5 class="mt-4 mb-1">
|
||||||
<?= htmlspecialchars($release['version']) ?>
|
<?= htmlspecialchars($release['version']) ?>
|
||||||
<?php if (($release['is_draft'] ?? 0) == 1): ?>
|
<?php if (($release['is_draft'] ?? 0) == 1): ?>
|
||||||
<span class="badge bg-warning text-dark ms-1">Entwurf</span>
|
<span class="badge bg-warning text-dark ms-1" style="font-size: 0.65em; font-weight: normal; padding: 0.2em 0.4em;">Entwurf</span>
|
||||||
<?php elseif ($release['version'] === $latest_published_version): ?>
|
<?php elseif ($release['version'] === $latest_published_version): ?>
|
||||||
<span class="badge bg-success ms-1">aktuelle Version</span>
|
<span class="badge bg-white text-primary border border-primary ms-1" style="font-size: 0.65em; font-weight: normal; padding: 0.15em 0.3em; position: relative; top: -0.7px;">aktuelle Version</span>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</h5>
|
</h5>
|
||||||
<p class="text-muted small mb-3">Veröffentlicht am: <?= date('d.m.Y', strtotime($release['release_date'])) ?></p>
|
<p class="text-muted small mb-3">Veröffentlicht am: <?= date('d.m.Y', strtotime($release['release_date'])) ?></p>
|
||||||
@@ -354,6 +379,15 @@ require_once('inc/header.php');
|
|||||||
</ul>
|
</ul>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if (!empty($release['improvements_list'])): ?>
|
||||||
|
<p class="small text-info mb-1"><strong>Verbesserungen:</strong></p>
|
||||||
|
<ul class="mb-3">
|
||||||
|
<?php foreach ($release['improvements_list'] as $i): ?>
|
||||||
|
<li><?= parse_formatting($i) ?></li>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</ul>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if (!empty($release['bugfixes_list'])): ?>
|
<?php if (!empty($release['bugfixes_list'])): ?>
|
||||||
<p class="small text-danger mb-1"><strong>Behobene Fehler:</strong></p>
|
<p class="small text-danger mb-1"><strong>Behobene Fehler:</strong></p>
|
||||||
<ul class="mb-3">
|
<ul class="mb-3">
|
||||||
|
|||||||
Reference in New Issue
Block a user