Description

cluster
Walter Hupfeld 4 years ago
parent 11a430770f
commit c6dbbcac78

@ -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 (

@ -3,8 +3,6 @@
require("config.php");
require_once("lib/functions.php");
$strIntro ="<h4>".$strTitle."</h4>";
$strIntro .= nl2br2($strIntroText);
@ -72,9 +70,6 @@
<li class="nav-item active">
<a class="nav-link" href="index.php?ref=1">Karte <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="liste.php">Liste</a>
</li>
</ul>
<div>
@ -85,9 +80,6 @@
<li class="nav-item">
<a class="nav-link" href="datenschutz.php">Datenschutzerklärung</a>
</li>
<li class="nav-item">
<a class="nav-link" href="admin/login.php">Login</a>
</li>
</ul>
</div>
</div>

@ -1,62 +1,39 @@
<?php
function generate_tooltip_description($row) {
global $boolRating;
global $boolComment;
global $boolUpload;
global $boolDefect;
global $uploaddir;
global $arrTopic;
global $arrDefect;
global $arrCategory;
global $arrUnfallart;
global $arrUnfalltyp;
global $arrLicht;
global $arrRad;
global $arrStrassenzustand;
global $db;
$description = $row['description'];
$numUps = $row['thumb_ups'];
$numDowns = $row['thumb_downs'];
$id = $row['id'];
$topic = $row['topic'];
$numDatum= strtotime($row['created_at']);
$datum= date("d.m.Y",$numDatum);
//$description = $row['description'];
//$id = $row['id'];
//$topic = $row['topic'];
//$numDatum= strtotime($row['created_at']);
//$datum= date("d.m.Y",$numDatum);
$strDescription = "<h3>Daten zum Unfall</h3>";
$description = "<strong>Unfallkategorie:</strong> ".$arrCategory[$row['UKATEGORIE']]."<br>";
$description .= "<strong>Unfallart:</strong> ".$arrUnfallart[$row['UART']]."<br>";
$description .= "<strong>Unfalltyp:</strong> ".$arrUnfalltyp[$row['UTYP1']]."<br>";
$description .= "<strong>Lichtverhältnisse:</strong> ".$arrLicht[$row['ULICHTVERH']]."<br>";
$description .= "<strong>Straßenzustand:</strong> ".$arrStrassenzustand[$row['STRZUSTAND']]."<br>";
$description .= "<strong>Unfallbeteiligte:</strong> ";
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 = "<strong>Anmerkung zu ".$arrTopic[$topic]."</strong><br>";
if ($boolUpload && isset($row['filename'])) {
$strDescription .= "<a href=\'images/".$row['filename']."\' data-lightbox=\'radweg".$id."\'>";
$strDescription .= "<img src=\'images/".$row['filename']."\' style=\'width:200px;\' /></a><br>";
}
$strDescription .= nl2br2($description);
$strDescription .= "<br> - ".$row['username']." (".$datum.")";
if ($boolDefect) {
if ($row['defect']>0) {
$strDescription .= "<br><em>" . $arrDefect[$row['defect']] ."</em>";
}
}
if ($boolRating) {
$strDescription .=" <hr><div style=\'text-align:center\'>";
$strDescription .= "<a href=\'#\' onclick=\'thumb_up_down(".$id.",".$numUps.",up)\'>";
$strDescription .= "<i class=\'text-muted fa fa-thumbs-up\'></i></a> ";
$strDescription .= "&nbsp;<span class=\'text-muted\' id=\'ups_".$id."\'>".$numUps."</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
$strDescription .= "<a href=\'#\' onclick=\'thumb_up_down(".$id.",".$numDowns.",down)\'>";
$strDescription .= "<i class=\'text-muted fa fa-thumbs-down\'></i></a>";
$strDescription .= "&nbsp;<span class=\'text-muted\' id=\'downs_".$id."\'>".$numDowns."</span></div>";
}
if ($boolComment) {
$strDescription .= "<hr><div style=\'text-align:center\'>";
$strDescription .= "<a href=\'#\' onclick=\'open_comment(".$id.")\'>Kommentar hinzufügen</a>";
$strDescription .= "</div>";
$strSQL = "SELECT username,comment,created_at FROM comment WHERE loc_id=".$id;
$result = $db->query($strSQL);
while ($comment = $result->fetchArray()) {
$strDescription .= "<div class=\'comment\'>";
$strDescription .= "<em>".$comment['username']." schrieb am ";
$numDatum = strtotime($comment['created_at']);
$strDatum = date("d.m.Y",$numDatum);
$strDescription .= $strDatum."</em><br>";
$strDescription .= nl2br2($comment['comment']);
$strDescription .= "</div>";
}
}
return $strDescription;
}

Loading…
Cancel
Save