asdasd
This commit is contained in:
@@ -188,8 +188,9 @@ foreach ($childrenRaw as $c) {
|
|||||||
|
|
||||||
$eventsUpcoming = [];
|
$eventsUpcoming = [];
|
||||||
$eventsPast = [];
|
$eventsPast = [];
|
||||||
|
$editEvent = null;
|
||||||
$stmt = $pdo->prepare(
|
$stmt = $pdo->prepare(
|
||||||
'SELECT e.id, e.title, e.teaser_public, e.starts_at, e.city, e.visibility, e.status,
|
'SELECT e.id, e.title, e.teaser_public, e.description, e.location_label, e.street, e.zip, e.city, e.region, e.starts_at, e.allow_kids, e.visibility, e.status, e.lat, e.lng,
|
||||||
(SELECT COUNT(*) FROM event_participants ep WHERE ep.event_id = e.id) AS participant_count
|
(SELECT COUNT(*) FROM event_participants ep WHERE ep.event_id = e.id) AS participant_count
|
||||||
FROM events e
|
FROM events e
|
||||||
WHERE e.created_by = :id AND e.starts_at >= NOW()
|
WHERE e.created_by = :id AND e.starts_at >= NOW()
|
||||||
@@ -207,6 +208,13 @@ $stmt = $pdo->prepare(
|
|||||||
);
|
);
|
||||||
$stmt->execute(['id' => $userId]);
|
$stmt->execute(['id' => $userId]);
|
||||||
$eventsPast = $stmt->fetchAll(PDO::FETCH_ASSOC) ?: [];
|
$eventsPast = $stmt->fetchAll(PDO::FETCH_ASSOC) ?: [];
|
||||||
|
|
||||||
|
if (isset($_GET['edit_event'])) {
|
||||||
|
$editId = (int)$_GET['edit_event'];
|
||||||
|
$stmt = $pdo->prepare('SELECT * FROM events WHERE id = :id AND created_by = :uid AND starts_at >= NOW() LIMIT 1');
|
||||||
|
$stmt->execute(['id' => $editId, 'uid' => $userId]);
|
||||||
|
$editEvent = $stmt->fetch(PDO::FETCH_ASSOC) ?: null;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<main class="section">
|
<main class="section">
|
||||||
<div class="container" style="display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px;">
|
<div class="container" style="display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px;">
|
||||||
|
|||||||
Reference in New Issue
Block a user