diff --git a/config.php b/config.php index f1963ae..ab05db2 100644 --- a/config.php +++ b/config.php @@ -155,14 +155,14 @@ $arrAge = array ( ); $arrDefect = array ( - 0 => "--Bitte wählen--", - 1 => "Pfosten/Poller", - 2 => "Schranke", - 3 => "Umlaufsperre/Drängelgitter", - 4 => "Laternenmast", - 5 => "Litfaßsäule", - 6 => "Stromverteilerkasten", - 7 => "Sonstiges" + + 0 => "Pfosten/Poller", + 1 => "Schranke", + 2 => "Umlaufsperre/Drängelgitter", + 3 => "Laternenmast", + 4 => "Litfaßsäule", + 5 => "Stromverteilerkasten", + 6 => "Sonstiges" ); diff --git a/lib/dialog_karte.php b/lib/dialog_karte.php index 89553af..efd290b 100644 --- a/lib/dialog_karte.php +++ b/lib/dialog_karte.php @@ -40,7 +40,7 @@ global $arrDefect; - HEREDOC; foreach ($arrDefect as $defectKey => $defectVal) { echo " "; diff --git a/lib/functions.php b/lib/functions.php index 13fbd7d..a4f01bb 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -20,8 +20,8 @@ function generate_tooltip_description($row) { global $arrDefect; global $db; - - $description = ($boolApprove && $row['approval']) ? $row['description'] : "Freigabe in Kürze"; + $boolShow=((!$boolApprove) || ($boolApprove && $row['approval'])); + $description = ($boolShow) ? $row['description'] : "Freigabe in Kürze"; $numUps = $row['thumb_ups']; $numDowns = $row['thumb_downs']; $id = $row['id']; @@ -31,14 +31,14 @@ function generate_tooltip_description($row) { $strDescription = "Anmerkung zu ".$arrTopic[$topic]."
"; - if ($boolUpload && isset($row['filename']) && ($boolApprove && $row['approval'])) { + if ($boolUpload && isset($row['filename']) && $boolShow) { $strDescription .= ""; $strDescription .= "
"; } $strDescription .= nl2br2($description); - $strDescription .= "
- ".$row['username']." (".$datum.")"; + $strDescription .= ($boolShow) ? "
- ".$row['username']." (".$datum.")":"
".$datum; if ($boolDefect) { - if ($row['defect']>0) { + if ($row['defect']>=0) { //Hindernis kann nicht leer sein $strDescription .= "
" . $arrDefect[$row['defect']] .""; } } diff --git a/liste.php b/liste.php index 6e5be42..b5c5a89 100644 --- a/liste.php +++ b/liste.php @@ -14,7 +14,7 @@ require("config.php"); if ($strDistrict=="unkown") { header("Location: start.php");} ?> -?> + @@ -44,7 +44,7 @@ - + @@ -132,6 +132,7 @@ $id=$row['id']; $datum= date("d.m.Y",$numDatum); $arrPoint[]= array ('id'=>$id,'lat'=>$row['lat'],'lng'=>$row['lng'],$row['description']); + $boolShow=((!$boolApprove) || ($boolApprove && $row['approval'])); echo ""; //echo "".$numCounter." ".""; echo "".$id.""; @@ -141,7 +142,7 @@ echo "".$row['transport'].""; } echo "".$arrIcon[$row['topic']]." ".$arrTopic[$row['topic']].""; - if ($boolApprove && $row['approval']) { + if ($boolShow) { echo "" . nl2br(stripslashes($row['description'])).""; } else { echo "Freigabe erfolgt in Kürze."; @@ -163,7 +164,8 @@ echo ""; } if ($boolDefect) { - $strDefect = (isset($row['defect']) && $row['defect']>0) ? $arrDefect[$row['defect']] : ""; + $strDefect = (isset($row['defect']) && $row['defect']>=0) ? $arrDefect[$row['defect']] : ""; + // Hindenismelder - default Poller - keine leere Eingabe echo "".$strDefect.""; } if ($boolRating) { @@ -172,14 +174,14 @@ } echo "".$datum.""; if ($boolUpload) { - if ($boolApprove || $row['approval']) { + if ($boolShow) { echo ""; if (isset($row['filename'])) { echo ""; echo ""; } echo ""; - } + } else {echo "";} } echo "Karte"; echo "\n";