From ee89357279ddead951b39eec36dc3137009a5965 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Sat, 10 Jan 2026 11:21:09 +0000 Subject: [PATCH] =?UTF-8?q?Edycja=20wygl=C4=85du=20tabeli=20proces=C3=B3w?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _get_future_meetings.php | 41 +++++ index.php | 354 +++++++++++++++++---------------------- 2 files changed, 198 insertions(+), 197 deletions(-) create mode 100644 _get_future_meetings.php diff --git a/_get_future_meetings.php b/_get_future_meetings.php new file mode 100644 index 0000000..114daca --- /dev/null +++ b/_get_future_meetings.php @@ -0,0 +1,41 @@ + 'Invalid BNI Group ID']); + exit; +} + +try { + $pdo = db(); + + $sql = " + SELECT ce.*, bg.name as group_name + FROM calendar_events ce + JOIN calendar_event_groups ceg ON ce.id = ceg.calendar_event_id + JOIN bni_groups bg ON ceg.bni_group_id = bg.id + WHERE ceg.bni_group_id = :bni_group_id + AND ce.start_datetime > NOW() + ORDER BY ce.start_datetime ASC + LIMIT :limit OFFSET :offset + "; + + $stmt = $pdo->prepare($sql); + $stmt->bindParam(':bni_group_id', $bni_group_id, PDO::PARAM_INT); + $stmt->bindParam(':limit', $limit, PDO::PARAM_INT); + $stmt->bindParam(':offset', $offset, PDO::PARAM_INT); + $stmt->execute(); + + $events = $stmt->fetchAll(PDO::FETCH_ASSOC); + + echo json_encode($events); + +} catch (PDOException $e) { + http_response_code(500); + echo json_encode(['error' => 'Database error: ' . $e->getMessage()]); +} diff --git a/index.php b/index.php index da75ee6..e4456b8 100644 --- a/index.php +++ b/index.php @@ -138,17 +138,22 @@ $bni_groups = $stmt_bni_groups->fetchAll(PDO::FETCH_ASSOC); Person - Spotkania + Spotkania Inne procesy - - - + + $col): ?> +
- + + + + + + @@ -189,8 +194,8 @@ $bni_groups = $stmt_bni_groups->fetchAll(PDO::FETCH_ASSOC); - - + $col): ?> + fetchAll(PDO::FETCH_ASSOC);