Compare commits

..

21 Commits

Author SHA1 Message Date
Walter Hupfeld
d4a4b04d71 dump 2024-06-04 17:41:28 +02:00
Walter Hupfeld
5dd6286ee9 favicon 2024-03-16 20:44:19 +01:00
Walter Hupfeld
0c67ce7c06 fix 2024-03-16 20:37:23 +01:00
Walter Hupfeld
78316dc366 order admin table 2024-03-16 20:33:18 +01:00
Walter Hupfeld
74f4dc442d javascript order 2024-03-16 20:21:13 +01:00
Walter Hupfeld
e752fd8988 fix shapefile 2024-03-16 18:24:37 +01:00
Walter Hupfeld
a0e8fcaf02 shapefile path 2024-03-16 18:08:33 +01:00
Walter Hupfeld
4bef36aa6b shapefile 2024-03-16 17:33:46 +01:00
Walter Hupfeld
15cb798263 shapefile 2024-03-16 17:32:53 +01:00
Walter Hupfeld
01e9fe7eba fix export 2024-03-16 16:56:45 +01:00
Walter Hupfeld
e59574b039 start 2024-03-16 16:47:46 +01:00
Walter Hupfeld
7d6b8edf1e del test 2024-03-16 13:20:47 +01:00
Walter Hupfeld
d392254fda hamburger menu 2024-03-16 13:18:09 +01:00
Walter Hupfeld
c0b38c1ef2 test for hamburger menu 2024-03-16 11:49:46 +01:00
Walter Hupfeld
852b45f125 datatables fix 2024-03-16 11:44:26 +01:00
Walter Hupfeld
6eb3594bcd datatable in administration 2024-03-16 10:48:40 +01:00
Walter Hupfeld
a8a3bbee4f impressum 2024-03-16 09:59:12 +01:00
Walter Hupfeld
da4ef6a3b1 DS_Store 2024-03-16 09:16:45 +01:00
Walter Hupfeld
1ac6774d66 picture edit 2024-03-15 22:19:22 +01:00
Walter Hupfeld
d94ea09940 fix 2024-03-15 21:57:30 +01:00
Walter Hupfeld
0d5fb5e5da sidebar 2024-03-15 19:46:25 +01:00
29 changed files with 863 additions and 513 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -23,7 +23,7 @@
<link href="../css/font-awesome.min.css" rel="stylesheet">
<script src="../js/jquery.min.js"></script>
<title>Konfigruation</title>
<title>Konfiguration</title>
<style>
.leftlabel { width: 10em;}
input[type="text"] { width: 18em;}
@@ -91,9 +91,11 @@
<input type="checkbox" id="districtSelection" name="districtSelection" <?= ($boolDistrictSelection) ? "checked=\"checked\"" :"" ?> >
<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>
<label for="approve">Eingaben genehmigen</label><br>
<input type="checkbox" id="sidebar" name="sidebar" <?= ($boolSidebar) ? "checked=\"checked\"" :"" ?> >
<label for="sidebar">Sidebar anzeigen</label>
<br>
<label class="leftlabel">Uplaod-Pfad:</label>
<label class="leftlabel">Upload-Pfad:</label>
<input type="text" class="wide" name="uploaddir" id="uploaddir" value="<?=$uploaddir?>">
</div>
</div>

View File

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

View File

@@ -32,7 +32,7 @@
<link href="../css/font-awesome.min.css" rel="stylesheet">
<script src="../js/jquery.min.js"></script>
<title>Konfigruation</title>
<title>Konfiguration</title>
<style>
.leftlabel { width: 10em;}
input[type="text"] { width: 18em;}

View File

@@ -36,7 +36,7 @@
<link href="../css/font-awesome.min.css" rel="stylesheet">
<script src="../js/jquery.min.js"></script>
<title>Konfigruation</title>
<title>Konfiguration</title>
<style>
.leftlabel { width: 10em;}
input[type="text"] { width: 18em;}

View File

