From 4f7bb6438ef45e969d09460d8f5960fdfcc7a389 Mon Sep 17 00:00:00 2001 From: Borgal Date: Sat, 16 Aug 2025 00:11:35 +0200 Subject: [PATCH] =?UTF-8?q?Teilnahme=20Eintragung=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/participant.php | 157 ++++++++++++++++++++++++++++++++++++++++++ index.php | 50 +++++++++----- 2 files changed, 190 insertions(+), 17 deletions(-) create mode 100755 admin/participant.php diff --git a/admin/participant.php b/admin/participant.php new file mode 100755 index 0000000..9f8cd54 --- /dev/null +++ b/admin/participant.php @@ -0,0 +1,157 @@ + + +
+

Teilnahme eintragen

+

für das Treffen am **** in der Farbe ****.

+ + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + +
BenutzerDabei?Farbe getragen?Gezahlt?
+
+ > +
+
+
+ > +
+
+
+ > +
+
+
+ + Abbrechen +
+
+
+
+
+ + \ No newline at end of file diff --git a/index.php b/index.php index c5cf771..fd59cb8 100755 --- a/index.php +++ b/index.php @@ -1,22 +1,27 @@ NOW() + ORDER BY meeting_date ASC + LIMIT 1"; -// SQL-Abfrage mit JOIN zwischen meetings und colors -$sql = "SELECT * FROM meetings - JOIN colors ON meetings.color_id = colors.id - WHERE WEEK(meeting_date, 1) = $current_week - ORDER BY meeting_date DESC LIMIT 1"; + $result = mysqli_query($conn, $sql); -$result = mysqli_query($conn, $sql); -if (!$result) { - die("Fehler in der SQL-Abfrage: " . mysqli_error($conn)); + if ($result && mysqli_num_rows($result) > 0) { + return mysqli_fetch_assoc($result); + } + return null; } -$row = mysqli_fetch_assoc($result); +// Den nächsten Termin holen +$row = get_next_meeting($conn); // Funktion, die basierend auf der Hintergrundfarbe die optimale Textfarbe zurückgibt function get_readable_text_color($hex_code) @@ -59,34 +64,45 @@ $german_weekdays = [

DoMiLi

-

Farbe für Kalenderwoche

-
Farbe der Woche
-
-

+
Farbe des nächsten Treffens
+
+

+

nächster Termin:

+
- Keine Farbe für diese Woche festgelegt. + Keine anstehenden Termine gefunden.