prepare("SELECT * FROM municipalities WHERE slug = :slug"); $stmt->execute([':slug' => getenv('MUNICIPALITY_SLUG')]); $municipality = $stmt->fetch(); // Shows Login Page if not authenticated if ($page === 'login' || !is_admin()) { show_login_page($municipality, $login_error ?? null); exit; } // ----------------------------------------------------------------- // Loads shared Category Definitions // ----------------------------------------------------------------- $categories = get_categories(); // ----------------------------------------------------------------- // Loads Contributions and Statistics // ----------------------------------------------------------------- // Loads all Contributions for Municipality $stmt = $pdo->prepare(" SELECT contribution_id, title, category, description, author_name, geom_type, status, likes_count, dislikes_count, created_at, updated_at FROM contributions WHERE municipality_id = :mid ORDER BY created_at DESC "); $stmt->execute([':mid' => $municipality['municipality_id']]); $all_contributions = $stmt->fetchAll(); // Counts per Status $counts = ['pending' => 0, 'approved' => 0, 'rejected' => 0]; foreach ($all_contributions as $item) { if (isset($counts[$item['status']])) { $counts[$item['status']]++; } } $counts['total'] = count($all_contributions); // ----------------------------------------------------------------- // Renders Main Page // ----------------------------------------------------------------- ?> Moderation — <?= htmlspecialchars($municipality['name']) ?>

Moderationsportal

Bürgerportal Abmelden
Alle
Ausstehend
Akzeptiert
Abgelehnt
Beiträge
Noch keine Beiträge vorhanden.
$item['category'], 'faIcon' => 'fa-question', 'color' => '#999']; $status_label = ['pending' => 'Ausstehend', 'approved' => 'Akzeptiert', 'rejected' => 'Abgelehnt']; ?>
Keine Beschreibung vorhanden.
Uhr ·
Karte
Moderation - Anmeldung

Moderationsportal

Bitte geben Sie das Moderationspasswort ein.