diff --git a/partials/landing/account/dashboard.php b/partials/landing/account/dashboard.php index f33cff8..1af7ec9 100755 --- a/partials/landing/account/dashboard.php +++ b/partials/landing/account/dashboard.php @@ -94,6 +94,13 @@ $allowNoKidsChecked = $editEvent ? ((int)$editEvent['allow_kids'] === 0) : false
  • Ort:
  • E-Mail:
  • Telefon:
  • +
  • Standortfreigabe: 'Immer verwenden', + 'disabled' => 'Deaktiviert', + default => 'Beim nächsten Mal fragen', + }, ENT_QUOTES) + ?>
  • Beruf:
  • Sprachen:
  • About:
  • @@ -256,6 +263,15 @@ $allowNoKidsChecked = $editEvent ? ((int)$editEvent['allow_kids'] === 0) : false +
    + + +

    Bei aktiver Freigabe wird dein aktueller Standort für passende Treffen in deiner Nähe verwendet. Du kannst die Abfrage hier jederzeit wieder auf Nachfrage oder komplett aus stellen.

    +
    diff --git a/partials/landing/main/home.php b/partials/landing/main/home.php index dec6bad..01a8a60 100755 --- a/partials/landing/main/home.php +++ b/partials/landing/main/home.php @@ -7,7 +7,14 @@ $threadsForJs = []; try { $pdo = $app->pdo(); if ($pdo) { - $stmt = $pdo->prepare('SELECT id, title, teaser_public, description, city, region, zip, starts_at, allow_kids, visibility, location_label, lat, lng, created_at FROM events WHERE starts_at >= NOW() AND status != "cancelled" ORDER BY created_at DESC, starts_at ASC LIMIT 10'); + $stmt = $pdo->prepare(' + SELECT id, title, teaser_public, description, city, region, zip, starts_at, allow_kids, visibility, location_label, lat, lng, created_at + FROM events + WHERE starts_at >= DATE_SUB(NOW(), INTERVAL 120 DAY) + AND status != "cancelled" + ORDER BY starts_at ASC + LIMIT 60 + '); $stmt->execute(); $rows = $stmt->fetchAll(PDO::FETCH_ASSOC) ?: []; foreach ($rows as $r) { @@ -81,7 +88,7 @@ try {
    -

    Starte direkt mit der Suche nach passenden Treffen.

    +

    Suche nach Treffen in deiner Nähe

    diff --git a/partials/structure/layout_start.php b/partials/structure/layout_start.php index 8e839ed..a8ca433 100755 --- a/partials/structure/layout_start.php +++ b/partials/structure/layout_start.php @@ -13,6 +13,18 @@ if (!in_array($childGender, ['male', 'female', 'mixed'], true)) { } $debugEnabled = defined('APP_DEBUG') && APP_DEBUG === true; +$locationTrackingPreference = 'prompt'; +if (isset($_SESSION['user_id'])) { + try { + $pdo = $app->pdo(); + if ($pdo) { + $profileSettings = new \App\ProfileSettings($pdo); + $locationTrackingPreference = $profileSettings->getLocationTrackingPreference((int)$_SESSION['user_id']); + } + } catch (\Throwable) { + $locationTrackingPreference = 'prompt'; + } +} $debugFiles = []; if ($debugEnabled) { $debugDir = __DIR__ . '/../../debug'; @@ -57,7 +69,7 @@ if ($debugEnabled) { - + diff --git a/partials/structure/nav.php b/partials/structure/nav.php index ac1bada..e0bb1e6 100755 --- a/partials/structure/nav.php +++ b/partials/structure/nav.php @@ -15,7 +15,7 @@ $isDebug = defined('APP_DEBUG') && APP_DEBUG === true;