approval control

This commit is contained in:
Walter Hupfeld 2024-03-12 08:19:43 +01:00
parent d571968568
commit 121626eb5f
4 changed files with 22 additions and 20 deletions

View File

@ -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"
);

View File

@ -40,7 +40,7 @@ global $arrDefect;
<!-- Mängelkategorie -------------------------------- -->
<label for="defect"><strong>Art des Hindernisses:</strong></label>
<select name="defect" id="defect">
<select name="defect" id="defect" required="required">
HEREDOC;
foreach ($arrDefect as $defectKey => $defectVal) {
echo " <option value='$defectKey'>$defectVal</option>";

View File

@ -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 = "<strong>Anmerkung zu ".$arrTopic[$topic]."</strong><br>";
if ($boolUpload && isset($row['filename']) && ($boolApprove && $row['approval'])) {
if ($boolUpload && isset($row['filename']) && $boolShow) {
$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.")";
$strDescription .= ($boolShow) ? "<br> - ".$row['username']." (".$datum.")":"<br>".$datum;
if ($boolDefect) {
if ($row['defect']>0) {
if ($row['defect']>=0) { //Hindernis kann nicht leer sein
$strDescription .= "<br><em>" . $arrDefect[$row['defect']] ."</em>";
}
}

View File

@ -14,7 +14,7 @@
require("config.php");
if ($strDistrict=="unkown") { header("Location: start.php");}
?>
?>
<!DOCTYPE html>
<html lang="de">
<head>
@ -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 "<tr>";
//echo "<td>".$numCounter." <a href='mailto:".$contactEmail."?subject=Ideenmelder Eintrag ".$id."'><i class='fa fa-envelope-o'></i>"."</td>";
echo "<td>".$id."</td>";
@ -141,7 +142,7 @@
echo "<td>".$row['transport']."</td>";
}
echo "<td>".$arrIcon[$row['topic']]." ".$arrTopic[$row['topic']]."</td>";
if ($boolApprove && $row['approval']) {
if ($boolShow) {
echo "<td>" . nl2br(stripslashes($row['description']))."</td>";
} else {
echo "<td class='not_approved'>Freigabe erfolgt in Kürze.</td>";
@ -163,7 +164,8 @@
echo "</td>";
}
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 "<td>".$strDefect."</td>";
}
if ($boolRating) {
@ -172,14 +174,14 @@
}
echo "<td>".$datum."</td>";
if ($boolUpload) {
if ($boolApprove || $row['approval']) {
if ($boolShow) {
echo "<td>";
if (isset($row['filename'])) {
echo "<a href='images/".$row['filename']."' data-lightbox='radweg".$id."'>";
echo "<img style='width:120px' src='images/".$row['filename']."'></a>";
}
echo "</td>";
}
} else {echo "<td></td>";}
}
echo "<td><a class='maplink' name='".$id."' href='#'>Karte</a><!--".round($row['lat'],4)." / ".round($row['lng'],4)."--></td>";
echo "</tr>\n";