diff --git a/config.php b/config.php index d4d45b7..1bdf057 100644 --- a/config.php +++ b/config.php @@ -12,6 +12,34 @@ $numInfoLng =7.825; $numZoom=12; $fileGeojson ="geojson/hamm.geojson"; +$arrVehicles = array ( + 1 => "Fahrrad", + 2 => "PKW", + 3 => "Fussgänger", + 4 => "Kraftrad", + 5 => "LKW", + 6 => "Sonstiges" +); + +$arrVehicles_pl = array ( + 1 => "Fahrrädern", + 2 => "PKWs", + 3 => "Fussgängern", + 4 => "Krafträdern", + 5 => "LKWs", + 6 => "Sonstigen" + ); + +$arrWochentage = array ( + 1 => "Sonntag", + 2 => "Montag", + 3 => "Dienstag", + 4 => "Mittwoch", + 5 => "Donnerstag", + 6 => "Freitag", + 7 => "Samstag" +); + $arrCategory = array ( 1 => "Unfall mit Getöteten", @@ -59,8 +87,6 @@ $arrStrassenzustand = array ( 2 => "winterglatt", ); - - $arrTopic = array ( 2 => "Radverkehr", 1 => "Fußverkehr", @@ -70,6 +96,7 @@ $arrTopic = array ( ); $arrMarkerType = array ( + 0=>"infoMarker", 1=>"pedestrianMarker", 2=>"bicycleMarker", 3=>"trainMarker", @@ -78,18 +105,8 @@ $arrMarkerType = array ( ); - -$arrTransport = array ( - 0 => "keine Angabe", - 1 => "kein Auto", - 2 => "Auto", - 3 => "Motorroller/Motorrad", - 4 => "Bus/Bahn", - 5 => "Fahrrad", - 6 => "Zu Fuß" -); - $arrIcon = array ( + 0 => "", 1 => "", 2 => "", 3 => "", diff --git a/impressum.php b/impressum.php index 2270d7a..57833e4 100644 --- a/impressum.php +++ b/impressum.php @@ -45,15 +45,15 @@

Die Unfallkarte basiert auf Daten des Statistischen Bundesamtes:

 

-
Logo
+ Weiter Erläuterungen unter https://unfallatlas.statistikportal.de

 

- +

-

+

 

- Anfragen an +

 

 

diff --git a/index.php b/index.php index 73ebdeb..07988ca 100644 --- a/index.php +++ b/index.php @@ -5,33 +5,59 @@ $strIntro ="

".$strTitle."

"; $strIntro .= nl2br2($strIntroText); - - $numKey = (isset($_GET['key'])) ? $_GET['key'] : 1 ; - - switch ($numKey) { - case 1 : $strKey = "IstRad=1"; - break; - case 2: $strKey = "IstPKW=1"; - break; - case 3 : $strKey = "IstFuss=1"; - break; + + $numVehicle = (isset($_GET['v'])) ? (int) $_GET['v'] : 1; + + switch ($numVehicle) { + case 1: + case 0: + $strWhere ="IstRad = 1"; + $topic=2; + break; + case 2: + $strWhere = "IstPKW = 1"; + $topic=4; + break; + case 3: + $strWhere = "IstFuss = 1"; + $topic=1; + break; + case 4: + $strWhere = "IstKrad = 1"; + $topic=0; + break; + case 5: + $strWhere = "IstGkfz = 1"; + $topic=5; + break; + case 6: + $strWhere = "IstSonstige = 1"; + $topic=3; + break; + default: $strWhere ="IstRad = 1"; + $topic=2; } - - $strSQL="SELECT * FROM Unfallorte2019_Hamm WHERE ".$strKey; + $strSQL="SELECT * FROM Unfallorte2019_Hamm WHERE ".$strWhere; $result = $db->query($strSQL); $arrMarker = array(); $arrDescription = array(); - + $description=""; while ($row = $result->fetchArray()) { - //print_r($row);echo "
"; $id = $row[0]; - $topic = 2; $numLng = $row['XGCSWGS84']; $numLat = $row['YGCSWGS84']; + if ($row['IstRad']) $description .="mit Fahrradbeteiligung, "; + if ($row['IstPKW']) $description .="mit PKW-Beteiligung, "; + if ($row['IstFuss']) $description .="mit Fußgängerbeteiligung, "; + if ($row['IstKrad']) $description .="mit Kraftradbeteiligung, "; + if ($row['IstGkfz']) $description .="mit Güterkraftzeugbeteiligung, "; + if ($row['IstSonstige']) $description .="mit Beteiligung eines oben nicht genannten Verkehrsmittels"; + + $strDescription=generate_tooltip_description($row); @@ -77,9 +103,16 @@