approval control
This commit is contained in:
parent
d571968568
commit
121626eb5f
16
config.php
16
config.php
@ -155,14 +155,14 @@ $arrAge = array (
|
|||||||
);
|
);
|
||||||
|
|
||||||
$arrDefect = array (
|
$arrDefect = array (
|
||||||
0 => "--Bitte wählen--",
|
|
||||||
1 => "Pfosten/Poller",
|
0 => "Pfosten/Poller",
|
||||||
2 => "Schranke",
|
1 => "Schranke",
|
||||||
3 => "Umlaufsperre/Drängelgitter",
|
2 => "Umlaufsperre/Drängelgitter",
|
||||||
4 => "Laternenmast",
|
3 => "Laternenmast",
|
||||||
5 => "Litfaßsäule",
|
4 => "Litfaßsäule",
|
||||||
6 => "Stromverteilerkasten",
|
5 => "Stromverteilerkasten",
|
||||||
7 => "Sonstiges"
|
6 => "Sonstiges"
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ global $arrDefect;
|
|||||||
<!-- Mängelkategorie -------------------------------- -->
|
<!-- Mängelkategorie -------------------------------- -->
|
||||||
|
|
||||||
<label for="defect"><strong>Art des Hindernisses:</strong></label>
|
<label for="defect"><strong>Art des Hindernisses:</strong></label>
|
||||||
<select name="defect" id="defect">
|
<select name="defect" id="defect" required="required">
|
||||||
HEREDOC;
|
HEREDOC;
|
||||||
foreach ($arrDefect as $defectKey => $defectVal) {
|
foreach ($arrDefect as $defectKey => $defectVal) {
|
||||||
echo " <option value='$defectKey'>$defectVal</option>";
|
echo " <option value='$defectKey'>$defectVal</option>";
|
||||||
|
@ -20,8 +20,8 @@ function generate_tooltip_description($row) {
|
|||||||
global $arrDefect;
|
global $arrDefect;
|
||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
|
$boolShow=((!$boolApprove) || ($boolApprove && $row['approval']));
|
||||||
$description = ($boolApprove && $row['approval']) ? $row['description'] : "Freigabe in Kürze";
|
$description = ($boolShow) ? $row['description'] : "Freigabe in Kürze";
|
||||||
$numUps = $row['thumb_ups'];
|
$numUps = $row['thumb_ups'];
|
||||||
$numDowns = $row['thumb_downs'];
|
$numDowns = $row['thumb_downs'];
|
||||||
$id = $row['id'];
|
$id = $row['id'];
|
||||||
@ -31,14 +31,14 @@ function generate_tooltip_description($row) {
|
|||||||
|
|
||||||
|
|
||||||
$strDescription = "<strong>Anmerkung zu ".$arrTopic[$topic]."</strong><br>";
|
$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 .= "<a href=\'images/".$row['filename']."\' data-lightbox=\'radweg".$id."\'>";
|
||||||
$strDescription .= "<img src=\'images/".$row['filename']."\' style=\'width:200px;\' /></a><br>";
|
$strDescription .= "<img src=\'images/".$row['filename']."\' style=\'width:200px;\' /></a><br>";
|
||||||
}
|
}
|
||||||
$strDescription .= nl2br2($description);
|
$strDescription .= nl2br2($description);
|
||||||
$strDescription .= "<br> - ".$row['username']." (".$datum.")";
|
$strDescription .= ($boolShow) ? "<br> - ".$row['username']." (".$datum.")":"<br>".$datum;
|
||||||
if ($boolDefect) {
|
if ($boolDefect) {
|
||||||
if ($row['defect']>0) {
|
if ($row['defect']>=0) { //Hindernis kann nicht leer sein
|
||||||
$strDescription .= "<br><em>" . $arrDefect[$row['defect']] ."</em>";
|
$strDescription .= "<br><em>" . $arrDefect[$row['defect']] ."</em>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
14
liste.php
14
liste.php
@ -14,7 +14,7 @@
|
|||||||
require("config.php");
|
require("config.php");
|
||||||
if ($strDistrict=="unkown") { header("Location: start.php");}
|
if ($strDistrict=="unkown") { header("Location: start.php");}
|
||||||
?>
|
?>
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
<script src="//cdn.datatables.net/2.0.0/js/dataTables.min.js"></script>
|
<script src="//cdn.datatables.net/2.0.0/js/dataTables.min.js"></script>
|
||||||
|
|
||||||
<script src="vendor/DataTables/DataTables-1.10.21/js/dataTables.bootstrap4.min.js"></script>
|
<script src="vendor/DataTables/DataTables-1.10.21/js/dataTables.bootstrap4.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -132,6 +132,7 @@
|
|||||||
$id=$row['id'];
|
$id=$row['id'];
|
||||||
$datum= date("d.m.Y",$numDatum);
|
$datum= date("d.m.Y",$numDatum);
|
||||||
$arrPoint[]= array ('id'=>$id,'lat'=>$row['lat'],'lng'=>$row['lng'],$row['description']);
|
$arrPoint[]= array ('id'=>$id,'lat'=>$row['lat'],'lng'=>$row['lng'],$row['description']);
|
||||||
|
$boolShow=((!$boolApprove) || ($boolApprove && $row['approval']));
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
//echo "<td>".$numCounter." <a href='mailto:".$contactEmail."?subject=Ideenmelder Eintrag ".$id."'><i class='fa fa-envelope-o'></i>"."</td>";
|
//echo "<td>".$numCounter." <a href='mailto:".$contactEmail."?subject=Ideenmelder Eintrag ".$id."'><i class='fa fa-envelope-o'></i>"."</td>";
|
||||||
echo "<td>".$id."</td>";
|
echo "<td>".$id."</td>";
|
||||||
@ -141,7 +142,7 @@
|
|||||||
echo "<td>".$row['transport']."</td>";
|
echo "<td>".$row['transport']."</td>";
|
||||||
}
|
}
|
||||||
echo "<td>".$arrIcon[$row['topic']]." ".$arrTopic[$row['topic']]."</td>";
|
echo "<td>".$arrIcon[$row['topic']]." ".$arrTopic[$row['topic']]."</td>";
|
||||||
if ($boolApprove && $row['approval']) {
|
if ($boolShow) {
|
||||||
echo "<td>" . nl2br(stripslashes($row['description']))."</td>";
|
echo "<td>" . nl2br(stripslashes($row['description']))."</td>";
|
||||||
} else {
|
} else {
|
||||||
echo "<td class='not_approved'>Freigabe erfolgt in Kürze.</td>";
|
echo "<td class='not_approved'>Freigabe erfolgt in Kürze.</td>";
|
||||||
@ -163,7 +164,8 @@
|
|||||||
echo "</td>";
|
echo "</td>";
|
||||||
}
|
}
|
||||||
if ($boolDefect) {
|
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>";
|
echo "<td>".$strDefect."</td>";
|
||||||
}
|
}
|
||||||
if ($boolRating) {
|
if ($boolRating) {
|
||||||
@ -172,14 +174,14 @@
|
|||||||
}
|
}
|
||||||
echo "<td>".$datum."</td>";
|
echo "<td>".$datum."</td>";
|
||||||
if ($boolUpload) {
|
if ($boolUpload) {
|
||||||
if ($boolApprove || $row['approval']) {
|
if ($boolShow) {
|
||||||
echo "<td>";
|
echo "<td>";
|
||||||
if (isset($row['filename'])) {
|
if (isset($row['filename'])) {
|
||||||
echo "<a href='images/".$row['filename']."' data-lightbox='radweg".$id."'>";
|
echo "<a href='images/".$row['filename']."' data-lightbox='radweg".$id."'>";
|
||||||
echo "<img style='width:120px' src='images/".$row['filename']."'></a>";
|
echo "<img style='width:120px' src='images/".$row['filename']."'></a>";
|
||||||
}
|
}
|
||||||
echo "</td>";
|
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 "<td><a class='maplink' name='".$id."' href='#'>Karte</a><!--".round($row['lat'],4)." / ".round($row['lng'],4)."--></td>";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user