diff --git a/config.php b/config.php index 870a953..f905d35 100644 --- a/config.php +++ b/config.php @@ -13,6 +13,52 @@ $numZoom=12; $fileGeojson ="geojson/hamm.geojson"; +$arrCategory = array ( + 1 => "Unfall mit Getöteten", + 2 => "Unfall mit Schwerverletztem", + 3 => "Unfall mit Leichtverletztem", +); + +$arrUnfallart = array ( + 1 => "Zusammenstoß mit anfahrendem/ anhaltendem/ruhendem Fahrzeug", + 2 => "Zusammenstoß mit vorausfahrendem / wartendem Fahrzeug", + 3 => "Zusammenstoß mit seitlich in gleicher Richtung fahrendem Fahrzeug", + 4 => "Zusammenstoß mit entgegenkommendem Fahrzeug", + 5 => "Zusammenstoß mit einbiegendem / kreuzendem Fahrzeug", + 6 => "Zusammenstoß zwischen Fahrzeug und Fußgänger", + 7 => "Aufprall auf Fahrbahnhindernis", + 8 => "Abkommen von Fahrbahn nach rechts", + 9 => "Abkommen von Fahrbahn nach links", + 0 => "Unfall anderer Art", +); + +$arrUnfalltyp = array ( + 1 => "Fahrunfall", + 2 => "Abbiegeunfall", + 3 => "Einbiegen / Kreuzen-Unfall", + 4 => "Überschreiten-Unfall", + 5 => "Unfall durch ruhenden Verkehr", + 6 => "Unfall im Längsverkehr", + 7 => "sonstiger Unfall", +); + +$arrLicht = array ( + 0 => "Tageslicht", + 1 => "Dämmerung", + 2 => "Dunkelheit", +); + +$arrRad = array ( + 0 => "Unfall ohne Fahrradbeteiligung", + 1 => "Unfall mit Fahrradbeteiligung" +); + +$arrStrassenzustand = array ( + 0 => "trocken", + 1 => "nass/feucht/schlüpfrig", + 2 => "winterglatt", +); + $arrTopic = array ( diff --git a/index.php b/index.php index 0980fa1..8b41437 100644 --- a/index.php +++ b/index.php @@ -3,8 +3,6 @@ require("config.php"); require_once("lib/functions.php"); - - $strIntro ="

".$strTitle."

"; $strIntro .= nl2br2($strIntroText); @@ -72,9 +70,6 @@ -
@@ -85,9 +80,6 @@ -
diff --git a/lib/functions.php b/lib/functions.php index b688b6c..a742429 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -1,62 +1,39 @@ Anmerkung zu ".$arrTopic[$topic]."
"; - if ($boolUpload && isset($row['filename'])) { - $strDescription .= ""; - $strDescription .= "
"; - } + $strDescription = "

Daten zum Unfall

"; + $description = "Unfallkategorie: ".$arrCategory[$row['UKATEGORIE']]."
"; + $description .= "Unfallart: ".$arrUnfallart[$row['UART']]."
"; + $description .= "Unfalltyp: ".$arrUnfalltyp[$row['UTYP1']]."
"; + $description .= "Lichtverhältnisse: ".$arrLicht[$row['ULICHTVERH']]."
"; + $description .= "Straßenzustand: ".$arrStrassenzustand[$row['STRZUSTAND']]."
"; + $description .= "Unfallbeteiligte: "; + 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 .= nl2br2($description); - $strDescription .= "
- ".$row['username']." (".$datum.")"; - if ($boolDefect) { - if ($row['defect']>0) { - $strDescription .= "
" . $arrDefect[$row['defect']] .""; - } - } - if ($boolRating) { - $strDescription .="
"; - $strDescription .= ""; - $strDescription .= " "; - $strDescription .= " ".$numUps."     "; - $strDescription .= ""; - $strDescription .= ""; - $strDescription .= " ".$numDowns."
"; - } - if ($boolComment) { - $strDescription .= "
"; - $strDescription .= "Kommentar hinzufügen"; - $strDescription .= "
"; - $strSQL = "SELECT username,comment,created_at FROM comment WHERE loc_id=".$id; - $result = $db->query($strSQL); - while ($comment = $result->fetchArray()) { - $strDescription .= "
"; - $strDescription .= "".$comment['username']." schrieb am "; - $numDatum = strtotime($comment['created_at']); - $strDatum = date("d.m.Y",$numDatum); - $strDescription .= $strDatum."
"; - $strDescription .= nl2br2($comment['comment']); - $strDescription .= "
"; - } - } return $strDescription; }