|
|
|
@ -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 .= " <span class=\'text-muted\' id=\'ups_".$id."\'>".$numUps."</span> ";
|
|
|
|
|
$strDescription .= "<a href=\'#\' onclick=\'thumb_up_down(".$id.",".$numDowns.",down)\'>";
|
|
|
|
|
$strDescription .= "<i class=\'text-muted fa fa-thumbs-down\'></i></a>";
|
|
|
|
|
$strDescription .= " <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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|