approve in configuration

This commit is contained in:
Walter Hupfeld 2024-03-11 19:30:21 +01:00
parent 913ffd2000
commit 4c2d55d699
4 changed files with 21 additions and 11 deletions

View File

@ -91,11 +91,15 @@
<input type="checkbox" id="comment" name="comment" <?= ($boolComment) ? "checked=\"checked\"" :"" ?> > <input type="checkbox" id="comment" name="comment" <?= ($boolComment) ? "checked=\"checked\"" :"" ?> >
<label for="comment">Kommentare erlauben</label><br> <label for="comment">Kommentare erlauben</label><br>
<input type="checkbox" id="defect" name="defect" <?= ($boolDefect) ? "checked=\"checked\"" :"" ?> > <input type="checkbox" id="defect" name="defect" <?= ($boolDefect) ? "checked=\"checked\"" :"" ?> >
<label for="defect">Mängelkategrien einblenden</label><br> <label for="defect">Mängelkategorien einblenden</label><br>
<input type="checkbox" id="userinfo" name="userinfo" <?= ($boolUserinfo) ? "checked=\"checked\"" :"" ?> > <input type="checkbox" id="userinfo" name="userinfo" <?= ($boolUserinfo) ? "checked=\"checked\"" :"" ?> >
<label for="userinfo">Nutzerinformation (Alter/Verkehrsmittel)</label><br> <label for="userinfo">Nutzerinformation (Alter/Verkehrsmittel)</label><br>
<input type="checkbox" id="districtSelection" name="districtSelection" <?= ($boolDistrictSelection) ? "checked=\"checked\"" :"" ?> > <input type="checkbox" id="districtSelection" name="districtSelection" <?= ($boolDistrictSelection) ? "checked=\"checked\"" :"" ?> >
<label for="districtSelection">Auswahl Kreise in Navigation</label> <label for="districtSelection">Auswahl Kreise in Navigation</label><br>
<input type="checkbox" id="approve" name="approve" <?= ($boolApprove) ? "checked=\"checked\"" :"" ?> >
<label for="approve">Eingaben genehmigen</label>
<br> <br>
<label class="leftlabel">Uplaod-Pfad:</label> <label class="leftlabel">Uplaod-Pfad:</label>
<input type="text" class="wide" name="uploaddir" id="uploaddir" value="<?=$uploaddir?>"> <input type="text" class="wide" name="uploaddir" id="uploaddir" value="<?=$uploaddir?>">

View File

@ -16,6 +16,7 @@
$boolUserinfo = (isset($_POST['userinfo'])) ? "1" : "0"; $boolUserinfo = (isset($_POST['userinfo'])) ? "1" : "0";
$boolDefect = (isset($_POST['defect'])) ? "1" : "0"; $boolDefect = (isset($_POST['defect'])) ? "1" : "0";
$boolDistrictSelection = (isset($_POST['districtSelection'])) ? "1" : "0"; $boolDistrictSelection = (isset($_POST['districtSelection'])) ? "1" : "0";
$boolApprove = (isset($_POST['approve'])) ? "1" : "0";
$strUploaddir = $_POST['uploaddir']; $strUploaddir = $_POST['uploaddir'];
@ -43,6 +44,7 @@
$db->query("UPDATE `config` SET `value`= '$boolUserinfo' WHERE `key`='boolUserinfo'"); $db->query("UPDATE `config` SET `value`= '$boolUserinfo' WHERE `key`='boolUserinfo'");
$db->query("UPDATE `config` SET `value`= '$boolDefect' WHERE `key`='boolDefect'"); $db->query("UPDATE `config` SET `value`= '$boolDefect' WHERE `key`='boolDefect'");
$db->query("UPDATE `config` SET `value`= '$boolUpload' WHERE `key`='boolUpload'"); $db->query("UPDATE `config` SET `value`= '$boolUpload' WHERE `key`='boolUpload'");
$db->query("UPDATE `config` SET `value`= '$boolApprove' WHERE `key`='boolApprove'");
$db->query("UPDATE `config` SET `value`= '$boolDistrictSelection' WHERE `key`='boolDistrictSelection'"); $db->query("UPDATE `config` SET `value`= '$boolDistrictSelection' WHERE `key`='boolDistrictSelection'");
header("Location: configuration.php"); header("Location: configuration.php");

View File

@ -61,6 +61,10 @@ while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
case "boolDistrictSelection": case "boolDistrictSelection":
$boolDistrictSelection = ($row['value']=="1"); $boolDistrictSelection = ($row['value']=="1");
break; break;
case "boolApprove":
$boolApprove = ($row['value']=="1");
break;
default: ; default: ;
//echo "Fehler bei ".$row['key']; //echo "Fehler bei ".$row['key'];
// Ende Lokalisierung // Ende Lokalisierung
@ -151,13 +155,13 @@ $arrAge = array (
); );
$arrDefect = array ( $arrDefect = array (
0 => "Pfosten/Poller", 1 => "Pfosten/Poller",
1 => "Schranke", 2 => "Schranke",
2 => "Umlaufsperre/Drängelgitter", 3 => "Umlaufsperre/Drängelgitter",
3 => "Laternenmast", 4 => "Laternenmast",
4 => "Litfaßsäule", 5 => "Litfaßsäule",
5 => "Stromverteilerkasten", 6 => "Stromverteilerkasten",
6 => "Sonstiges" 7 => "Sonstiges"
); );

View File

@ -3,8 +3,8 @@
* Ideenmelder * Ideenmelder
* Autor: Walter Hupfeld, Hamm * Autor: Walter Hupfeld, Hamm
* E-Mail: info@hupfeld-software.de * E-Mail: info@hupfeld-software.de
* Version: 2.0 * Version: 3.0
* Datum: 16.02.2024 * Datum: 11.03.2024
******************************** */ ******************************** */
// Starte die Session // Starte die Session