meeting.php in history.php umbenannt
This commit is contained in:
223
history.php
Executable file
223
history.php
Executable file
@@ -0,0 +1,223 @@
|
|||||||
|
<?php
|
||||||
|
// PHP-Logik muss VOR dem HTML kommen!
|
||||||
|
include('inc/check_login.php');
|
||||||
|
include('inc/db.php');
|
||||||
|
include('inc/helpers.php');
|
||||||
|
|
||||||
|
// PHP-Logik für die Löschfunktion
|
||||||
|
if (isset($_GET['action']) && $_GET['action'] == 'delete' && isset($_GET['id'])) {
|
||||||
|
$id = $_GET['id'];
|
||||||
|
$stmt = mysqli_prepare($conn, "DELETE FROM meetings WHERE id = ?");
|
||||||
|
mysqli_stmt_bind_param($stmt, "i", $id);
|
||||||
|
if (mysqli_stmt_execute($stmt)) {
|
||||||
|
// Erfolgreiche Weiterleitung
|
||||||
|
header("Location: history.php?status=deleted");
|
||||||
|
exit;
|
||||||
|
} else {
|
||||||
|
// Fehler-Meldung, falls etwas schiefgeht
|
||||||
|
$error_message = "Fehler beim Löschen des Termins.";
|
||||||
|
}
|
||||||
|
mysqli_stmt_close($stmt);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Funktion zum Abrufen aller Meeting-Details
|
||||||
|
function get_all_meeting_details($conn)
|
||||||
|
{
|
||||||
|
$sql = "
|
||||||
|
SELECT
|
||||||
|
m.id AS meeting_id,
|
||||||
|
m.meeting_date,
|
||||||
|
m.reason,
|
||||||
|
c.name AS color_name,
|
||||||
|
c.hex_code,
|
||||||
|
u.username,
|
||||||
|
mt.attended,
|
||||||
|
mt.wore_color,
|
||||||
|
mt.paid
|
||||||
|
FROM meetings m
|
||||||
|
JOIN colors c ON m.color_id = c.id
|
||||||
|
LEFT JOIN meeting_teilnehmer mt ON m.id = mt.meeting_id
|
||||||
|
LEFT JOIN users u ON mt.user_id = u.id
|
||||||
|
WHERE m.meeting_date < CURDATE()
|
||||||
|
ORDER BY m.meeting_date DESC, u.username ASC
|
||||||
|
";
|
||||||
|
|
||||||
|
$result = mysqli_query($conn, $sql);
|
||||||
|
|
||||||
|
if (!$result) {
|
||||||
|
die("Fehler in der SQL-Abfrage: " . mysqli_error($conn));
|
||||||
|
}
|
||||||
|
|
||||||
|
$meetings = [];
|
||||||
|
while ($row = mysqli_fetch_assoc($result)) {
|
||||||
|
$meeting_id = $row['meeting_id'];
|
||||||
|
|
||||||
|
if (!isset($meetings[$meeting_id])) {
|
||||||
|
$meetings[$meeting_id] = [
|
||||||
|
'date' => $row['meeting_date'],
|
||||||
|
'reason' => $row['reason'],
|
||||||
|
'color_name' => $row['color_name'],
|
||||||
|
'hex_code' => $row['hex_code'],
|
||||||
|
'participants' => []
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($row['username']) {
|
||||||
|
$meetings[$meeting_id]['participants'][] = [
|
||||||
|
'username' => $row['username'],
|
||||||
|
'attended' => $row['attended'],
|
||||||
|
'wore_color' => $row['wore_color'],
|
||||||
|
'paid' => $row['paid']
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $meetings;
|
||||||
|
}
|
||||||
|
|
||||||
|
// PHP-Logik zur Verarbeitung des Formulars
|
||||||
|
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['submit_meeting'])) {
|
||||||
|
$meeting_date = $_POST['meeting_date'];
|
||||||
|
$reason = $_POST['reason'];
|
||||||
|
$color_id = $_POST['color_id'];
|
||||||
|
|
||||||
|
if (!empty($meeting_date) && !empty($color_id)) {
|
||||||
|
$stmt = mysqli_prepare($conn, "INSERT INTO meetings (meeting_date, reason, color_id) VALUES (?, ?, ?)");
|
||||||
|
mysqli_stmt_bind_param($stmt, "ssi", $meeting_date, $reason, $color_id);
|
||||||
|
|
||||||
|
if (mysqli_stmt_execute($stmt)) {
|
||||||
|
header("Location: history.php?status=success");
|
||||||
|
exit;
|
||||||
|
} else {
|
||||||
|
$error_message = "Fehler beim Hinzufügen des Treffens: " . mysqli_error($conn);
|
||||||
|
}
|
||||||
|
mysqli_stmt_close($stmt);
|
||||||
|
} else {
|
||||||
|
$error_message = "Datum und Farbe sind Pflichtfelder.";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Farben für das Formular abrufen
|
||||||
|
$colors_result = mysqli_query($conn, "SELECT id, name, hex_code FROM colors ORDER BY name");
|
||||||
|
$colors = mysqli_fetch_all($colors_result, MYSQLI_ASSOC);
|
||||||
|
|
||||||
|
// Hier wird die Funktion aufgerufen, nachdem sie definiert wurde
|
||||||
|
$all_meetings = get_all_meeting_details($conn);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// Erst jetzt wird der Header inkludiert und HTML gesendet
|
||||||
|
include('inc/header.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="container mt-5">
|
||||||
|
<div class="collapse mt-3" id="addMeetingForm">
|
||||||
|
<div class="card shadow mb-4">
|
||||||
|
<div class="card-body">
|
||||||
|
<?php if (isset($_GET['status']) && $_GET['status'] == 'success'): ?>
|
||||||
|
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
||||||
|
Treffen erfolgreich hinzugefügt.
|
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
<?php elseif (isset($_GET['status']) && $_GET['status'] == 'deleted'): ?>
|
||||||
|
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
||||||
|
Treffen erfolgreich gelöscht.
|
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
<?php elseif (isset($error_message)): ?>
|
||||||
|
<div class="alert alert-danger" role="alert">
|
||||||
|
<?= $error_message ?>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<form action="history.php" method="POST">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4 mb-3">
|
||||||
|
<label for="meeting_date" class="form-label">Datum des Treffens</label>
|
||||||
|
<input type="date" class="form-control" id="meeting_date" name="meeting_date" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4 mb-3">
|
||||||
|
<label for="color_id" class="form-label">Farbvorgabe</label>
|
||||||
|
<select class="form-select" id="color_id" name="color_id" required>
|
||||||
|
<option value="">Wähle eine Farbe...</option>
|
||||||
|
<?php foreach ($colors as $color): ?>
|
||||||
|
<option value="<?= $color['id'] ?>"><?= htmlspecialchars($color['name']) ?></option>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4 mb-3">
|
||||||
|
<label for="reason" class="form-label">Grund (optional)</label>
|
||||||
|
<input type="text" class="form-control" id="reason" name="reason">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button type="submit" name="submit_meeting" class="btn btn-primary">Treffen hinzufügen</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr class="mt-4 mb-4">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||||
|
<h2>Termin-History</h2>
|
||||||
|
<a class="btn btn-sm btn-outline-primary" data-bs-toggle="collapse" href="#addMeetingForm" role="button" aria-expanded="false" aria-controls="addMeetingForm">
|
||||||
|
<span class="material-symbols-outlined">add</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php if (empty($all_meetings)): ?>
|
||||||
|
<div class="alert alert-info text-center" role="alert">
|
||||||
|
Bisher wurden keine Treffen erfasst.
|
||||||
|
</div>
|
||||||
|
<?php else: ?>
|
||||||
|
<?php foreach ($all_meetings as $meeting_id => $meeting): ?>
|
||||||
|
<div class="card shadow mb-4">
|
||||||
|
<div class="card-header d-flex justify-content-between align-items-center" style="background-color: rgba(<?= hexToRgb($meeting['hex_code']) ?>, 0.25);">
|
||||||
|
<div class="mb-0 fs-6 fs-md-5 fw-bold" style="color: <?= get_readable_text_color($meeting['hex_code']) ?>;">
|
||||||
|
<span class="fw-normal me-2">am</span>
|
||||||
|
<?= date('d.m.y', strtotime($meeting['date'])) ?>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a href="admin/participant.php?id=<?= $meeting_id ?>" style="text-decoration: none; border: none; outline: none;">
|
||||||
|
<span class="material-symbols-outlined" style="color: <?= get_readable_text_color($meeting['hex_code']) ?>;">edit_calendar</span>
|
||||||
|
</a>
|
||||||
|
<a href="history.php?action=delete&id=<?= $meeting_id ?>" class="ms-1" style="text-decoration: none; border: none; outline: none;" onclick="return confirm('Möchtest du diesen Termin wirklich löschen?');">
|
||||||
|
<span class="material-symbols-outlined text-danger">delete_outline</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="d-flex flex-column text-muted fst-italic mb-2">
|
||||||
|
<span>Farbe: <span class="fw-bold"><?= htmlspecialchars($meeting['color_name']) ?></span></span>
|
||||||
|
<span>Grund: <?= htmlspecialchars($meeting['reason']) ?></span>
|
||||||
|
</div>
|
||||||
|
<h6 class="mb-2">Teilnehmer:</h6>
|
||||||
|
<?php if (empty($meeting['participants'])): ?>
|
||||||
|
<p class="text-muted">Noch keine Teilnehmer erfasst.</p>
|
||||||
|
<?php else: ?>
|
||||||
|
<ul class="list-unstyled">
|
||||||
|
<?php foreach ($meeting['participants'] as $participant): ?>
|
||||||
|
<li>
|
||||||
|
<?php
|
||||||
|
$status_icon = '❌';
|
||||||
|
$status_text = 'Nicht dabei';
|
||||||
|
if ($participant['attended']) {
|
||||||
|
$status_icon = $participant['wore_color'] ? '✅' : '🔴';
|
||||||
|
$status_text = $participant['wore_color'] ? 'Farbe getragen' : 'Falsche Farbe';
|
||||||
|
}
|
||||||
|
$paid_icon = $participant['paid'] ? '💰' : '';
|
||||||
|
?>
|
||||||
|
<?= $status_icon ?>
|
||||||
|
<span class="fw-bold"><?= htmlspecialchars($participant['username']) ?></span>
|
||||||
|
<?= $paid_icon ?>
|
||||||
|
<small class="text-muted ms-2"><?= $status_text ?></small>
|
||||||
|
</li>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</ul>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php include('inc/footer.php'); ?>
|
||||||
@@ -13,10 +13,10 @@
|
|||||||
<div class="collapse navbar-collapse" id="navbarNav">
|
<div class="collapse navbar-collapse" id="navbarNav">
|
||||||
<ul class="navbar-nav">
|
<ul class="navbar-nav">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link d-flex" href="../meeting.php"><span class="material-icons md-18 me-1">calendar_month</span>Termine</a>
|
<a class="nav-link d-flex" href="../history.php"><span class="material-icons md-18 me-1">calendar_month</span>History</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link d-flex" href="#"><span class="material-icons md-18 me-1">bar_chart</span>Auswertung</a>
|
<a class="nav-link d-flex" href="../stats.php"><span class="material-icons md-18 me-1">bar_chart</span>Auswertung</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link d-flex" href="#"><span class="material-icons md-18 me-1">message</span>Kontakt</a>
|
<a class="nav-link d-flex" href="#"><span class="material-icons md-18 me-1">message</span>Kontakt</a>
|
||||||
|
|||||||
215
meeting.php
215
meeting.php
@@ -1,215 +0,0 @@
|
|||||||
<?php
|
|
||||||
include('inc/check_login.php');
|
|
||||||
include('inc/db.php');
|
|
||||||
include('inc/header.php');
|
|
||||||
|
|
||||||
// Funktion zum Abrufen der Treffen für einen bestimmten Monat
|
|
||||||
function get_meetings_for_month($conn, $month, $year)
|
|
||||||
{
|
|
||||||
$sql = "SELECT meetings.id, meetings.meeting_date, meetings.color_id, colors.hex_code
|
|
||||||
FROM meetings
|
|
||||||
JOIN colors ON meetings.color_id = colors.id
|
|
||||||
WHERE YEAR(meeting_date) = ? AND MONTH(meeting_date) = ?";
|
|
||||||
|
|
||||||
$stmt = mysqli_prepare($conn, $sql);
|
|
||||||
|
|
||||||
if (!$stmt) {
|
|
||||||
error_log('Fehler bei der Abfragevorbereitung: ' . mysqli_error($conn));
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
mysqli_stmt_bind_param($stmt, "ii", $year, $month);
|
|
||||||
mysqli_stmt_execute($stmt);
|
|
||||||
$result = mysqli_stmt_get_result($stmt);
|
|
||||||
|
|
||||||
$meetings = [];
|
|
||||||
if ($result) {
|
|
||||||
while ($row = mysqli_fetch_assoc($result)) {
|
|
||||||
$day = date('j', strtotime($row['meeting_date']));
|
|
||||||
$meetings[$day] = $row;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
mysqli_stmt_close($stmt);
|
|
||||||
return $meetings;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Funktion zum Abrufen der Details für ein einzelnes Treffen
|
|
||||||
function get_meeting_details($conn, $meeting_id)
|
|
||||||
{
|
|
||||||
// TODO: Die Daten aus der Datenbank abrufen
|
|
||||||
// Aktuell nur Beispieldaten
|
|
||||||
$details = [
|
|
||||||
'meeting_date' => date('Y-m-d', strtotime('2025-08-13')),
|
|
||||||
'color_name' => 'Blau',
|
|
||||||
'hex_code' => '#0000FF',
|
|
||||||
'participants' => [
|
|
||||||
['name' => 'Max Mustermann', 'status' => 'correct'],
|
|
||||||
['name' => 'Erika Musterfrau', 'status' => 'fine'],
|
|
||||||
['name' => 'Hans Schmidt', 'status' => 'correct']
|
|
||||||
]
|
|
||||||
];
|
|
||||||
return $details;
|
|
||||||
}
|
|
||||||
|
|
||||||
function hexToRgb($hex)
|
|
||||||
{
|
|
||||||
// Entferne das führende #
|
|
||||||
$hex = ltrim($hex, '#');
|
|
||||||
|
|
||||||
// Falls 3-stellig, erweitere auf 6-stellig
|
|
||||||
if (strlen($hex) === 3) {
|
|
||||||
$hex = $hex[0] . $hex[0] .
|
|
||||||
$hex[1] . $hex[1] .
|
|
||||||
$hex[2] . $hex[2];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Falls nicht 6-stellig, gib einen Standardwert zurück
|
|
||||||
if (strlen($hex) !== 6) {
|
|
||||||
return '0, 0, 0'; // Fallback: Schwarz
|
|
||||||
}
|
|
||||||
|
|
||||||
// Umwandlung in RGB
|
|
||||||
$r = hexdec(substr($hex, 0, 2));
|
|
||||||
$g = hexdec(substr($hex, 2, 2));
|
|
||||||
$b = hexdec(substr($hex, 4, 2));
|
|
||||||
|
|
||||||
return "$r, $g, $b";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Wenn die Seite per AJAX aufgerufen wird, um Details zu laden
|
|
||||||
if (isset($_GET['meeting_id'])) {
|
|
||||||
$details = get_meeting_details($conn, $_GET['meeting_id']);
|
|
||||||
header('Content-Type: application/json');
|
|
||||||
echo json_encode($details);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Standard-Seitenansicht
|
|
||||||
$current_month = isset($_GET['month']) ? $_GET['month'] : date('m');
|
|
||||||
$current_year = isset($_GET['year']) ? $_GET['year'] : date('Y');
|
|
||||||
$meetings_in_month = get_meetings_for_month($conn, $current_month, $current_year);
|
|
||||||
$first_day_of_month = mktime(0, 0, 0, $current_month, 1, $current_year);
|
|
||||||
$number_of_days = date('t', $first_day_of_month);
|
|
||||||
$day_of_week = date('N', $first_day_of_month); // 1 = Montag, 7 = Sonntag
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="container pb-3">
|
|
||||||
<div class="row justify-content-center mb-5">
|
|
||||||
<div class="col-md-8">
|
|
||||||
<div class="card shadow">
|
|
||||||
<div class="card-header text-center">
|
|
||||||
<a href="?month=<?= $current_month - 1 > 0 ? $current_month - 1 : 12 ?>&year=<?= $current_month - 1 > 0 ? $current_year : $current_year - 1 ?>" class="btn btn-sm btn-outline-secondary float-start"><</a>
|
|
||||||
<h5 class="d-inline-block"><?= date('F Y', $first_day_of_month) ?></h5>
|
|
||||||
<a href="?month=<?= $current_month + 1 < 13 ? $current_month + 1 : 1 ?>&year=<?= $current_month + 1 < 13 ? $current_year : $current_year + 1 ?>" class="btn btn-sm btn-outline-secondary float-end">></a>
|
|
||||||
</div>
|
|
||||||
<div class="card-body">
|
|
||||||
<div class="calendar-grid text-center fw-bold">
|
|
||||||
<div class="calendar-day text-dark">Mo</div>
|
|
||||||
<div class="calendar-day text-dark">Di</div>
|
|
||||||
<div class="calendar-day text-dark">Mi</div>
|
|
||||||
<div class="calendar-day text-dark">Do</div>
|
|
||||||
<div class="calendar-day text-dark">Fr</div>
|
|
||||||
<div class="calendar-day text-dark">Sa</div>
|
|
||||||
<div class="calendar-day text-dark">So</div>
|
|
||||||
</div>
|
|
||||||
<div class="calendar-grid text-center">
|
|
||||||
<?php
|
|
||||||
// Leerfelder für den Start des Monats
|
|
||||||
for ($i = 1; $i < $day_of_week; $i++): ?>
|
|
||||||
<div class="calendar-day text-muted"></div>
|
|
||||||
<?php endfor;
|
|
||||||
|
|
||||||
// Tage des Monats
|
|
||||||
for ($day = 1; $day <= $number_of_days; $day++):
|
|
||||||
$has_meeting = isset($meetings_in_month[$day]);
|
|
||||||
$day_data = $has_meeting ? $meetings_in_month[$day] : null;
|
|
||||||
$meeting_id = $has_meeting ? $day_data['id'] : '';
|
|
||||||
?>
|
|
||||||
<div class="calendar-day <?= $has_meeting ? 'meeting-day' : '' ?>"
|
|
||||||
style="<?= $has_meeting ? 'background-color: rgba(' . hexToRgb($day_data['hex_code']) . ', 0.3);' : '' ?>"
|
|
||||||
|
|
||||||
data-meeting-id="<?= $meeting_id ?>">
|
|
||||||
<span class="day-number text-dark"><?= $day ?></span>
|
|
||||||
</div>
|
|
||||||
<?php endfor; ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-md-8">
|
|
||||||
<div class="card shadow" id="meeting-details-card">
|
|
||||||
<div class="card-body text-center text-muted">
|
|
||||||
<p>Wähle ein Treffen im Kalender aus, um die Details zu sehen.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
|
||||||
const meetingDays = document.querySelectorAll('.meeting-day');
|
|
||||||
const detailsCard = document.getElementById('meeting-details-card');
|
|
||||||
|
|
||||||
meetingDays.forEach(day => {
|
|
||||||
day.addEventListener('click', function() {
|
|
||||||
const meetingId = this.dataset.meetingId;
|
|
||||||
if (!meetingId) return;
|
|
||||||
|
|
||||||
detailsCard.innerHTML = `
|
|
||||||
<div class="card-body text-center text-muted">
|
|
||||||
<div class="spinner-border text-primary" role="status">
|
|
||||||
<span class="visually-hidden">Lade...</span></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
|
|
||||||
fetch(`meeting.php?meeting_id=${meetingId}`)
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(data => {
|
|
||||||
if (data) {
|
|
||||||
const participantsHtml = data.participants.map(p => `
|
|
||||||
<li>
|
|
||||||
${p.status === 'correct' ? '✅' : '❌'}
|
|
||||||
${p.name}
|
|
||||||
${p.status === 'fine' ? ' (1 € Strafe)' : ''}
|
|
||||||
</li>
|
|
||||||
`).join('');
|
|
||||||
|
|
||||||
detailsCard.innerHTML = `
|
|
||||||
<div class="card-header text-center">
|
|
||||||
<h5 class="mb-0">${new Date(data.meeting_date).toLocaleDateString()}</h5>
|
|
||||||
</div>
|
|
||||||
<div class="card-body">
|
|
||||||
<p class="text-muted text-center mb-3">Farbvorgabe: <span class="fw-bold" style="color: ${data.hex_code};">${data.color_name}</span></p>
|
|
||||||
<ul class="list-unstyled">
|
|
||||||
${participantsHtml}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
} else {
|
|
||||||
detailsCard.innerHTML = `
|
|
||||||
<div class="card-body text-center text-muted">
|
|
||||||
<p>Keine Details gefunden.</p>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
console.error('Fehler beim Laden der Details:', error);
|
|
||||||
detailsCard.innerHTML = `
|
|
||||||
<div class="card-body text-center text-danger">
|
|
||||||
<p>Ein Fehler ist aufgetreten.</p>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<?php include('inc/footer.php'); ?>
|
|
||||||
Reference in New Issue
Block a user