@@ -3,9 +3,9 @@
* Ideenmelder
* Autor: Walter Hupfeld, Hamm
* E-Mail: info@hupfeld-software.de
* Version: 1.0
* Version: 3.0
* Datum: 18.05.2021
* zuletzte bearbeitet: 21.02.2024
* zuletzte bearbeitet: 15.03.2024
******************************** */
session_start();
@@ -33,12 +33,13 @@
}
$numDelete = (int)$_GET['delid'];
if ($superAmdin) {
$stmt = $db->prepare("DELETE FROM location WHERE id = :id AND district=:district");}
if ($boolSuperAdmin) {
$stmt = $db->prepare("DELETE FROM location WHERE id = :id");}
else {
$stmt = $db->prepare("DELETE FROM location WHERE id = :id AND district=:district");}
$stmt = $db->prepare("DELETE FROM location WHERE id = :id AND district=:district");
$stmt->bindValue(":district",$strDistrict);
}
$stmt->bindValue(":id",$numDelete);
$stmt->bindValue(":district",$strDistrict);
$stmt->execute();
$stmt = $db->prepare("DELETE FROM comment WHERE loc_id= :loc_id");
@@ -109,7 +110,6 @@
$boolShowmap=$numShowmap==1;
}
$arrTopic = array (
1 => "Fußverkehr",
2 => "Radverkehr",
@@ -137,14 +137,17 @@
<link rel="stylesheet" href="../css/jquery.fancybox.min.css" />
<link rel="stylesheet" href="../css/leaflet.css" />
<link rel="stylesheet" href="../css/leaflet.awesome-markers.css" />
<link rel="stylesheet" href="../vendor/DataTables/DataTables-2.0.2/css/dataTables.dataTables.min.css">
<link rel="stylesheet" href="../vendor/DataTables/DataTables-2.0.2/css/dataTables.bootstrap4.min.css">
<script src="../js/jquery.min.js"></script>
<script src="../js/leaflet.js"></script>
<script src="../js/leaflet.awesome-markers.js"></script>
<script src="../js/jquery.fancybox.min.js"></script>
<title>Eintragsliste</title>
<script src="../vendor/DataTables/DataTables-2.0.2/js/dataTables.min.js"></script>
<script src="../vendor/DataTables/DataTables-2.0.2/js/dataTables.bootstrap4.min.js"></script>
<title>Eintragsliste</title>
<style>
.tdmap { height:350px; width:300px;}
</style>
@@ -188,7 +191,7 @@
<!-- Ende Navbar -->
<div class="container-fluid" style="margin-top:5em;">
<table class="table table-bordered table-striped">
<table id="list" class="display">
<thead>
<tr><th>id</th>
<?= ($boolSuperAdmin) ? "<th>Kreis</th>" : "" ?>
@@ -210,7 +213,6 @@
<?php
$strScript="";
//$strSQL="SELECT * FROM location ORDER BY appoval, created_at DESC";
$strSQL="SELECT l.id as lid,l.*,adr.*
FROM location l LEFT JOIN address adr ON l.id=adr.loc_id
WHERE $sqlDistrict
@@ -237,7 +239,8 @@
$strDatum = date("d.m.Y",$numDatum);
echo $strDatum."</em><br>";
echo nl2br(stripslashes($comment['comment']));
echo "<a class='left' href='".$_SERVER['PHP_SELF']."?delcid=".$comment['id']."&csrf=".$_SESSION['csrf_token']."'><i class='fa fa-trash'></i></a>";
echo "<a class='left' href='".$_SERVER['PHP_SELF']."?delcid=".$comment['id']."&csrf=".$_SESSION['csrf_token']."'>".
"<span data-toggle='tooltip' title='Löschen'><i class='fa fa-trash'></i></span></a>";
echo "</div>";
}
echo "</td>";
@@ -256,7 +259,8 @@
if ($file=$files->fetch(PDO::FETCH_ASSOC)) {
echo "<a href='../images/".$file['filename']."' data-fancybox data-caption='".$strDefect."'>";
echo "<img src='../images/".$file['filename']."' style='width:150px'></a>";
echo "<a href='".$_SERVER['PHP_SELF']."?delfid=".$file['id']."&csrf=".$_SESSION['csrf_token']."'><i class='fa fa-trash'></i></a>";
echo "<a href='".$_SERVER['PHP_SELF']."?delfid=".$file['id']."&csrf=".$_SESSION['csrf_token']."'>".
"<span data-toggle='tooltip' title='Bild löschen'><i class='fa fa-trash'></i></span></a>";
}
echo "</td>\n";
@@ -270,13 +274,15 @@
echo "<td>".$row['created_at']."</td>";
if ($boolApprove) {
$strApproved = ($row['approval']) ? "<i class='fa fa-check' style='color:green'></i>"
: "<i class='fa fa-circle' style='color:red'></i>" ;
$strApproved .= " <i class='fa fa-recycle'></i>";
$strApproved = ($row['approval']) ? "<span data-toggle='data-toggle' title='Eintrag sperren'><i class='fa fa-check' style='color:green'></i>"
: "<span data-toggle='tooltip' title='Eintrag freischalten'><i class='fa fa-circle' style='color:red'></i>" ;
$strApproved .= " <i class='fa fa-recycle'></i></span>";
echo "<td><a href='".$_SERVER['PHP_SELF']."?approvalId=".$id."&csrf=".$_SESSION['csrf_token']."'>".$strApproved."</a></td>";
}
echo "<td><a class='del' href='".$_SERVER['PHP_SELF']."?delid=".$id."&csrf=".$_SESSION['csrf_token']."'><i class='fa fa-trash'></i></a>&nbsp;";
echo "<a class='edit_defect' href='#' id='edit_".$id."' value='".$id."'><i class='fa fa-pencil'></i></a>";
echo "<td><a class='del' href='".$_SERVER['PHP_SELF']."?delid=".$id."&csrf=".$_SESSION['csrf_token']."'>".
"<span data-toggle='tooltip' title='Eintrag löschen'><i class='fa fa-trash'></i></span></a>&nbsp;";
echo "<a class='edit_defect' href='#' id='edit_".$id."' value='".$id."'>".
"<span data-toggle='tooltip' title='Eintrag editieren'><i class='fa fa-pencil'></span></i></a>";
echo "</td>";
echo "</tr>\n";
@@ -297,13 +303,19 @@
<script>
$( document ).ready(function() {
let dataTable = new DataTable(
"#list",
{ language: {url: '../vendor/DataTables/de_DE.json'},
lengthMenu: [ [10, 25, 50, -1], [10, 25, 50, 'Alle'] ],
order: [[14, 'asc']]
});
var url = 'https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw';
var attribution = 'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, ' +
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>';
var infoMarker = L.AwesomeMarkers.icon({icon: 'info', prefix: 'fa', markerColor: 'orange'});
$(".edit_defect").on("click", function(e){
e.preventDefault();
$('#dialog_defect').hide();
@@ -327,7 +339,6 @@ $( document ).ready(function() {
return result===true;
})
$("#editobjectform").submit(function(event){
event.preventDefault();
@@ -369,7 +380,7 @@ $( document ).ready(function() {
$('#close').click(function(e){
$('#dialog_defect').hide();
});
<?= $strScript ?>
});
</script>

View File

@@ -87,7 +87,7 @@
echo "</div>";
}
echo "</td>";
$strDefect = (isset($row['defect']) && $row['defect']>0) ? $arrDefect[$row['defect']] : "";
$strDefect = (isset($row['defect']) && $row['defect']>=0) ? $arrDefect[$row['defect']] : "";
echo "<td>".$strDefect."</td>\n";
echo "<td>";

View File

@@ -10,7 +10,6 @@
// Query
require_once("../config.db.php");
require_once ("../config.php");
@@ -22,13 +21,14 @@ $coords_array = array ();
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$coords_array[]=$row;
}
//DEBUG echo "<pre>"; print_r($coords_array); echo "</pre>";
// If no results are found, echo a message and stop
//if ($coords_array == false) { echo "No results"; exit; }
unlink ("shape/ideenmelder.shp");
unlink ("shape/ideenmelder.dbf");
unlink ("shape/ideenmelder.shx");
if (file_exists("shape/ideenmelder.shp")) {unlink ("shape/ideenmelder.shp");}
if (file_exists("shape/ideenmelder.dbf")) {unlink ("shape/ideenmelder.dbf");}
if (file_exists("shape/ideenmelder.shx")) {unlink ("shape/ideenmelder.shx");}
//unlink ("shape/ideenmelder.dbt");
require_once('../vendor/Shapefile/ShapefileAutoloader.php');
@@ -43,10 +43,9 @@ use Shapefile\Geometry\Point;
try {
// Open Shapefile
$Shapefile = new ShapefileWriter('shape/ideenmelder.shp');
// Set shape type
$Shapefile->setShapeType(Shapefile::SHAPE_TYPE_POINT);
// Create field structure
$Shapefile->addNumericField('ID', 10);
$Shapefile->addCharField('DESC');
@@ -55,7 +54,7 @@ try {
$Shapefile->addCharField('DEFECT',60);
foreach ($coords_array as $coords) {
//echo "Coords ".$coords['id'].":";print_r($coords);echo "<hr>";
//DEBUG echo "Coords ".$coords['id'].":";print_r($coords);echo "<hr>";
// Create a Point Geometry
$lat=$coords['lat'];
$lon=$coords['lng'];

View File

@@ -5,6 +5,8 @@ require_once("../config.php");
require_once("../lib/functions.php");
require_once("../lib/geocoding.php");
$allowed_extensions = array("jpg", "jpeg", "png", "gif");
$strUsername = htmlentities(trim($_POST['username']));
$strUsername = addslashes($strUsername);
$strAge = (isset($_POST['ext_age'])) ? $_POST['ext_age'] : "";
@@ -24,20 +26,23 @@ if (empty($strUsername) || empty($numLng) || empty($numLat)) {
}
if ($boolUpload && !empty($_FILES['uploadfile']['name'])) {
$uploadfile = $uploaddir . basename($_FILES['uploadfile']['name']);
$fileinfo = @getimagesize($_FILES["uploadfile"]["tmp_name"]);
$file=$_FILES['uploadfile'];
$fileinfo = @getimagesize($file["tmp_name"]);
if (!empty($fileinfo)) {
//$info=read_gps_location($_FILES["uploadfile"]["tmp_name"]);
$i=1;
while (file_exists($uploadfile)) {
$uploadfile=$uploaddir.$i."_".basename($_FILES['uploadfile']['name']);
$i++;
$file_extension = pathinfo($file["name"], PATHINFO_EXTENSION);
if (!in_array(strtolower($file_extension), $allowed_extensions)) {
echo "Invalid file type. Please upload only jpg, jpeg, png, or gif images.";
exit();
}
if (move_uploaded_file($_FILES['uploadfile']['tmp_name'], $uploadfile)) {
$filename=$_FILES['uploadfile']['name'];
$filesize=$_FILES['uploadfile']['size'];
$filetype=$_FILES['uploadfile']['type'];
//echo "Filetype: ".$filetype;
$strNewfilename = uniqid("", true) . "." . $file_extension;
while (file_exists($uploaddir . $strNewfilename)) {
$strNewfilename = uniqid("", true) . "." . $file_extension;
}
if (move_uploaded_file($file['tmp_name'], $uploaddir.$strNewfilename)) {
$filename=$strNewfilename;//$file['name'];
$filesize=$file['size'];
$filetype=$file['type'];
$boolUploadOk = true;
} else {
die("Upload failed with error code " . $_FILES['file']['error']);

View File

@@ -7,24 +7,28 @@ $strDescription = htmlentities(trim($_POST['description']));
$strDescription = addslashes($strDescription);
$numDefect = (isset($_POST['defect'])) ? $_POST['defect'] : 0;
$id = (int) $_POST['loc_id'];
$filename ="";
$filename = "";
$allowed_extensions = array("jpg", "jpeg", "png", "gif");
$boolUploadOk=false;
if ($boolUpload && ($_FILES['uploadfile']['size']>0)) {
$uploadfile = $uploaddir . basename($_FILES['uploadfile']['name']);
$fileinfo = @getimagesize($_FILES["uploadfile"]["tmp_name"]);
$file=$_FILES['uploadfile'];
$fileinfo = @getimagesize($file["tmp_name"]);
if (!empty($fileinfo)) {
//$info=read_gps_location($_FILES["uploadfile"]["tmp_name"]);
$i=1;
while (file_exists($uploadfile)) {
$uploadfile=$uploaddir.$i."_".basename($_FILES['uploadfile']['name']);
$i++;
$file_extension = pathinfo($file["name"], PATHINFO_EXTENSION);
if (!in_array(strtolower($file_extension), $allowed_extensions)) {
echo "Invalid file type. Please upload only jpg, jpeg, png, or gif images.";
exit();
}
if (move_uploaded_file($_FILES['uploadfile']['tmp_name'], $uploadfile)) {
$filename=$_FILES['uploadfile']['name'];
$filesize=$_FILES['uploadfile']['size'];
$filetype=$_FILES['uploadfile']['type'];
//echo "Filetype: ".$filetype;
$strNewfilename = uniqid("", true) . "." . $file_extension;
while (file_exists($uploaddir . $strNewfilename)) {
$strNewfilename = uniqid("", true) . "." . $file_extension;
}
if (move_uploaded_file($file['tmp_name'], $uploaddir.$strNewfilename)) {
$filename=$strNewfilename;//$file['name'];
$filesize=$file['size'];
$filetype=$file['type'];
$boolUploadOk = true;
} else {
die("Upload failed with error code " . $_FILES['file']['error']);

View File

@@ -64,7 +64,9 @@ while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
case "boolApprove":
$boolApprove = ($row['value']=="1");
break;
case "boolSidebar":
$boolSidebar = ($row['value']=="1");
break;
default: ;
//echo "Fehler bei ".$row['key'];
// Ende Lokalisierung

View File

@@ -97,6 +97,12 @@ i.wa {
color:darkgray;
}
.logo_navbar {
height: 2.5em;
background-color:white;
margin: 0 1em 0 0;
}
.jumbotron {
background-color:orange;
}

View File

@@ -1,4 +1,6 @@
<?php
// Umleitung für ADFC NRW
header("Location: https://nrw.adfc.de/datenschutz");
session_start();
if (!isset($_SESSION['district'])) { header("Location: start.php");}
$strDistrict=$_SESSION['district'];
@@ -16,12 +18,21 @@
<title>Datenschutzerklärung</title>
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/style.css" />
<script src="js/jquery.slim.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</head>
<body>
<!-- Navbar -->
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="#"><?=$strTitle?> <?=$strDistrictTitle?></a>
<?php if (!$boolSidebar): ?>
<a href="start.php"><img class="logo_navbar" src="<?=$strLogo?>" alt="Logo"></a>
<?php endif; ?>
<a class="navbar-brand" href="#"><?=$strTitle?> &raquo; <?=$strDistrictTitle?></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>
@@ -44,7 +55,7 @@
<a class="nav-link" href="datenschutz.php">Datenschutzerklärung <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="admin/login.php">Login</a>
<a class="nav-link" href="login.php">Login</a>
</li>
</ul>
</div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -16,12 +16,20 @@
<title>Impressum</title>
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/style.css" />
<script src="js/jquery.slim.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</head>
<body>
<!-- Navbar -->
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="#"><?=$strTitle?> <?=$strDistrictTitle?></a>
<?php if (!$boolSidebar): ?>
<a href="start.php"><img class="logo_navbar" src="<?=$strLogo?>" alt="Logo"></a>
<?php endif; ?>
<a class="navbar-brand" href="#"><?=$strTitle?> &raquo; <?=$strDistrictTitle?></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>
@@ -45,7 +53,7 @@
<a class="nav-link" href="datenschutz.php">Datenschutzerklärung</a>
</li>
<li class="nav-item">
<a class="nav-link" href="admin/login.php">Login</a>
<a class="nav-link" href="login.php">Login</a>
</li>
</ul>
</div>
@@ -58,23 +66,19 @@
<div class="card">
<div class="card-header"><h2>Impressum</h2></div>
<div class="card-body">
<p>Dieses Portal wird zur Verfügungung gestellt von:</p>
<p>&nbsp;</p>
<div><img style="width:220px" src="<?=$strLogo?>" alt="Logo"></div>
<p>&nbsp;</p>
<p>
<?= stripslashes(nl2br($strImpressum)) ?>
</p>
<p><a href="<?=$strUrl?>"><?=$strUrlBez?></a></p>
<p>&nbsp;</p>
Anfragen zum Ideenmelder an <a href="mailto:<?=$contactEmail?>"><?=$contactEmail?></a>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p style="height:5em;">&nbsp;</p>
<p><a href="<?=$strUrl?>"><?=$strUrlBez?></a><br>
Anfragen bitte an <a href="mailto:<?=$contactEmail?>"><?=$contactEmail?></a></p>
<!-- Bitte nicht entfernen -->
<p class="small">Entwicklung: W. Hupfeld, Hamm<br>info@hupfeld-software.de</p>
<p style="height:5em;">&nbsp;</p>
<p class="small">Entwicklung: W. Hupfeld, Hamm<br>walter.hupfeld@adfc-hamm.de</p>
<!-- --- -->
<a class="btn btn-primary text-white" href="index.php?ref=1">zurück</a>
</div>
</div>

View File

@@ -4,7 +4,7 @@
* Autor: Walter Hupfeld, Hamm
* E-Mail: info@hupfeld-software.de
* Version: 3.0
* Datum: 12.03.2024
* Datum: 16.03.2024
******************************** */
// Starte die Session
@@ -67,36 +67,41 @@
<meta name="author" content="Walter Hupfeld, info@hupfeld-software.de">
<meta name="description" content="Georeferenzieter Ideenmelder">
<script src="js/jquery.min.js"></script>
<script src="js/leaflet.js"></script>
<script src="js/leaflet.ajax.js"></script>
<script src="js/leaflet.awesome-markers.js"></script>
<script src="js/leaflet.snogylop.js"></script>
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/leaflet.css" />
<link rel="stylesheet" href="css/leaflet.awesome-markers.css" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/jquery.fancybox.min.css" />
<script src="js/jquery.slim.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="js/leaflet.js"></script>
<script src="js/leaflet.ajax.js"></script>
<script src="js/leaflet.awesome-markers.js"></script>
<script src="js/leaflet.snogylop.js"></script>
<script src="js/jquery.fancybox.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<title><?=$strTitle?></title>
</head>
<body>
<!-- Navbar -->
<!--
<?php
print_r($_SESSION);
?>
-->
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="#"><?= $strTitle ?> <?=$strDistrictTitle?></a>
<?php if (!$boolSidebar): ?>
<a href="start.php"><img class="logo_navbar" src="<?=$strLogo?>" alt="Logo"></a>
<?php endif; ?>
<a class="navbar-brand" href="#"><?= $strTitle ?> &raquo; <?=$strDistrictTitle?></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>
<div class="collapse navbar-collapse" id="navbars">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="index.php?ref=1">Karte <span class="sr-only">(current)</span></a>
@@ -125,7 +130,7 @@
<a class="nav-link" href="datenschutz.php">Datenschutzerklärung</a>
</li>
<li class="nav-item">
<a class="nav-link" href="admin/login.php">Login</a>
<a class="nav-link" href="login.php">Login</a>
</li>
</ul>
</div>
@@ -134,29 +139,28 @@
<!-- Ende Navbar -->
<div class="container-fluid" style="margin-top: 4em;">
<?php if ($boolSidebar): ?>
<div class="row">
<nav class="col-md-2 d-none d-md-block bg-light sidebar">
<div class="sidebar-sticky">
<a href="start.php"><img class="logo" src="<?=$strLogo?>" alt="Logo" ></a>
<ul class="nav flex-column">
<?php
foreach ($arrTopic as $key=>$topic) {
echo "<li class='nav-item'>";
echo "<label>";
echo "<a class='nav-link'>".$arrIcon[$key]." ";
echo "<input type='checkbox' name='check_".$key."' id='check_".$key."' class='check' checked='checked' > ";
echo $topic."</a></label>";
echo "</li>";
}
?>
<?php foreach ($arrTopic as $key=>$topic): ?>
<li class='nav-item'>
<label>
<a class='nav-link'><?=$arrIcon[$key]?>
<input type='checkbox' name='check_".$key."' id='check_".$key."' class='check' checked='checked'>
<?=$topic?></a></label>
</li>
<?php endforeach; ?>
</ul>
</div>
</nav>
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-1">
<?php endif; ?>
<main role="main" class="<?= ($boolSidebar)?"col-md-9 col-lg-10":"col-md-12 col-lg-12"?> ml-sm-auto px-1">
<div id="mapid"></div>
</main>
</div>
<?php if ($boolSidebar) echo "</div>"; ?>
<!-- row -->
</div>
<!-- container-fluid -->

2
js/jquery.slim.min.js vendored Normal file

File diff suppressed because one or more lines are too long

5
js/popper.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -28,18 +28,19 @@ function generate_tooltip_description($row) {
$topic = $row['topic'];
$numDatum= strtotime($row['created_at']);
$datum= date("d.m.Y",$numDatum);
$strDefect= $arrDefect[$row['defect']];
$strDescription = "<strong>Anmerkung zu ".$arrTopic[$topic]."</strong><br>";
if ($boolUpload && isset($row['filename']) && $boolShow) {
$strDescription .= "<a href=\'images/".$row['filename']."\' data-lightbox=\'radweg".$id."\'>";
$strDescription .= "<a href=\'images/".$row['filename']."\' data-fancybox data-caption=\'".$strDefect."\'>";
$strDescription .= "<img src=\'images/".$row['filename']."\' style=\'width:200px;\' /></a><br>";
}
$strDescription .= nl2br2($description);
$strDescription .= ($boolShow) ? "<br> - ".$row['username']." (".$datum.")":"<br>".$datum;
if ($boolDefect) {
if ($row['defect']>=0) { //Hindernis kann nicht leer sein
$strDescription .= "<br><em>" . $arrDefect[$row['defect']] ."</em>";
$strDescription .= "<br><em>" . $strDefect ."</em>";
}
}
if ($boolRating) {

View File

@@ -41,6 +41,10 @@
<script src="vendor/DataTables/DataTables-2.0.2/js/dataTables.min.js"></script>
<script src="vendor/DataTables/DataTables-2.0.2/js/dataTables.bootstrap4.min.js"></script>
<script src="js/jquery.fancybox.min.js"></script>
<script src="js/jquery.slim.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<style>
#whmap { display:none; position:absolute; top:150px; left:400px; }
@@ -51,7 +55,10 @@
<body>
<!-- Navbar -->
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="#"><?= $strTitle ?> <?=$strDistrictTitle?></a>
<?php if (!$boolSidebar): ?>
<a href="start.php"><img class="logo_navbar" src="<?=$strLogo?>" alt="Logo"></a>
<?php endif; ?>
<a class="navbar-brand" href="#"><?= $strTitle ?> &raquo; <?=$strDistrictTitle?></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>
@@ -86,7 +93,7 @@
<a class="nav-link" href="datenschutz.php">Datenschutzerklärung</a>
</li>
<li class="nav-item">
<a class="nav-link" href="admin/login.php">Login</a>
<a class="nav-link" href="login.php">Login</a>
</li>
</ul>
</div>
@@ -97,7 +104,7 @@
<p>&nbsp;</p>
<h2>Liste der Einträge für <?=$strDistrictTitle?></h2>
<table id="list" class="table table-bordered table-striped">
<table id="list" class="display">
<thead>
<tr><th>Nr.</th><th>Name</th>
<?= ($boolUserinfo) ? "<th>Alter</th><th>Verkehrsmittel</th>" : ""; ?>
@@ -120,6 +127,7 @@
ORDER BY created_at DESC";
$result = $db->query($strSQL);
$numCounter=1;
$arrPoint = array();
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$numDatum= strtotime($row['created_at']);
$id=$row['id'];
@@ -201,11 +209,9 @@ jQuery(document).ready(function(){
let dataTable = new DataTable(
"#list",
{
language: {
url: 'vendor/DataTables/de_DE.json'
}
});
{ language: {url: 'vendor/DataTables/de_DE.json'},
lengthMenu: [ [10, 25, 50, -1], [10, 25, 50, 'Alle'] ]
});
<?php

View File

@@ -17,7 +17,7 @@ if (isset($_SESSION['district'])) {
else {
$strDistrict="";
}
require_once("../config.php");
require_once("config.php");
$boolLogin=true;
@@ -26,9 +26,9 @@ $boolLogin=true;
$strPassword = trim($_POST['password']);
$strSQL = "SELECT username,passwordhash,district,role FROM user WHERE username=:user";
$stmt = $db->prepare($strSQL);
$stmt->bindValue(':user',$strUser);
$result=$stmt->execute();
if ($row=$result->fetch(PDO::FETCH_ASSOC)) {
$stmt->bindValue(":user",$strUser, PDO::PARAM_STR);
$stmt->execute();
if ($row=$stmt->fetch(PDO::FETCH_ASSOC)) {
$boolOk = $strDistrict==$row['district'] || $row['role']=="admin";
if (password_verify($strPassword,$row['passwordhash']) && $boolOk) {
$_SESSION['user']=$strUser;
@@ -38,7 +38,7 @@ $boolLogin=true;
$stmt = $db->prepare($strSQL);
$stmt->bindValue(':user',$strUser);
$stmt->execute();
header ("Location: index.php");
header ("Location: admin/index.php");
} else {
$boolLogin=false;
}
@@ -55,24 +55,46 @@ $boolLogin=true;
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login</title>
<link rel="stylesheet" href="../css/bootstrap.min.css" />
<link rel="stylesheet" href="../css/style.css" />
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/style.css" />
<script src="js/jquery.slim.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</head>
<body>
<!-- Navbar -->
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="#"><?=$strTitle?> <?=$strDistrictTitle?></a>
<?php if (!$boolSidebar): ?>
<a href="start.php"><img class="logo_navbar" src="<?=$strLogo?>" alt="Logo"></a>
<?php endif; ?>
<a class="navbar-brand" href="#"><?=$strTitle?> &raquo; <?=$strDistrictTitle?></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>
<div class="collapse navbar-collapse" id="navbars">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href="../index.php?ref=1">Karte</a>
<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>
<a class="nav-link" href="liste.php">Liste</a>
</li>
</ul>
<div>
<ul class="navbar-nav mr-auto right">
<li class="nav-item">
<a class="nav-link" href="impressum.php">Impressum <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="datenschutz.php">Datenschutzerklärung</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="login.php">Login</a>
</li>
</ul>
</div>

View File

@@ -1,123 +0,0 @@
<?php
exit();
date_default_timezone_set('UTC');
require("../config.db.php");
$db->exec("CREATE TABLE IF NOT EXISTS location(
id INTEGER PRIMARY KEY AUTOINCREMENT,
username text NOT NULL DEFAULT '',
age text NOT NULL DEFAULT '',
transport text NOT NULL DEFAULT '',
description text NOT NULL DEFAULT '',
defect number,
topic number,
lng number,
lat number,
thumb_ups INTEGER DEFAULT 0,
thumb_downs INTEGER DEFAULT 0,
created_at TEXT DEFAULT CURRENT_TIMESTAMP
)");
$db->exec("CREATE TABLE IF NOT EXISTS files(
id INTEGER PRIMARY KEY AUTOINCREMENT,
loc_id INTEGER,
filename TEXT,
filetype TEXT,
filesize INTEGER
)");
$db->exec("CREATE TABLE IF NOT EXISTS comment(
id INTEGER PRIMARY KEY AUTOINCREMENT,
loc_id INTEGER,
username TEXT,
comment TEXT,
created_at TEXT DEFAULT CURRENT_TIMESTAMP
)");
$db->exec("CREATE TABLE IF NOT EXISTS user(
id INTEGER PRIMARY KEY AUTOINCREMENT,
username TEXT,
passwordhash TEXT,
lastlogin TEXT DEFAULT CURRENT_TIMESTAMP,
created_at TEXT DEFAULT CURRENT_TIMESTAMP
)");
$db->exec("CREATE TABLE IF NOT EXISTS address(
id INTEGER PRIMARY KEY AUTOINCREMENT,
loc_id INTEGER,
parking TEXT,
road TEXT,
house_number TEXT,
industrial TEXT,
neighbourhood TEXT,
hamlet TEXT,
suburb TEXT,
postcode TEXT,
city TEXT,
county TEXT,
country TEXT
)");
$db->exec("CREATE TABLE IF NOT EXISTS 'config' ('key' TEXT PRIMARY KEY NOT NULL DEFAULT NULL, 'value' TEXT DEFAULT NULL);
INSERT INTO 'config' ('key','value') VALUES ('boolActive','1');
INSERT INTO 'config' ('key','value') VALUES ('boolRating','1');
INSERT INTO 'config' ('key','value') VALUES ('boolComment','1');
INSERT INTO 'config' ('key','value') VALUES ('boolUpload','1');
INSERT INTO 'config' ('key','value') VALUES ('boolUserinfo','0');
INSERT INTO 'config' ('key','value') VALUES ('boolDefect','1');
INSERT INTO 'config' ('key','value') VALUES ('uploaddir','/var/www/html/images/');
INSERT INTO 'config' ('key','value') VALUES ('title','Testversion Hamm');
INSERT INTO 'config' ('key','value') VALUES ('fileGeojson','geojson/hamm.geojson');
INSERT INTO 'config' ('key','value') VALUES ('InfoLat','51.66');
INSERT INTO 'config' ('key','value') VALUES ('InfoLng','7.825');
INSERT INTO 'config' ('key','value') VALUES ('zoom','12');
INSERT INTO 'config' ('key','value') VALUES ('logo','css/logo.png');
INSERT INTO 'config' ('key','value') VALUES ('contactEmail','info@radwege-hamm.de');
INSERT INTO 'config' ('key','value') VALUES ('impressum','Walter Hupfeld
Bankerheide 2
59065 Hamm');
INSERT INTO 'config' ('key','value') VALUES ('url','https://www.radwege-hamm.de');
INSERT INTO 'config' ('key','value') VALUES ('UrlBez','Homepage Radwege Hamm');
INSERT INTO 'config' ('key','value') VALUES ('IntroText','Hier können Sie uns Hinweise auf Verbesserungen der Verkehrsinfrastruktur in der Stadt Mülheim an der Ruhr vorschlagen.
Klicken Sie dazu auf entsprechenden Ort auf der Karte und geben Sie im Dialog ihre Anmerkungen ein.
Den Marker können sie solange auf die richtige Stelle verschieben, bis die Eingabe abgeschlossen ist.
Vielen Dank für Ihre Unterstützung.');
INSERT INTO 'config' ('key','value') VALUES ('stadt','Hamm');
");
DROP TABLE IF EXISTS `config`;
CREATE TABLE `config` (
`key` varchar(50) NOT NULL,
`value` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
INSERT INTO `config` (`key`, `value`) VALUES
('boolActive', '1'),
('boolApprove', '1'),
('boolComment', '1'),
('boolDefect', '1'),
('boolDistrictSelection', '0'),
('boolRating', '1'),
('boolUpload', '1'),
('boolUserinfo', '0'),
('contactEmail', 'info@adfc-nrw.de'),
('impressum', 'ADFC Landesverband NRW\r\nDüsseldorf\r\n\r\n<a href=\"https://nrw.adfc.de\" target=\"_blank\">www.nrw.adfc.de</a>'),
('introText', ' ADFC Meldeportal für die Mitteilung von Anregungen und Ideen zum Radverkehr und der Anzeige von Barrieren, wie Umlaufsperren und Sperrpfosten. '),
('logo', 'css/logo_nordrhein_westfalen.png'),
('stadt', 'Hamm'),
('title', 'Hindernis-Melder des ADFC NRW'),
('uploaddir', '/var/www/html/images/'),
('url', 'https://nrw.adfc.de'),
('UrlBez', 'ADFC Landesverband NRW');
ALTER TABLE `config`
ADD PRIMARY KEY (`key`);
COMMIT;

View File

@@ -1,192 +0,0 @@
<?php
/** *****************************
* Ideenmelder
* Autor: Walter Hupfeld, Hamm
* E-Mail: info@hupfeld-software.de
* Version: 1.0
* Datum: 18.05.2021
******************************** */
exit();
// noch nicht vollständig angepasst
require("config.db.php");
$boolError=false;
?>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<title>Setup</title>
<style>
.leftlabel { width: 10em;}
input[type="text"] { width: 18em;}
input.wide {width: 24em;}
</style>
</head>
<body>
<div class="container">
<h1>Setup</h1>
<form method="post" id="myform" action="setup_chk.php">
<div class="row">
<div class="col-md-7 col-lg-7">
<h3>Datenbank und Bildverzeichnis einrichten</h3>
<ul class="list-group">
<li class="list-group-item">
<?php
/** **************************************************
*
* Image-Folder anlegen
*
************************************************** */
echo "Bildverzeichnis ";
if (file_exists("images/")) {
echo "existiert bereits";
if (is_writable("images/")) {
echo " und ist beschreibbar. ok";
} else {
echo ", ist aber nicht beschreibar. Korrigieren Sie die rechte auf dem Server.";
}
} else {
// Verzeichnis anlegen
if (mkdir("images",0755)) {
$strImagePath=getcwd();
$strImagePath.="/images/";
echo $strImagePath." wurde erfolgreich angelegt";
} else {
echo "<span class='warning'>Fehler beim Anlegen des Bildverzeichnisses.</span>";
}
}
?>
</li>
<li class="list-group-item">
<?php
/** **************************************************
*
* Datenbank anlegen
*
************************************************** */
$boolError=true;
echo "Datenbank anlegen: ";
if (!$boolError) {
require("create_database.php");
echo "Datenbank angelegt";
} else {
echo "Datenbankverzeichnis nicht angelegt oder Datenbank existiert bereits.";
}
require("config.php");
?>
</li>
</ul>
<br>
<div class="card">
<div class="card-header">
<h3>Nutzerdaten</h3>
</div>
<div class="card-body">
<label class="leftlabel">Login: </label>
<input type="text" name="login" id="login" value="admin" required ><br>
<label class="leftlabel">Passwort: </label>
<input type="password" name="password" id="password" value="" minlength="8" required><br>
<label class="leftlabel">Passwort (Wdh.): </label>
<input type="password" name="password2" id="password2" value="" minlength="8" required>
</div>
</div>
<br>
<!--
<div class="card">
<div class="card-header">
<h3>Dateneingabe aktivieren</h3>
</div>
<div class="card-body">
<input type="checkbox" id="active" name="active" <?= ($boolActive) ? "checked=\"checked\"" :"" ?> >
<label for="active">Dateneingabe aktivieren</label><br>
</div>
</div>
<br>
-->
<div class="card">
<div class="card-header">
<h3>Konfiguration</h3>
</div>
<div class="card-body">
<input type="checkbox" id="fileupload" name="fileupload" <?= ($boolUpload) ? "checked=\"checked\"" :"" ?> >
<label for="fileupload">Bilder hochladen erlauben</label><br>
<input type="checkbox" id="rating" name="rating" <?= ($boolRating) ? "checked=\"checked\"" :"" ?>>
<label for="rating"> Bewertungungen erlauben</label><br>
<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ängelkategorien einblenden</label><br>
<input type="checkbox" id="userinfo" name="userinfo" <?= ($boolUserinfo) ? "checked=\"checked\"" :"" ?> >
<label for="userinfo">Nutzerinformation (Alter/Verkehrsmittel)</label>
<br>
<label class="leftlabel">Uplaod-Pfad:</label>
<input type="text" class="wide" name="uploaddir" id="uploaddir" value="<?=$strImagePath?>">
</div>
</div>
<br>
<div class="card">
<div class="card-header">
<h3>Anbieterinformation</h3>
</div>
<div class="card-body">
<label class="leftlabel">Titel:</label><input type="text" name="title" id="title" value="<?=$strTitle?>" required><br>
<label class="leftlabel">Kontakt-Email:</label><input type="text" name="contactEmail" id="contactEmail" value="<?=$contactEmail?>" required><br>
<label class="leftlabel">Logo:</label><input type="text" name="logo" id="logo" value="<?=$strLogo?>"><br>
<label class="leftlabel">Url:</label><input type="text" class="wide" name="url" id="url" value="<?=$strUrl?>"><br>
<label class="leftlabel">Url-Text:</label><input type="text" class="wide" name="urlBez" id="urlBez" value="<?=$strUrlBez?>"><br>
<label>Impressum: (HTML erlaubt)</label>
<textarea id="impressum" name="impressum" rows="8" style="width:35em;" required><?= stripslashes($strImpressum) ?></textarea>
</div>
</div>
<br>
<div class="card">
<div class="card-header">
<h3>Einführungstext im Tooltipp</h3>
</div>
<div class="card-body">
<label>Tooltipp-Text: (HTML erlaubt)</label>
<textarea name="introtext" id="input" class="form-control" style="width:35em;" rows="10" required="required">
<?= stripslashes($strIntroText) ?></textarea>
</div>
</div>
<br>
<input type="submit" class="btn btn-primary" value="Konfiguration erzeugen">
</form>
<br><br><br>
</div>
</div> <!-- row -->
</div>
<script>
$('#myform').submit(function(e){
password1 = $("#password").val();
password2 = $("#password2").val();
if (password1==password2) {
if (password1.length < 8) {
alert("Passwort muss mindestens 8 Zeichen haben.");
return false;
} else {
return true;
}
} else {
alert("Passwörter nicht gleich");
return false;
e.preventDefault();
}
});
</script>
</body>
</html>

View File

@@ -1,75 +0,0 @@
<?php
/** *****************************
* Ideenmelder
* Autor: Walter Hupfeld, Hamm
* E-Mail: info@hupfeld-software.de
* Version: 1.0
* Datum: 18.05.2021
******************************** */
exit();
require("config.db.php");
$db->query("TRUNCATE config");
$boolActive = (isset($_POST['active'])) ? "1" : "0";
$boolRating = (isset($_POST['rating'])) ? "1" : "0";
$boolComment = (isset($_POST['comment'])) ? "1" : "0";
$boolUpload = (isset($_POST['fileupload'])) ? "1" : "0";
$boolUserinfo = (isset($_POST['userinfo'])) ? "1" : "0";
$boolDefect = (isset($_POST['defect'])) ? "1" : "0";
$boolActive = 1;
$strUploaddir = $_POST['uploaddir'];
$strStadt = $_POST['district'];
$strTitle = $_POST['title'];
$fileGeojson =$_POST['geojson'];
$numInfoLat = $_POST['lat'];;
$numInfoLng = $_POST['lng'];;
$numZoom = $_POST['zoom'];;
$strLogo = $_POST['logo'];;
$contactEmail= $_POST['contactEmail'];;
$strImpressum= $_POST['impressum'];
$strUrl = $_POST['url'];
$strUrlBez = $_POST['urlBez'];
$strIntroText= $_POST['introtext'];
$strUsername = $_POST['login'];
$strPassword = $_POST['password'];
$strImpressum=addslashes($strImpressum);
$strIntroText=addslashes($strIntroText);
$strPasswordHash = password_hash($strPassword,PASSWORD_BCRYPT);
// Username und Passwort in der Datenbank
$strSQL = "INSERT INTO user (username,passwordhash) values (:username, :passwordhash)";
$stmt = $db->prepare($strSQL);
$stmt->bindValue(':username', $strUsername);
$stmt->bindValue(':passwordhash', $strPasswordHash);
$stmt->execute();
exit;
$db->query("UPDATE config SET value= '$strUploaddir' WHERE key='uploaddir'");
$db->query("UPDATE config SET value= '$fileGeojson' WHERE key='fileGeojson'");
$db->query("UPDATE config SET value= '$strStadt' WHERE key='stadt'");
$db->query("UPDATE config SET value= '$strTitle' WHERE key='title'");
$db->query("UPDATE config SET value= '$numInfoLat' WHERE key='InfoLat'");
$db->query("UPDATE config SET value= '$numInfoLng' WHERE key='InfoLng'");
$db->query("UPDATE config SET value= '$numZoom' WHERE key='zoom'");
$db->query("UPDATE config SET value= '$strLogo' WHERE key='logo'");
$db->query("UPDATE config SET value= '$contactEmail' WHERE key='contactEmail'");
$db->query("UPDATE config SET value= '$strImpressum' WHERE key='impressum'");
$db->query("UPDATE config SET value= '$strUrl' WHERE key='url'");
$db->query("UPDATE config SET value= '$strUrlBez' WHERE key='UrlBez'");
$db->query("UPDATE config SET value= '$strIntroText' WHERE key='IntroText'");
$db->query("UPDATE config SET value= '$boolActive' WHERE key='boolActive'");
$db->query("UPDATE config SET value= '$boolRating' WHERE key='boolRating'");
$db->query("UPDATE config SET value= '$boolComment' WHERE key='boolComment'");
$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'");
header("Location: index.php");

390
sql/nrw_melder.sql Normal file
View File

@@ -0,0 +1,390 @@
-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: webserver-db:3306
-- Erstellungszeit: 04. Jun 2024 um 15:25
-- Server-Version: 10.11.2-MariaDB-1:10.11.2+maria~ubu2204
-- PHP-Version: 8.1.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Datenbank: `nrw_melder`
--
CREATE DATABASE IF NOT EXISTS `nrw_melder` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
USE `nrw_melder`;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `address`
--
DROP TABLE IF EXISTS `address`;
CREATE TABLE `address` (
`id` int(11) NOT NULL,
`loc_id` int(11) DEFAULT NULL,
`parking` text DEFAULT NULL,
`road` text DEFAULT NULL,
`house_number` text DEFAULT NULL,
`industrial` text DEFAULT NULL,
`neighbourhood` text DEFAULT NULL,
`hamlet` text DEFAULT NULL,
`suburb` text DEFAULT NULL,
`postcode` text DEFAULT NULL,
`city` text DEFAULT NULL,
`county` text DEFAULT NULL,
`country` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `comment`
--
DROP TABLE IF EXISTS `comment`;
CREATE TABLE `comment` (
`id` int(11) NOT NULL,
`loc_id` int(11) DEFAULT NULL,
`username` varchar(100) DEFAULT NULL,
`comment` text DEFAULT NULL,
`created_at` date DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `config`
--
DROP TABLE IF EXISTS `config`;
CREATE TABLE `config` (
`key` varchar(50) NOT NULL,
`value` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Daten für Tabelle `config`
--
INSERT INTO `config` (`key`, `value`) VALUES
('boolActive', '1'),
('boolApprove', '1'),
('boolComment', '0'),
('boolDefect', '1'),
('boolDistrictSelection', '0'),
('boolRating', '1'),
('boolSidebar', '0'),
('boolUpload', '1'),
('boolUserinfo', '0'),
('contactEmail', 'info@adfc-nrw.de'),
('impressum', '<div class=\"textcontainer no-p-margin\"><h2>Allgemeiner Deutscher Fahrrad-Club</h2><p>Landesverband Nordrhein-Westfalen e.V.</p><p>gesetzlich vertreten durch den <a href=\"/ueber-uns#c76137\" title=\"Öffnet einen internen Link im aktuellen Fenster\">Vorstand</a></p><p>Karlstraße 88<br> 40210 Düsseldorf<br> Tel.: 0211 / 68708-0<br> E-Mail: info@adfc-nrw.de<br> Website: <a href=\"http://www.adfc-nrw.de\" target=\"_blank\" rel=\"noreferrer\">www.adfc-nrw.de</a></p><p>Vereinsregister: Amtsgericht Düsseldorf, VR-Nr.: 6837<br> USt-IdNr. DE121241244</p><p>Vorsitzende: Axel Fell, Rebecca Heinz</p></div>'),
('introText', 'ADFC Meldeportal für die Mitteilung von Anregungen und Ideen zum Radverkehr und der Anzeige von Barrieren, wie Umlaufsperren und Sperrpfosten. '),
('logo', 'css/logo_nordrhein_westfalen.png'),
('stadt', 'Hamm'),
('title', 'Hindernis-Melder des ADFC NRW'),
('uploaddir', '/var/www/html/images/'),
('url', 'https://nrw.adfc.de'),
('UrlBez', 'ADFC Landesverband NRW');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `district`
--
DROP TABLE IF EXISTS `district`;
CREATE TABLE `district` (
`id` int(11) NOT NULL,
`district` varchar(40) NOT NULL,
`title` varchar(80) NOT NULL,
`lng` float NOT NULL,
`lat` float NOT NULL,
`zoom` int(11) NOT NULL,
`geojson` varchar(40) NOT NULL,
`ULAND` int(11) NOT NULL,
`UREGBEZ` int(11) NOT NULL,
`UKREIS` int(11) NOT NULL,
`UGEMEINDE` varchar(3) NOT NULL,
`active` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Daten für Tabelle `district`
--
INSERT INTO `district` (`id`, `district`, `title`, `lng`, `lat`, `zoom`, `geojson`, `ULAND`, `UREGBEZ`, `UKREIS`, `UGEMEINDE`, `active`) VALUES
(1, 'aachen', 'Städteregion Aachen', 6.0834, 50.7753, 11, 'aachen.geojson', 5, 3, 34, '0', 1),
(2, 'bielefeld', 'Stadt Bielefeld', 8.54669, 52.0113, 12, 'bielefeld.geojson', 5, 7, 11, '0', 0),
(3, 'bochum', 'Stadt Bochum', 7.235, 51.474, 12, 'bochum.geojson', 5, 9, 11, '0', 1),
(4, 'bonn', 'Stadt Bonn', 7.11524, 50.714, 12, 'bonn.geojson', 5, 3, 14, '0', 1),
(5, 'borken', 'Kreis Borken', 6.93082, 51.955, 10, 'borken.geojson', 5, 5, 54, '0', 1),
(6, 'bottrop', 'Stadt Bottrop', 6.89868, 51.5711, 12, 'bottrop.geojson', 5, 5, 12, '0', 1),
(7, 'coesfeld', 'Kreis Coesfeld', 7.37666, 51.8814, 11, 'coesfeld.geojson', 5, 5, 58, '0', 1),
(8, 'dortmund', 'Stadt Dortmund', 7.464, 51.51, 12, 'dortmund.geojson', 5, 9, 13, '0', 1),
(9, 'duisburg', 'Stadt Duisburg', 6.76024, 51.4348, 11, 'duisburg.geojson', 5, 1, 12, '0', 0),
(10, 'dueren', 'Kreis Düren', 6.46813, 50.8211, 11, 'dueren.geojson', 5, 3, 58, '0', 0),
(11, 'duesseldorf', 'Stadt Düsseldorf', 6.7875, 51.225, 11, 'duesseldorf.geojson', 5, 1, 11, '0', 0),
(12, 'erk', 'Ennepe-Ruhr-Kreis', 7.33609, 51.3198, 11, 'erk.geojson', 5, 9, 54, '0', 0),
(13, 'essen', 'Stadt Essen', 7.01, 51.458, 12, 'essen.geojson', 5, 1, 13, '0', 0),
(14, 'euskrichen', 'Kreis Euskirchen', 6.66905, 50.5419, 10, 'euskirchen.geojson', 5, 3, 66, '0', 0),
(15, 'gelsenkirchen', 'Stadt Gelsenkirchen', 7.07298, 51.552, 12, 'gelsenkirchen.geojson', 5, 5, 13, '0', 0),
(16, 'guetersloh', 'Kreis Gütersloh', 8.34323, 51.9335, 11, 'guetersloh.geojson', 5, 7, 54, '0', 0),
(17, 'hagen', 'Stadt Hagen', 7.48159, 51.3582, 12, 'hagen.geojson', 5, 9, 14, '0', 0),
(18, 'hamm', 'Stadt Hamm', 7.819, 51.6813, 12, 'hamm.geojson', 5, 9, 15, '0', 0),
(19, 'heinsberg', 'Kreis Heinsberg', 6.16763, 51.02, 11, 'heinsberg.geojson', 5, 3, 70, '0', 0),
(20, 'herford', 'Kreis Herford', 8.66339, 52.169, 11, 'herford.geojson', 5, 7, 58, '0', 0),
(21, 'herne', 'Stadt Herne', 7.21145, 51.5396, 12, 'herne.geojson', 5, 9, 16, '0', 0),
(22, 'hochsauerlandkreis', 'Hochsauerlandkreis', 8.39932, 51.3081, 10, 'hochsauerlandkreis.geojson', 5, 9, 58, '0', 0),
(23, 'hoexter', 'Kreis Höxter', 9.20124, 51.7001, 10, 'hoexter.geojson', 5, 7, 62, '0', 0),
(24, 'kleve', 'Kreis Kleve', 6.23844, 51.6058, 10, 'kleve.geojson', 5, 1, 54, '0', 0),
(25, 'koeln', 'Stadt Köln', 6.95564, 50.9407, 11, 'koeln.geojson', 5, 3, 15, '0', 0),
(26, 'krefeld', 'Stadt Krefeld', 6.5859, 51.3426, 12, 'krefeld.geojson', 5, 1, 14, '0', 0),
(27, 'leverkusen', 'Stadt Leverkusen', 7.00836, 51.046, 13, 'leverkusen.geojson', 5, 3, 16, '0', 0),
(28, 'lippe', 'Kreis Lippe', 8.94553, 52.0007, 10, 'lippe.geojson', 5, 7, 66, '0', 0),
(29, 'maerkischerkreis', 'Märkischer Kreis', 7.7268, 51.2696, 10, 'maerkischerkreis.geojson', 5, 9, 62, '0', 0),
(30, 'mettmann', 'Kreis Mettmann', 6.97577, 51.2269, 11, 'mettmann.geojson', 5, 1, 58, '0', 0),
(31, 'minden-luebbecke', 'Kreis Minden-Lübbecke', 8.7579, 52.3495, 11, 'minden-luebbecke.geojson', 5, 7, 70, '0', 0),
(32, 'moenchengladbach', 'Stadt Mönchengladbach', 6.41038, 51.1694, 12, 'moenchengladbach.geojson', 5, 1, 16, '0', 0),
(33, 'muelheim', 'Stadt Mülheim an der Ruhr', 6.881, 51.42, 12, 'muelheim.geojson', 5, 1, 17, '0', 0),
(34, 'muenster', 'Stadt Münster', 7.634, 51.96, 12, 'muenster.geojson', 5, 5, 15, '0', 0),
(35, 'oberbergischerkreis', 'Oberbergischer Kreis', 7.53397, 51.0158, 11, 'obk.geojson', 5, 3, 74, '0', 0),
(36, 'oberhausen', 'Stadt Oberhausen', 6.86082, 51.5081, 12, 'oberhausen.geojson', 5, 1, 19, '0', 0),
(37, 'olpe', 'Kreis Olpe', 7.96758, 51.06, 11, 'olpe.geojson', 5, 9, 66, '0', 0),
(38, 'paderborn', 'Kreis Paderborn', 8.76628, 51.6716, 11, 'paderborn.geojson', 5, 7, 74, '0', 0),
(39, 'recklinghausen', 'Kreis Recklinghausen', 7.19005, 51.64, 11, 'recklinghausen.geojson', 5, 5, 62, '0', 0),
(40, 'remscheid', 'Stadt Remscheid', 7.22878, 51.1864, 13, 'remscheid.geojson', 5, 1, 20, '0', 0),
(41, 'rek', 'Rhein-Erft-Kreis', 6.71423, 50.9226, 11, 'rek.geojson', 5, 3, 62, '0', 0),
(42, 'neuss', 'Rhein-Kreis Neuss', 6.65861, 51.159, 11, 'neuss.geojson', 5, 1, 62, '0', 0),
(43, 'rsk', 'Rhein-Sieg-Kreis', 7.23614, 50.777, 11, 'rsk.geojson', 5, 3, 82, '0', 0),
(44, 'rbk', 'Rheinisch-Bergischer Kreis', 7.2164, 51.0364, 11, 'rbk.geojson', 5, 3, 78, '0', 0),
(45, 'siegen-wittgenstein', 'Kreis Siegen-Wittgenstein', 8.20433, 50.9533, 10, 'siegen-wittgenstein.geojson', 5, 9, 70, '0', 0),
(46, 'soest', 'Kreis Soest', 8.23266, 51.5742, 11, 'soest.geojson', 5, 9, 74, '0', 0),
(47, 'solingen', 'Stadt Solingen', 7.07188, 51.1757, 12, 'solingen.geojson', 5, 1, 22, '0', 0),
(48, 'steinfurt', 'Kreis Steinfurt', 7.5955, 52.2219, 10, 'steinfurt.geojson', 5, 5, 66, '0', 0),
(49, 'unna', 'Kreis Unna', 7.708, 51.597, 11, 'unna.geojson', 5, 9, 78, '0', 0),
(50, 'viersen', 'Kreis Viersen', 6.3312, 51.3024, 11, 'viersen.geojson', 5, 1, 66, '0', 0),
(51, 'warendorf', 'Kreis Warendorf', 8.006, 51.86, 10, 'warendorf.geojson', 5, 5, 70, '0', 0),
(52, 'wesel', 'Kreis Wesel', 6.60843, 51.6318, 10, 'wesel.geojson', 5, 1, 70, '0', 0),
(53, 'wuppertal', 'Stadt Wuppertal', 7.14729, 51.2442, 12, 'wuppertal.geojson', 5, 1, 24, '0', 0);
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `files`
--
DROP TABLE IF EXISTS `files`;
CREATE TABLE `files` (
`id` int(11) NOT NULL,
`loc_id` int(11) DEFAULT NULL,
`filename` varchar(150) DEFAULT NULL,
`filetype` varchar(30) DEFAULT NULL,
`filesize` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `location`
--
DROP TABLE IF EXISTS `location`;
CREATE TABLE `location` (
`id` int(11) NOT NULL,
`username` varchar(20) NOT NULL DEFAULT '',
`age` varchar(20) NOT NULL DEFAULT '',
`transport` varchar(10) NOT NULL DEFAULT '',
`description` text NOT NULL DEFAULT '',
`defect` int(11) DEFAULT NULL,
`topic` int(11) DEFAULT NULL,
`lng` float DEFAULT NULL,
`lat` float DEFAULT NULL,
`district` varchar(40) NOT NULL,
`thumb_ups` int(11) DEFAULT 0,
`thumb_downs` int(11) DEFAULT 0,
`created_at` date DEFAULT current_timestamp(),
`approval` tinyint(4) NOT NULL DEFAULT 0,
`approval_date` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Tabellenstruktur für Tabelle `user`
--
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int(11) NOT NULL,
`username` varchar(50) NOT NULL,
`passwordhash` varchar(255) DEFAULT NULL,
`role` varchar(6) NOT NULL DEFAULT 'user',
`district` varchar(40) NOT NULL,
`lastlogin` date DEFAULT current_timestamp(),
`created_at` date DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Daten für Tabelle `user`
--
INSERT INTO `user` (`id`, `username`, `passwordhash`, `role`, `district`, `lastlogin`, `created_at`) VALUES
(2, 'admin', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'admin', '', '2024-05-16', '2024-02-16'),
(4, 'aachen', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'aachen', '2024-02-21', '2024-02-21'),
(5, 'bielefeld', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'bielefeld', '2024-02-21', '2024-02-21'),
(6, 'bochum', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'bochum', '2024-02-21', '2024-02-21'),
(7, 'bonn', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'bonn', '2024-02-21', '2024-02-21'),
(8, 'borken', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'borken', '2024-02-21', '2024-02-21'),
(9, 'bottrop', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'bottrop', '2024-02-21', '2024-02-21'),
(10, 'coesfeld', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'coesfeld', '2024-02-21', '2024-02-21'),
(11, 'dortmund', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'dortmund', '2024-02-21', '2024-02-21'),
(12, 'duisburg', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'duisburg', '2024-02-21', '2024-02-21'),
(13, 'dueren', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'dueren', '2024-02-21', '2024-02-21'),
(14, 'duesseldorf', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'duesseldorf', '2024-02-21', '2024-02-21'),
(15, 'erk', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'erk', '2024-02-21', '2024-02-21'),
(16, 'essen', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'essen', '2024-02-21', '2024-02-21'),
(17, 'euskrichen', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'euskrichen', '2024-02-21', '2024-02-21'),
(18, 'gelsenkirchen', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'gelsenkirchen', '2024-02-21', '2024-02-21'),
(19, 'guetersloh', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'guetersloh', '2024-02-21', '2024-02-21'),
(20, 'hagen', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'hagen', '2024-02-21', '2024-02-21'),
(21, 'hamm', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'hamm', '2024-03-16', '2024-02-21'),
(22, 'heinsberg', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'heinsberg', '2024-02-21', '2024-02-21'),
(23, 'herford', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'herford', '2024-02-21', '2024-02-21'),
(24, 'herne', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'herne', '2024-02-21', '2024-02-21'),
(25, 'hochsauerlandkreis', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'hochsauerlandkreis', '2024-02-21', '2024-02-21'),
(26, 'hoexter', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'hoexter', '2024-02-21', '2024-02-21'),
(27, 'kleve', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'kleve', '2024-02-21', '2024-02-21'),
(28, 'koeln', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'koeln', '2024-02-21', '2024-02-21'),
(29, 'krefeld', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'krefeld', '2024-02-21', '2024-02-21'),
(30, 'leverkusen', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'leverkusen', '2024-02-21', '2024-02-21'),
(31, 'lippe', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'lippe', '2024-02-21', '2024-02-21'),
(32, 'maerkischerkreis', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'maerkischerkreis', '2024-02-21', '2024-02-21'),
(33, 'mettmann', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'mettmann', '2024-02-21', '2024-02-21'),
(34, 'minden-luebbecke', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'minden-luebbecke', '2024-02-21', '2024-02-21'),
(35, 'moenchengladbach', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'moenchengladbach', '2024-02-21', '2024-02-21'),
(36, 'muelheim', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'muelheim', '2024-02-21', '2024-02-21'),
(37, 'muenster', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'muenster', '2024-02-21', '2024-02-21'),
(38, 'oberbergischerkreis', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'oberbergischerkreis', '2024-02-21', '2024-02-21'),
(39, 'oberhausen', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'oberhausen', '2024-02-21', '2024-02-21'),
(40, 'olpe', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'olpe', '2024-02-21', '2024-02-21'),
(41, 'paderborn', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'paderborn', '2024-02-21', '2024-02-21'),
(42, 'recklinghausen', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'recklinghausen', '2024-02-21', '2024-02-21'),
(43, 'remscheid', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'remscheid', '2024-02-21', '2024-02-21'),
(44, 'rek', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'rek', '2024-02-21', '2024-02-21'),
(45, 'neuss', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'neuss', '2024-02-21', '2024-02-21'),
(46, 'rsk', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'rsk', '2024-02-21', '2024-02-21'),
(47, 'rbk', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'rbk', '2024-02-21', '2024-02-21'),
(48, 'siegen-wittgenstein', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'siegen-wittgenstein', '2024-03-13', '2024-02-21'),
(49, 'soest', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'soest', '2024-02-21', '2024-02-21'),
(50, 'solingen', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'solingen', '2024-02-21', '2024-02-21'),
(51, 'steinfurt', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'steinfurt', '2024-02-21', '2024-02-21'),
(52, 'unna', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'unna', '2024-02-21', '2024-02-21'),
(53, 'viersen', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'viersen', '2024-02-21', '2024-02-21'),
(54, 'warendorf', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'warendorf', '2024-02-21', '2024-02-21'),
(55, 'wesel', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'wesel', '2024-02-21', '2024-02-21'),
(56, 'wuppertal', '$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2', 'user', 'wuppertal', '2024-02-21', '2024-02-21'),
(67, 'whupfeld', '$2y$10$.mXffW1bMiZ6a1OmeyPBkeJHCcb5kfHSY9oT8A4Vk3ohdK.j6pqoq', 'admin', '', '2024-02-23', '2024-02-22');
--
-- Indizes der exportierten Tabellen
--
--
-- Indizes für die Tabelle `address`
--
ALTER TABLE `address`
ADD PRIMARY KEY (`id`);
--
-- Indizes für die Tabelle `comment`
--
ALTER TABLE `comment`
ADD PRIMARY KEY (`id`);
--
-- Indizes für die Tabelle `config`
--
ALTER TABLE `config`
ADD PRIMARY KEY (`key`);
--
-- Indizes für die Tabelle `district`
--
ALTER TABLE `district`
ADD PRIMARY KEY (`id`);
--
-- Indizes für die Tabelle `files`
--
ALTER TABLE `files`
ADD PRIMARY KEY (`id`);
--
-- Indizes für die Tabelle `location`
--
ALTER TABLE `location`
ADD PRIMARY KEY (`id`);
--
-- Indizes für die Tabelle `user`
--
ALTER TABLE `user`
ADD PRIMARY KEY (`id`,`username`);
--
-- AUTO_INCREMENT für exportierte Tabellen
--
--
-- AUTO_INCREMENT für Tabelle `address`
--
ALTER TABLE `address`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
--
-- AUTO_INCREMENT für Tabelle `comment`
--
ALTER TABLE `comment`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
--
-- AUTO_INCREMENT für Tabelle `district`
--
ALTER TABLE `district`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=54;
--
-- AUTO_INCREMENT für Tabelle `files`
--
ALTER TABLE `files`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
--
-- AUTO_INCREMENT für Tabelle `location`
--
ALTER TABLE `location`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=53;
--
-- AUTO_INCREMENT für Tabelle `user`
--
ALTER TABLE `user`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=68;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

View File

@@ -17,14 +17,28 @@
<link rel="stylesheet" href="css/style.css" />
<title><?=$strTitle?></title>
</head>
<style>
.jumbotron {
display: flex;
}
.item {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
</style>
<body>
<div class="container">
<h1><?=$strTitle?></h1>
<div class="jumbotron">
<img src="<?=$strLogo?>" />
<?=$strIntroText?>
<div class="item"><img src="<?=$strLogo?>" /></div>
<div class="item"><?=$strIntroText?></div>
</div>
<div>
<form method="GET" action="index.php">
<select name="d" style="float:left;margin-top:0.5em;margin-right:0.5em;" onchange="this.form.submit()">

BIN
vendor/.DS_Store vendored

Binary file not shown.

108
vendor/Shapefile/File/FileInterface.php vendored Normal file
View File

@@ -0,0 +1,108 @@
<?php
/**
* PHP Shapefile - PHP library to read and write ESRI Shapefiles, compatible with WKT and GeoJSON
*
* @package Shapefile
* @author Gaspare Sganga
* @version 4.0.0dev
* @license MIT
* @link https://gasparesganga.com/labs/php-shapefile/
*/
namespace Shapefile\File;
/**
* Interface to interact with files in binary mode.
*/
interface FileInterface
{
/**
* Returns true if file is readable.
*
* @return bool
*/
public function isReadable();
/**
* Returns true if file is writable.
*
* @return bool
*/
public function isWritable();
/**
* Truncates file to given length.
*
* @param int $size Size to truncate to.
*
* @return void
*/
public function truncate($size);
/**
* Gets file size in bytes.
*
* @return int
*/
public function getSize();
/**
* Gets file current pointer position.
*
* @return int
*/
public function getPointer();
/**
* Sets file pointer to specified position.
*
* @param int $position The position to set the pointer to.
*
* @return void
*/
public function setPointer($position);
/**
* Resets file pointer position to its end.
*
* @return void.
*/
public function resetPointer();
/**
* Increases file pointer position of specified offset.
*
* @param int $offset The offset to move the pointer for.
*
* @return void
*/
public function setOffset($offset);
/**
* Reads raw binary string packed data from file.
*
* @param int $length Number of bytes to read.
*
* @return string|false Returns binary string packed data, or false on failure.
*/
public function read($length);
/**
* Writes raw binary string packed data to file.
*
* @param string $data Binary string packed data to write.
*
* @return bool Returns true on success, or false on failure.
*/
public function write($data);
}

View File

@@ -0,0 +1,143 @@
<?php
/**
* PHP Shapefile - PHP library to read and write ESRI Shapefiles, compatible with WKT and GeoJSON
*
* @package Shapefile
* @author Gaspare Sganga
* @version 4.0.0dev
* @license MIT
* @link https://gasparesganga.com/labs/php-shapefile/
*/
namespace Shapefile\File;
use Shapefile\Shapefile;
use Shapefile\ShapefileException;
/**
* Default FileInterface implementation.
* It allows reading/writing of files in binary mode.
* It accepts both filepaths and stream resource handles.
*/
class StreamResourceFile implements FileInterface
{
/////////////////////////////// PRIVATE VARIABLES ///////////////////////////////
/**
* @var resource File resource handle.
*/
private $handle = null;
/**
* @var bool Flag to store whether file was passed as resource handle or not.
*/
private $flag_resource = false;
/////////////////////////////// PUBLIC ///////////////////////////////
/**
* Constructor.
* Opens file with binary read or write access.
*
* @param string|resource $file Path to file or resource handle.
* @param bool $write_access Access type: false = read; true = write.
*/
public function __construct($file, $write_access)
{
$this->flag_resource = is_resource($file);
if ($this->flag_resource) {
$this->handle = $file;
if (get_resource_type($this->handle) !== 'stream' || !stream_get_meta_data($this->handle)['seekable']) {
throw new ShapefileException(Shapefile::ERR_FILE_RESOURCE_NOT_VALID);
}
if ((!$write_access && !$this->isReadable()) || ($write_access && !$this->isWritable())) {
throw new ShapefileException(Shapefile::ERR_FILE_PERMISSIONS);
}
} else {
$this->handle = @fopen($file, $write_access ? 'c+b' : 'rb');
if ($this->handle === false) {
throw new ShapefileException(Shapefile::ERR_FILE_OPEN);
}
}
}
/**
* Destructor.
*
* Closes file if it was NOT passed as resource handle.
*/
public function __destruct()
{
if (!$this->flag_resource) {
fclose($this->handle);
}
}
/**
* Gets canonicalized absolute pathname.
*/
public function getFilepath()
{
return realpath(stream_get_meta_data($this->handle)['uri']);
}
public function isReadable()
{
return in_array(stream_get_meta_data($this->handle)['mode'], ['rb', 'r+b', 'w+b', 'x+b', 'c+b']);
}
public function isWritable()
{
return in_array(stream_get_meta_data($this->handle)['mode'], ['r+b', 'wb', 'w+b', 'xb', 'x+b', 'cb', 'c+b']);
}
public function truncate($size)
{
ftruncate($this->handle, $size);
}
public function getSize()
{
return fstat($this->handle)['size'];
}
public function getPointer()
{
return ftell($this->handle);
}
public function setPointer($position)
{
fseek($this->handle, $position, SEEK_SET);
}
public function resetPointer()
{
fseek($this->handle, 0, SEEK_END);
}
public function setOffset($offset)
{
fseek($this->handle, $offset, SEEK_CUR);
}
public function read($length)
{
return @fread($this->handle, $length);
}
public function write($data)
{
if (@fwrite($this->handle, $data) === false) {
return false;
}
return true;
}
}