dev/patrick #1
@@ -1,16 +1,16 @@
|
||||
<?php
|
||||
// =====================================================================
|
||||
// WebGIS Citizen Participation Portal — Main Page
|
||||
// Loads Municipality Configuration from the Database and renders the
|
||||
// Map Interface with Header, Sidebar, and Footer.
|
||||
// Loads Municipality Configuration from the Database.
|
||||
// Renders Leaflet Map Interface including Leaflet Plugins
|
||||
// =====================================================================
|
||||
|
||||
require_once __DIR__ . '/../api/db.php';
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
// Load Municipality Configuration
|
||||
// ToDo: Make dynamic via URL Slug (e.g. /lohne) once multi-tenant
|
||||
// Routing is implemented. Hardcoded to Slug 'lohne' for now.
|
||||
// Loads Municipality Configuration
|
||||
// ToDo's: Dynamic Loading via URL Slug once multi-tenant Routing
|
||||
// is implemented. Hardcoded Slug for now.
|
||||
// -----------------------------------------------------------------
|
||||
$pdo = get_db();
|
||||
$stmt = $pdo->prepare("SELECT * FROM municipalities WHERE slug = :slug");
|
||||
@@ -18,42 +18,46 @@ $stmt->execute([':slug' => 'lohne']);
|
||||
$municipality = $stmt->fetch();
|
||||
|
||||
if (!$municipality) {
|
||||
die("Municipality not found.");
|
||||
http_response_code(404);
|
||||
echo "<!DOCTYPE html><html><body><h1>404 — Municipality not listed in Database.</h1></body></html>";
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Bürgerbeteiligung <?= htmlspecialchars($municipality['name']) ?></title>
|
||||
|
||||
<title>Bürgerbeteiligungsportal <?= htmlspecialchars($municipality['name']) ?></title>
|
||||
<link rel="icon" href="assets/icon-municipality.png" type="image/png">
|
||||
|
||||
<!-- ============================================================= -->
|
||||
<!-- CSS Dependencies -->
|
||||
<!-- Loads CSS Dependencies -->
|
||||
<!-- ============================================================= -->
|
||||
|
||||
<!-- Leaflet 1.9.4 -->
|
||||
<!-- Leaflet -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.min.css">
|
||||
|
||||
<!-- Geoman Drawing Tools -->
|
||||
<link rel="stylesheet" href="https://unpkg.com/@geoman-io/leaflet-geoman-free@2.17.0/dist/leaflet-geoman.css">
|
||||
|
||||
<!-- Leaflet Sidebar v2 -->
|
||||
<!-- Leaflet Sidebar -->
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet-sidebar-v2@3.2.3/css/leaflet-sidebar.min.css">
|
||||
|
||||
<!-- Leaflet Fullscreen -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.fullscreen/3.0.2/Control.FullScreen.css">
|
||||
|
||||
<!-- Leaflet Geocoder (Address Search) -->
|
||||
<!-- Leaflet Geocoder for Address Search -->
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet-control-geocoder@2.4.0/dist/Control.Geocoder.css">
|
||||
|
||||
<!-- Leaflet PolylineMeasure -->
|
||||
<!-- Leaflet Polyline Measurement Tool -->
|
||||
<link rel="stylesheet" href="https://ppete2.github.io/Leaflet.PolylineMeasure/Leaflet.PolylineMeasure.css">
|
||||
|
||||
<!-- SweetAlert2 (Confirmation Dialogs) -->
|
||||
<!-- SweetAlert2 for Confirmation Dialogs -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.css">
|
||||
|
||||
<!-- Font Awesome 6 (Icons) -->
|
||||
<!-- Font Awesome 6 for Icons -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
|
||||
<!-- Application Styles -->
|
||||
@@ -306,7 +310,7 @@ if (!$municipality) {
|
||||
|
||||
|
||||
<!-- ============================================================= -->
|
||||
<!-- JavaScript Dependencies -->
|
||||
<!-- Loads JavaScript Dependencies -->
|
||||
<!-- ============================================================= -->
|
||||
|
||||
<!-- Leaflet 1.9.4 -->
|
||||
|
||||
Reference in New Issue
Block a user