Compare commits

..

No commits in common. "b746e13d3a952b5b1dbbdeddb3bba8361ff57174" and "b55a7f9bc9a75077ee7f06ca62f2b41306438d52" have entirely different histories.

11 changed files with 29 additions and 55 deletions

BIN
.DS_Store vendored

Binary file not shown.

2
.gitignore vendored
View File

@ -3,5 +3,3 @@
/admin/shape/
/images/
config.db.php
.DS_Store

View File

@ -87,9 +87,7 @@
<input type="checkbox" id="defect" name="defect" <?= ($boolDefect) ? "checked=\"checked\"" :"" ?> >
<label for="defect">Mängelkategrien 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="userinfo">Nutzerinformation (Alter/Verkehrsmittel)</label>
<br>
<label class="leftlabel">Uplaod-Pfad:</label>
<input type="text" class="wide" name="uploaddir" id="uploaddir" value="<?=$uploaddir?>">

View File

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

View File

@ -15,7 +15,8 @@
if (!$boolLogin) {
header("Location: login.php");
}
$strDistrict=$_SESSION['district'];
$dbFilename = "../db/locations.db";
include("../config.php");
$boolShowmap=false;
@ -125,7 +126,7 @@
<!-- Navbar -->
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="#">Administration <?=$strTitle?> <?=$strDistrictTitle?></a>
<a class="navbar-brand" href="#">Administration NRW Meldeportal</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbars" aria-controls="navbars" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

View File

@ -6,18 +6,11 @@
* E-Mail: info@hupfeld-software.de
* Version: 1.0
* Datum: 18.05.2021
* zuletzt bearbeitet: 21.02.2024
******************************** */
// Starte die Session
session_start();
if (isset($_SESSION['district'])) {
$strDistrict=$_SESSION['district'];
}
else {
$strDistrict="";
}
$dbFilename = "../db/locations.db";
require_once("../config.php");
$boolLogin=true;
@ -29,6 +22,7 @@ $boolLogin=true;
$result = $db->query($strSQL);
if ($row=$result->fetch(PDO::FETCH_ASSOC)) {
if (password_verify($strPassword,$row['passwordhash'])) {
session_start();
$_SESSION['user']=$strUser;
$_SESSION['csrf_token'] = uniqid('', true);
header ("Location: index.php");
@ -66,9 +60,6 @@ $boolLogin=true;
<li class="nav-item">
<a class="nav-link" href="../index.php?ref=1">Karte</a>
</li>
<li class="nav-item">
<a class="nav-link" href="../liste.php">Liste</a>
</li>
</ul>
</div>
</nav>
@ -98,7 +89,6 @@ $boolLogin=true;
<div class="form-group">
<label for="password">Password</label>
<input type="password" name="password" class="form-control" id="password" placeholder="Passwort" required>
<input type="hidden" name="district" value="<?=$strDistrict?>">
</div>
<button type="submit" class="btn btn-primary">Absenden</button>
</form>

View File

@ -20,9 +20,21 @@ while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
case "uploaddir" :
$uploaddir=$row['value'];
break;
case "stadt" :
$strStadt=$row['value'];
break;
case "title" :
$strTitle=$row['value'];
break;
case "fileGeojson":
$fileGeojson=$row['value'];
break;
case "InfoLat":
$numInfoLat=$row['value'];
break;
case "InfoLng":
$numInfoLng=$row['value'];
break;
case "logo":
$strLogo=$row['value'];
break;
@ -56,9 +68,7 @@ while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
case "boolUserinfo":
$boolUserinfo = ($row['value']=="1");
break;
case "boolDistrictSelection":
$boolDistrictSelection = ($row['value']=="1");
break;
default: ;
//echo "Fehler bei ".$row['key'];
// Ende Lokalisierung

View File

@ -1,15 +1,6 @@
<?php
session_start();
if (isset($_SESSION['district']))
{
$strDistrict=$_SESSION['district'];
}
else {
header("Location: start.php");
}
echo $strDistrict;
require("config.php");
require ("config.php")
?>
<!DOCTYPE html>
<html lang="de">
@ -27,7 +18,7 @@
<!-- Navbar -->
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="#"><?=$strTitle?> <?=$strDistrictTitle?></a>
<a class="navbar-brand" href="#"><?=$strTitle?></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbars" aria-controls="navbars" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

View File

@ -1,15 +1,6 @@
<?php
session_start();
session_start();
if (isset($_SESSION['district']))
{
$strDistrict=$_SESSION['district'];
}
else {
header("Location: start.php");
}
echo $strDistrict;
require("config.php");
require_once("config.php");
?>
<!DOCTYPE html>
<html lang="de">
@ -27,7 +18,7 @@
<!-- Navbar -->
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="#"><?=$strTitle?> <?=$strDistrictTitle?></a>
<a class="navbar-brand" href="#"><?=$strTitle?></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbars" aria-controls="navbars" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

View File

@ -98,7 +98,7 @@
<!-- Navbar -->
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="#"><?= $strTitle ?> <?=$strDistrictTitle?></a>
<a class="navbar-brand" href="#"><?= $strTitle ?></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbars" aria-controls="navbars" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
@ -111,7 +111,6 @@
<li class="nav-item">
<a class="nav-link" href="liste.php">Liste</a>
</li>
<?php if ($boolDistrictSelection): ?>
<!-- District -->
<form method="GET" action="index.php">
<select name="d" style="float:left;margin-top:0.5em;margin-right:0.5em;" onchange="this.form.submit()">
@ -121,7 +120,6 @@
<?php endforeach; ?>
</select>
</form>
<?php endif; ?>
</ul>

View File

@ -65,7 +65,7 @@
<body>
<!-- Navbar -->
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="#"><?= $strTitle ?> <?=$strDistrictTitle?></a>
<a class="navbar-brand" href="#"><?= $strTitle ?></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbars" aria-controls="navbars" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
@ -78,7 +78,6 @@
<a class="nav-link" href="liste.php">Liste <span class="sr-only">(current)</span></a>
</li>
<!-- District -->
<?php if ($boolDistrictSelection): ?>
<form method="GET" action="index.php">
<select name="d" style="float:left;margin-top:0.5em;margin-right:0.5em;" onchange="this.form.submit()">
<?php foreach ($arrDistrict as $key => $strMTitle):
@ -87,7 +86,6 @@
<?php endforeach; ?>
</select>
</form>
<?php endif; ?>
</ul>
</ul>