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\"" :"" ?> >
<label for="comment">Kommentare erlauben</label><br>
<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\"" :"" ?> >
<label for="userinfo">Nutzerinformation (Alter/Verkehrsmittel)</label><br>
<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>
<label class="leftlabel">Uplaod-Pfad:</label>
<input type="text" class="wide" name="uploaddir" id="uploaddir" value="<?=$uploaddir?>">

View File

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

View File

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

View File

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