Compare commits

..

86 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
Walter Hupfeld
e325b14ee7 Merge branch 'main' of https://gitea.bankerheide.de/whupfeld/melder 2024-03-15 17:24:40 +01:00
Walter Hupfeld
c3da0f7c07 login 2024-03-15 17:20:25 +01:00
Walter Hupfeld
1e24715598 provide empty location 2024-03-14 09:49:58 +01:00
Walter Hupfeld
589d9127df favicon 2024-03-13 17:47:13 +01:00
Walter Hupfeld
6e101a8332 rm debug 2024-03-13 17:21:24 +01:00
Walter Hupfeld
23009e8f74 fancybox 2024-03-13 15:59:38 +01:00
Walter Hupfeld
54fed73f14 start 2024-03-13 12:46:54 +01:00
Walter Hupfeld
8071cab15e bootstrap4 2024-03-13 12:20:14 +01:00
Walter Hupfeld
0df358251a upgrade bootstrap and js 2024-03-13 12:03:56 +01:00
Walter Hupfeld
2ac9d01257 clean up 2024-03-13 10:18:57 +01:00
Walter Hupfeld
8217b5a7ce clean up 2024-03-13 10:09:43 +01:00
Walter Hupfeld
691aaa0bdd remove debug 2024-03-12 20:47:54 +01:00
Walter Hupfeld
ce1eddd4bb htaccess 2024-03-12 20:45:36 +01:00
Walter Hupfeld
882fb90145 file upload 2024-03-12 20:34:11 +01:00
Walter Hupfeld
d6312dc965 debug 2024-03-12 19:31:45 +01:00
Walter Hupfeld
7b6ea55d8d admin improvements 2024-03-12 17:40:20 +01:00
Walter Hupfeld
beba08d4ff fix 2024-03-12 11:58:55 +01:00
Walter Hupfeld
f79819fda7 fix 2024-03-12 09:29:41 +01:00
Walter Hupfeld
b028c43d10 setup 2024-03-12 09:22:18 +01:00
Walter Hupfeld
121626eb5f approval control 2024-03-12 08:19:43 +01:00
Walter Hupfeld
d571968568 approval 2024-03-11 23:06:15 +01:00
Walter Hupfeld
4c2d55d699 approve in configuration 2024-03-11 19:30:21 +01:00
Walter Hupfeld
913ffd2000 dialog changed 2024-03-11 17:36:02 +01:00
Walter Hupfeld
e16939b233 hindernisse 2024-03-11 16:12:39 +01:00
Walter Hupfeld
f4a8cef3f8 readme 2024-03-11 13:01:11 +01:00
Walter Hupfeld
34af6b6f75 fixes 2024-03-11 12:55:17 +01:00
Walter Hupfeld
824aa44fe2 District in admin list 2024-02-22 18:31:48 +01:00
Walter Hupfeld
bb53850c3e lastlogin 2024-02-22 17:18:18 +01:00
Walter Hupfeld
7c658e28f9 role 2024-02-22 17:07:36 +01:00
Walter Hupfeld
c2f8c93ef3 adfc color, start 2024-02-22 16:53:10 +01:00
Walter Hupfeld
8b6632d36f fix and layout 2024-02-22 16:34:43 +01:00
Walter Hupfeld
f8b8feee5b district select 2024-02-22 14:30:28 +01:00
Walter Hupfeld
f695c98fc3 fix 2024-02-22 12:01:59 +01:00
Walter Hupfeld
29496004dc fix 2024-02-22 10:36:46 +01:00
Walter Hupfeld
0a7db03af1 unkown district 2024-02-22 10:33:50 +01:00
Walter Hupfeld
c1c4151300 Admin User 2024-02-21 19:42:20 +01:00
Walter Hupfeld
11575edc75 fixes 2024-02-21 17:31:41 +01:00
Walter Hupfeld
1f44c21d69 disctrict 2024-02-21 14:31:28 +01:00
Walter Hupfeld
d918e97203 debug 2024-02-21 12:09:20 +01:00
Walter Hupfeld
1fec7c7710 session 2024-02-21 11:35:21 +01:00
Walter Hupfeld
b8671a54a8 fixes 2024-02-21 10:29:10 +01:00
Walter Hupfeld
b746e13d3a fix 2024-02-21 07:58:01 +01:00
Walter Hupfeld
183c570444 District Selection 2024-02-21 07:55:02 +01:00
Walter Hupfeld
b55a7f9bc9 language header 2024-02-20 22:28:50 +01:00
Walter Hupfeld
1c36f67189 datatable 2024-02-20 22:18:50 +01:00
Walter Hupfeld
54f14b1d8b cookies - not fixed - workaround 2024-02-20 18:18:30 +01:00
Walter Hupfeld
9a7aabcc42 cookies - not fixed 2024-02-20 16:59:46 +01:00
Walter Hupfeld
527308b201 session cookie 2024-02-20 16:06:57 +01:00
Walter Hupfeld
85ee0fe91b start page 2024-02-19 10:15:09 +01:00
Walter Hupfeld
dfb62c2833 fix 2024-02-18 19:46:30 +01:00
Walter Hupfeld
318200daa4 title 2024-02-18 19:30:49 +01:00
Walter Hupfeld
69ab1ac004 intro 2024-02-18 19:16:48 +01:00
Walter Hupfeld
2d055ac66a mapboxkex 2024-02-18 18:47:20 +01:00
Walter Hupfeld
42b00f4d01 logo 2024-02-18 18:30:18 +01:00
Walter Hupfeld
71d2786a97 active districts 2024-02-18 18:04:28 +01:00
Walter Hupfeld
039687e523 Title 2024-02-18 17:13:45 +01:00
Walter Hupfeld
3249bee870 fixes 2024-02-18 16:01:36 +01:00
Walter Hupfeld
418cf9d113 admin/list 2024-02-18 14:55:16 +01:00
Walter Hupfeld
9a32d1fbaa config.sample 2024-02-18 14:49:48 +01:00
Walter Hupfeld
9d7da21683 gitignore 2024-02-18 14:42:17 +01:00
Walter Hupfeld
36c457d658 .gitignore is now working 2024-02-18 14:40:39 +01:00
Walter Hupfeld
7201930c07 gitignore 2024-02-18 14:37:14 +01:00
Walter Hupfeld
98753186b1 fix 2024-02-18 13:47:05 +01:00
Walter Hupfeld
46ad703473 districts 2024-02-18 13:37:18 +01:00
Walter Hupfeld
6cdad9be24 export 2024-02-18 10:57:42 +01:00
456 changed files with 19496 additions and 143132 deletions

7
.gitignore vendored
View File

@@ -1,4 +1,7 @@
# ignore
/admin/shape/
/images/
config.db.php config.db.php
.DS_Store

10
.htaccess Normal file
View File

@@ -0,0 +1,10 @@
php_value upload_max_filesize 10M
php_value post_max_size 10M
RedirectMatch 404 /\.git
# RedirectMatch 404 /db
RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^(.*)$ index.php?d=$1 [QSA]

View File

@@ -1,8 +1,8 @@
# Ideenmelder # Ideen-/Hindernismelder
Die Anwendung ermöglicht die Markierung von Standorten in einem begrenzten Bezirk (Stadt Hamm). Die Eingaben können beschrieben und bewertet werden. Das Hochladen von Bildern und das Kommentieren von Beiträgen ist möglich. Die Anwendung ermöglicht die Markierung von Standorten in einem begrenzten Bezirk für alle Kreise und kreisfreien Städten in NRW. Die Eingaben können beschrieben und bewertet werden. Das Hochladen von Bildern und das Kommentieren von Beiträgen ist möglich.
Die Idee zu dieser Anwendung kam durch einen Artikel in der ADFC-Zeitschrift Radwelt zu Ibbenbüren, wo Vorschläge zur Verkehrsinfrastruktur über eine Webanwendung erfasst wurden. Ich habe diese Idee übernommen und neu programmiert. Eine Demoanwendung findet man unter https://karte.hpadm.de (Login: admin Passwort: testtest) Die Idee zu dieser Anwendung kam durch einen Artikel in der ADFC-Zeitschrift Radwelt zu Ibbenbüren, wo Vorschläge zur Verkehrsinfrastruktur über eine Webanwendung erfasst wurden. Ich habe diese Idee übernommen und neu programmiert. Eine Demoanwendung findet man unter https://nrw-melder.hpadm.de (Login: admin Passwort: testtest)
Es sind aus meiner Sicht aber auch viele andere Anwendungsmöglichkeiten denkbar, z.B. Erfassung/Meldung von Eichenprozessionsspinnern, Markierung/Erfassung von Stromtankstellen etc.. Es sind aus meiner Sicht aber auch viele andere Anwendungsmöglichkeiten denkbar, z.B. Erfassung/Meldung von Eichenprozessionsspinnern, Markierung/Erfassung von Stromtankstellen etc..
@@ -10,7 +10,7 @@ Es sind aus meiner Sicht aber auch viele andere Anwendungsmöglichkeiten denkbar
### Installation der Andwendung ### Installation der Andwendung
Die Anwendung verfügt über ein Setup, das die Datenbank und fehlende Verzeichnisse anlegt, einen Nutzeraccount anlegt und die Anpassung der Texte ermöglicht. Die Anwendung verfügt über ein Setup, das die Datenbank und fehlende Verzeichnisse anlegt, einen Nutzeraccount anlegt und die Anpassung der Texte ermöglicht. (nocht nicht in Version 3)
### Konfiguration ### Konfiguration
@@ -22,16 +22,32 @@ Folgende Funktionalitäten können an- bzw. abgeschaltet werden:
* Rating (Positive und negative Bewertung) * Rating (Positive und negative Bewertung)
* Hochladen von Bildern (erlaubt jpg/gif/png) * Hochladen von Bildern (erlaubt jpg/gif/png)
* Kommentare * Kommentare
* Freischaltung von Einträgen (ab Version 3)
Die Freischaltung bezieht sich nur auf die Einträge. Diese werden auf der Karte dargestellt und die Mängel-/Hinderniskategorie werden angezeigt. Bild und Kommentar für den Eintrag werden erst nach Freischaltung im Administrationsbereich angezeigt. Ist ein Eintrag freigeschaltet, kann er kommentiert werden. Die Kommentare sind sofort sichbar.
Die Konfiguration der Kategorien erfolgt im Quelltext der `config.php`.
### Karten
Als Tile-Server für die Karten wird Mapbox (https://mapbox.com) verwendet. Hierfür ist eine Api-Key notwendig. Bis zu 200.000 Tile können pro Monate kostenlos benutzt werden. Der Api-Key ist in der Datei `config.db.php` einzutragen.
### Reverse Georeferenzierung ### Reverse Georeferenzierung
Aus den übermittelten Geodaten wird die Adresse ermittelt. Dazu wird der Dienst https://locationiq.com verwendet. Die Adressen werden nur im Backend angezeigt, um die Auswertung der Daten zu erleichtern. Aus den übermittelten Geodaten wird die Adresse ermittelt. Dazu wird der Dienst https://locationiq.com verwendet. Die Adressen werden nur im Backend angezeigt, um die Auswertung der Daten zu erleichtern.
Für locationiq.com muss ein Api-Key beantragt werden. Dieser ist in der Datei /lib/geocoding.php einzutragen. Für die Georeferenzierung kann auch Für locationiq.com muss ein Api-Key beantragt werden. Dieser ist in der Datei `config.db.php` einzutragen.
--- ---
## Versionen ## Versionen
### Version 3.0
* Erweiterung auf NRW-Kreise und kreisfreie Städte
* Anpassung als NRW-Hindernismelder
* Freischaltung von Einträgen
### Version 2.2 ### Version 2.2
* Behandlung der Eingaben mit Zeilenumbruch, Anführungszeichen und Hochkommas * Behandlung der Eingaben mit Zeilenumbruch, Anführungszeichen und Hochkommas
@@ -81,18 +97,18 @@ Ermöglicht, die Marker mit Fontawesom-Symbolen zu gestalten. die Bibliothek ist
* https://fontawesome.com/ * https://fontawesome.com/
* Lizenz: MIT * Lizenz: MIT
#### Leaflet-Snogylop #### Leaflet-Snogylop
Erweiterung vom Leaflet um ein Polygon zu invertieren. Erweiterung vom Leaflet um ein Polygon zu invertieren.
* https://github.com/ebrelsford/Leaflet.snogylop * https://github.com/ebrelsford/Leaflet.snogylop
* Lizenz: MIT * Lizenz: MIT
### Lightbox ### Fancybox
Zur Darstellung von Bildern Zur Darstellung von Bildern
* https://lokeshdhakar.com/projects/lightbox2/ * https://github.com/fancyapps/fancybox
* Lizenz: MIT * Lizenz: GPLv3
### Datatable ### Datatable
@@ -110,6 +126,9 @@ Export von Shape-Files
## Improvements ## Improvements
* Rating durch Cookie absichern, so dass nicht zwei mal während einer Sitzung ein Maker betätigit werden kann. * Rating durch Cookie absichern, so dass nicht zwei mal während einer Sitzung ein Maker betätigt werden kann.
* Alert nach Rating überarbeiten (z.B. mit Bootstrap) * Alert nach Rating überarbeiten (z.B. mit Bootstrap)
## Probleme
Ohne favicon.ico verliert Chrome die Session.

View File

@@ -1,24 +0,0 @@
<?php
session_start();
$strLoginName=(isset($_SESSION['user'])) ? $_SESSION['user'] : "" ;
$boolLogin = (!empty($strLoginName));
if (!$boolLogin) {
header("Location: login.php");
}
date_default_timezone_set('UTC');
const DB_FILENAME = "../db/locations.db";
$db = new SQLite3(DB_FILENAME);
$strSQL="ALTER TABLE location ADD COLUMN defect INTEGER";
$db->exec($strSQL);
$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
)");
header("Location: configuration.php");

View File

@@ -5,13 +5,17 @@
if (!$boolLogin) { if (!$boolLogin) {
header("Location: login.php"); header("Location: login.php");
} }
if (isset($_SESSION['superadmin'])) {
$dbFilename = "../db/locations.db"; $boolSuperAdmin = (bool)$_SESSION['superadmin'];
}
// Für lokale Administration keine Konfiguration
if (!$boolSuperAdmin) { header("Location: index.php"); }
$strDistrict = $_SESSION['district'];
require_once("../config.php"); require_once("../config.php");
$boolError=false; $boolError=false;
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="de">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -19,12 +23,11 @@
<link href="../css/font-awesome.min.css" rel="stylesheet"> <link href="../css/font-awesome.min.css" rel="stylesheet">
<script src="../js/jquery.min.js"></script> <script src="../js/jquery.min.js"></script>
<title>Konfigruation</title> <title>Konfiguration</title>
<style> <style>
.leftlabel { width: 10em;} .leftlabel { width: 10em;}
input[type="text"] { width: 18em;} input[type="text"] { width: 18em;}
input.wide {width: 24em;} input.wide {width: 24em;}
</style> </style>
</head> </head>
<body> <body>
@@ -53,7 +56,6 @@
<a class="nav-link" href="password.php">Passwort ändern </a> <a class="nav-link" href="password.php">Passwort ändern </a>
</li> </li>
</ul> </ul>
<div> <div>
<ul class="navbar-nav mr-auto right"> <ul class="navbar-nav mr-auto right">
<li class="nav-item"> <li class="nav-item">
@@ -64,27 +66,13 @@
</nav> </nav>
<!-- Ende Navbar --> <!-- Ende Navbar -->
<div class="container" style="margin-top:5em;"> <div class="container" style="margin-top:5em;">
<h1>Konfiguration</h1> <h1>Konfiguration</h1>
<form method="post" id="myform" action="configuration_chk.php"> <form method="post" id="myform" action="configuration_chk.php">
<div class="row"> <div class="row">
<div class="col-md-7 col-lg-7"> <div class="col-md-7 col-lg-7">
<div class="card"> <?php if ($boolSuperAdmin): ?>
<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">
<div class="card-header"> <div class="card-header">
<h3>Konfiguration</h3> <h3>Konfiguration</h3>
@@ -97,41 +85,22 @@
<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> <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><br>
<input type="checkbox" id="approve" name="approve" <?= ($boolApprove) ? "checked=\"checked\"" :"" ?> >
<label for="approve">Eingaben genehmigen</label><br>
<input type="checkbox" id="sidebar" name="sidebar" <?= ($boolSidebar) ? "checked=\"checked\"" :"" ?> >
<label for="sidebar">Sidebar anzeigen</label>
<br> <br>
<label class="leftlabel">Uplaod-Pfad:</label> <label class="leftlabel">Upload-Pfad:</label>
<input type="text" class="wide" name="uploaddir" id="uploaddir" value="<?=$uploaddir?>"> <input type="text" class="wide" name="uploaddir" id="uploaddir" value="<?=$uploaddir?>">
</div> </div>
</div> </div>
<br> <br>
<div class="card">
<div class="card-header">
<h3>Karteninfo</h3>
</div>
<div class="card-body">
<h4>Stadt oder Kreis</h4>
<label class="leftlabel">Stadt/Kreis: </label>
<input type="text" name="district" id="district" value="<?=$strStadt?>" >
<h4>Kartenzentrum</h4>
<div class="small">Hier liegt das Zentrum der Karte und es erscheint der Info-Marker.</div>
<label class="leftlabel">Latitude:</label><input type="text" name="lat" id="lat" value="<?=$numInfoLat?>"><br>
<label class="leftlabel">Longitude:</label><input type="text" name="lng" id="lng" value="<?=$numInfoLng?>"><br>
<div class="small">Zoom-Faktor beim Start der Karte.</div>
<label class="leftlabel">Startzoom:</label><input type="text" name="zoom" id="zoom" value="<?=$numZoom?>">
<h4>GeoJson</h4>
<p>Die Datei kann man von folgender Adresse laden und ins Vezeichnis /geojson kopieren:
<a href="https://public.opendatasoft.com/explore/dataset/landkreise-in-germany/export/">public.opendatasoft.com</a>
</p>
<label class="leftlabel">GeoJson-Datei: </label><input type="text" name="geojson" id="geojson" value="<?=$fileGeojson?>">
</div>
</div>
<br>
<div class="card"> <div class="card">
<div class="card-header"> <div class="card-header">
<h3>Anbieterinformation</h3> <h3>Anbieterinformation</h3>
@@ -144,7 +113,6 @@
<label class="leftlabel">Url-Text:</label><input type="text" class="wide" name="urlBez" id="urlBez" value="<?=$strUrlBez?>"><br> <label class="leftlabel">Url-Text:</label><input type="text" class="wide" name="urlBez" id="urlBez" value="<?=$strUrlBez?>"><br>
<label>Impressum: (HTML erlaubt)</label> <label>Impressum: (HTML erlaubt)</label>
<textarea id="impressum" name="impressum" rows="8" style="width:35em;"><?= stripslashes($strImpressum) ?></textarea> <textarea id="impressum" name="impressum" rows="8" style="width:35em;"><?= stripslashes($strImpressum) ?></textarea>
</div> </div>
</div> </div>
<br> <br>
@@ -164,7 +132,27 @@
<input type="hidden" name="csrf" value="<?=$_SESSION['csrf_token']?>"> <input type="hidden" name="csrf" value="<?=$_SESSION['csrf_token']?>">
<input type="submit" class="btn btn-primary" value="Konfiguration ändern"> <input type="submit" class="btn btn-primary" value="Konfiguration ändern">
</form> </form>
<?php endif; ?>
<br><br><br> <br><br><br>
<!-- Auswahl der Kreise -->
<h2>Auswahl Kreise und kreisfreie Städte</h2>
<form method="post" id="districtform" action="district_chk.php">
<?php
$strSQL="select * from district order by district";
$result = $db->query($strSQL);
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$strChecked= ($row['active']==1) ? "checked='checked'" : "";
$strValue=$row['active'];
$strDistrict=$row['district'];
echo "<input type='checkbox' $strChecked id='$strDistrict' name='$strDistrict' value='$strValue'> ";
echo "<label for='$strDistrict'>".$row['title']."</label><br>\n";
}
?>
<br>
<input type="hidden" name="csrf" value="<?=$_SESSION['csrf_token']?>">
<input type="submit" class="btn btn-primary" value="Auswahl ändern">
</form>
</div> </div>
</div> <!-- row --> </div> <!-- row -->
</div> </div>

View File

@@ -5,27 +5,22 @@
if (!$boolLogin) { if (!$boolLogin) {
header("Location: login.php"); header("Location: login.php");
} }
$dbFilename="../db/locations.db";
require("../config.php"); require("../config.php");
if($_POST['csrf'] !== $_SESSION['csrf_token']) { if($_POST['csrf'] !== $_SESSION['csrf_token']) {
die("Ungültiger Token"); die("Ungültiger Token");
} }
$boolActive = (isset($_POST['active'])) ? "1" : "0";
$boolRating = (isset($_POST['rating'])) ? "1" : "0"; $boolRating = (isset($_POST['rating'])) ? "1" : "0";
$boolComment = (isset($_POST['comment'])) ? "1" : "0"; $boolComment = (isset($_POST['comment'])) ? "1" : "0";
$boolUpload = (isset($_POST['fileupload'])) ? "1" : "0"; $boolUpload = (isset($_POST['fileupload'])) ? "1" : "0";
$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";
$boolApprove = (isset($_POST['approve'])) ? "1" : "0";
$boolSidebar = (isset($_POST['sidebar'])) ? "1" : "0";
$strUploaddir = $_POST['uploaddir']; $strUploaddir = $_POST['uploaddir'];
$strStadt = $_POST['district'];
$strTitle = $_POST['title']; $strTitle = $_POST['title'];
$fileGeojson =$_POST['geojson'];
$numInfoLat = $_POST['lat'];
$numInfoLng = $_POST['lng'];
$numZoom = $_POST['zoom'];
$strLogo = $_POST['logo']; $strLogo = $_POST['logo'];
$contactEmail= $_POST['contactEmail']; $contactEmail= $_POST['contactEmail'];
$strImpressum= $_POST['impressum']; $strImpressum= $_POST['impressum'];
@@ -36,27 +31,22 @@
$strImpressum=addslashes($strImpressum); $strImpressum=addslashes($strImpressum);
$strIntroText=addslashes($strIntroText); $strIntroText=addslashes($strIntroText);
$db->query("UPDATE config SET value= '$strUploaddir' WHERE key='uploaddir'"); $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`= '$strTitle' WHERE `key`='title'");
$db->query("UPDATE config SET value= '$strStadt' WHERE key='stadt'"); $db->query("UPDATE `config` SET `value`= '$strLogo' WHERE `key`='logo'");
$db->query("UPDATE config SET value= '$strTitle' WHERE key='title'"); $db->query("UPDATE `config` SET `value`= '$contactEmail' WHERE `key`='contactEmail'");
$db->query("UPDATE config SET value= '$numInfoLat' WHERE key='InfoLat'"); $db->query("UPDATE `config` SET `value`= '$strImpressum' WHERE `key`='impressum'");
$db->query("UPDATE config SET value= '$numInfoLng' WHERE key='InfoLng'"); $db->query("UPDATE `config` SET `value`= '$strUrlBez' WHERE `key`='UrlBez'");
$db->query("UPDATE config SET value= '$numZoom' WHERE key='zoom'"); $db->query("UPDATE `config` SET `value`= '$strUrl' WHERE `key`='url'");
$db->query("UPDATE config SET value= '$strLogo' WHERE key='logo'"); $db->query("UPDATE `config` SET `value`= '$strIntroText' WHERE `key`='IntroText'");
$db->query("UPDATE config SET value= '$contactEmail' WHERE key='contactEmail'"); $db->query("UPDATE `config` SET `value`= '$boolRating' WHERE `key`='boolRating'");
$db->query("UPDATE config SET value= '$strImpressum' WHERE key='impressum'"); $db->query("UPDATE `config` SET `value`= '$boolComment' WHERE `key`='boolComment'");
$db->query("UPDATE config SET value= '$strUrl' WHERE key='url'"); $db->query("UPDATE `config` SET `value`= '$boolUserinfo' WHERE `key`='boolUserinfo'");
$db->query("UPDATE config SET value= '$strUrlBez' WHERE key='UrlBez'"); $db->query("UPDATE `config` SET `value`= '$boolDefect' WHERE `key`='boolDefect'");
$db->query("UPDATE config SET value= '$strIntroText' WHERE key='IntroText'"); $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= '$boolActive' WHERE key='boolActive'"); $db->query("UPDATE `config` SET `value`= '$boolSidebar' WHERE `key`='boolSidebar'");
$db->query("UPDATE config SET value= '$boolRating' WHERE key='boolRating'"); $db->query("UPDATE `config` SET `value`= '$boolDistrictSelection' WHERE `key`='boolDistrictSelection'");
$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: configuration.php"); header("Location: configuration.php");

View File

@@ -1,90 +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');
");

29
admin/district_chk.php Normal file
View File

@@ -0,0 +1,29 @@
<?php
session_start();
$strLoginName=(isset($_SESSION['user'])) ? $_SESSION['user'] : "" ;
$boolLogin = (!empty($strLoginName));
if (!$boolLogin) {
header("Location: login.php");
}
require("../config.php");
if($_POST['csrf'] !== $_SESSION['csrf_token']) {
die("Ungültiger Token");
}
$strSQL="SELECT * FROM district";
$result = $db->query($strSQL);
$numCounter=1;
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$strDistrict=$row['district'];
if (isset($_POST[$strDistrict])) {
$db->query("UPDATE `district` SET `active`= '1' WHERE `district`='$strDistrict'");
} else {
$db->query("UPDATE `district` SET `active`= '0' WHERE `district`='$strDistrict'");
}
}
header("Location: configuration.php");
//print_r($_POST);
?>

View File

@@ -15,8 +15,14 @@
if (!$boolLogin) { if (!$boolLogin) {
header("Location: login.php"); header("Location: login.php");
} }
$strDistrict=$_SESSION['district'];
require("../config.db.php"); if (isset($_SESSION['superadmin'])) {
$boolSuperAdmin = $_SESSION['superadmin']==true;
} else {
$boolSuperAdmin=false;
}
$sqlDistrict = ($boolSuperAdmin) ? "1" : "l.district='$strDistrict'";
require ("../config.php"); require ("../config.php");
// Set headers to make the browser download the results as a csv file // Set headers to make the browser download the results as a csv file
@@ -28,7 +34,9 @@
// Query // Query
$strSQL="SELECT l.id as lid,l.*,adr.* $strSQL="SELECT l.id as lid,l.*,adr.*
FROM location l LEFT JOIN address adr ON l.id=adr.loc_id ORDER BY created_at ASC"; FROM location l LEFT JOIN address adr ON l.id=adr.loc_id
WHERE $sqlDistrict
ORDER BY created_at ASC";
$query = $db->query($strSQL); $query = $db->query($strSQL);
// Fetch the first row // Fetch the first row

View File

@@ -4,7 +4,7 @@
* Ideenmelder * Ideenmelder
* Autor: Walter Hupfeld, Hamm * Autor: Walter Hupfeld, Hamm
* E-Mail: info@hupfeld-software.de * E-Mail: info@hupfeld-software.de
* Version: 1.0 * Version: 3.0
* Datum: 18.05.2021 * Datum: 18.05.2021
* zuletzt geändert: 18.02.2024 * zuletzt geändert: 18.02.2024
******************************** */ ******************************** */
@@ -15,10 +15,16 @@
if (!$boolLogin) { if (!$boolLogin) {
header("Location: login.php"); header("Location: login.php");
} }
if (isset($_SESSION['superadmin'])) {
$boolSuperAdmin = (bool)$_SESSION['superadmin'];
}
$strDistrict = $_SESSION['district'];
$sqlDistrict = ($boolSuperAdmin) ? "1" : "l.district='$strDistrict'";
require ("../config.php"); require ("../config.php");
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="de">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -26,7 +32,7 @@
<link href="../css/font-awesome.min.css" rel="stylesheet"> <link href="../css/font-awesome.min.css" rel="stylesheet">
<script src="../js/jquery.min.js"></script> <script src="../js/jquery.min.js"></script>
<title>Konfigruation</title> <title>Konfiguration</title>
<style> <style>
.leftlabel { width: 10em;} .leftlabel { width: 10em;}
input[type="text"] { width: 18em;} input[type="text"] { width: 18em;}
@@ -46,12 +52,14 @@
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="index.php">Liste <span class="sr-only">(current)</span></a> <a class="nav-link" href="index.php">Liste <span class="sr-only">(current)</span></a>
</li> </li>
<?php if ($boolSuperAdmin): ?>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="configuration.php">Konfiguration </a> <a class="nav-link" href="configuration.php">Konfiguration </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="geocoding.php">Addressen ermitteln </a> <a class="nav-link" href="geocoding.php">Addressen ermitteln </a>
</li> </li>
<?php endif; ?>
<li class="nav-item active"> <li class="nav-item active">
<a class="nav-link" href="export.php">Export </a> <a class="nav-link" href="export.php">Export </a>
</li> </li>
@@ -59,7 +67,6 @@
<a class="nav-link" href="password.php">Passwort ändern </a> <a class="nav-link" href="password.php">Passwort ändern </a>
</li> </li>
</ul> </ul>
<div> <div>
<ul class="navbar-nav mr-auto right"> <ul class="navbar-nav mr-auto right">
<li class="nav-item"> <li class="nav-item">

View File

@@ -3,7 +3,7 @@
* Ideenmelder * Ideenmelder
* Autor: Walter Hupfeld, Hamm * Autor: Walter Hupfeld, Hamm
* E-Mail: info@hupfeld-software.de * E-Mail: info@hupfeld-software.de
* Version: 1.0 * Version: 3.0
* Datum: 18.05.2021 * Datum: 18.05.2021
* zuletzt geändert: 18.02.2024 * zuletzt geändert: 18.02.2024
*/ */
@@ -14,7 +14,10 @@
if (!$boolLogin) { if (!$boolLogin) {
header("Location: login.php"); header("Location: login.php");
} }
require_once("../config.db.php"); if (isset($_SESSION['superadmin'])) {
$boolSuperAdmin = (bool)$_SESSION['superadmin'];
}
$strDistrict=$_SESSION['district'];
require ("../config.php"); require ("../config.php");
require ("../lib/geocoding.php"); require ("../lib/geocoding.php");
$boolRefresh = (isset($_GET['refresh']) & $_GET['refresh']==1); $boolRefresh = (isset($_GET['refresh']) & $_GET['refresh']==1);
@@ -25,7 +28,7 @@
} }
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="de">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -33,12 +36,11 @@
<link href="../css/font-awesome.min.css" rel="stylesheet"> <link href="../css/font-awesome.min.css" rel="stylesheet">
<script src="../js/jquery.min.js"></script> <script src="../js/jquery.min.js"></script>
<title>Konfigruation</title> <title>Konfiguration</title>
<style> <style>
.leftlabel { width: 10em;} .leftlabel { width: 10em;}
input[type="text"] { width: 18em;} input[type="text"] { width: 18em;}
input.wide {width: 24em;} input.wide {width: 24em;}
</style> </style>
</head> </head>
<body> <body>
@@ -59,7 +61,6 @@
<li class="nav-item active"> <li class="nav-item active">
<a class="nav-link" href="geocoding.php">Addressen ermitteln </a> <a class="nav-link" href="geocoding.php">Addressen ermitteln </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="export.php">Export </a> <a class="nav-link" href="export.php">Export </a>
</li> </li>
@@ -67,7 +68,6 @@
<a class="nav-link" href="password.php">Passwort ändern </a> <a class="nav-link" href="password.php">Passwort ändern </a>
</li> </li>
</ul> </ul>
<div> <div>
<ul class="navbar-nav mr-auto right"> <ul class="navbar-nav mr-auto right">
<li class="nav-item"> <li class="nav-item">

View File

@@ -1,32 +1,44 @@
<?php <?php
/** ***************************** /** *****************************
* Ideenmelder * Ideenmelder
* Autor: Walter Hupfeld, Hamm * Autor: Walter Hupfeld, Hamm
* E-Mail: info@hupfeld-software.de * E-Mail: info@hupfeld-software.de
* Version: 1.0 * Version: 3.0
* Datum: 18.05.2021 * Datum: 18.05.2021
* zuletzte bearbeitet: 15.03.2024
******************************** */ ******************************** */
session_start(); session_start();
$strLoginName=(isset($_SESSION['user'])) ? $_SESSION['user'] : "" ; $strLoginName=(isset($_SESSION['user'])) ? $_SESSION['user'] : "" ;
$boolLogin = (!empty($strLoginName)); $boolLogin = (!empty($strLoginName));
if (!$boolLogin) { if (!$boolLogin) {
header("Location: login.php"); header("Location: login.php");
} }
if (isset($_SESSION['superadmin'])) {
$boolSuperAdmin = (bool)$_SESSION['superadmin'];
}
$strDistrict = $_SESSION['district'];
$sqlDistrict = ($boolSuperAdmin) ? "1" : "l.district='$strDistrict'";
$dbFilename = "../db/locations.db";
include("../config.php"); include("../config.php");
$boolShowmap=false; $boolShowmap=false;
$sqlDistrict = ($boolSuperAdmin) ? "1" : "l.district='$strDistrict'";
$strDistrictTitle = ($boolSuperAdmin) ? "" : $strDistrictTitle;
// --------- Eintag löschen -----------------
if (isset($_GET['delid'])) { if (isset($_GET['delid'])) {
if($_GET['csrf'] !== $_SESSION['csrf_token']) { if($_GET['csrf'] !== $_SESSION['csrf_token']) {
die("Ungültiger Token"); die("Ungültiger Token");
} }
$numDelete = (int)$_GET['delid']; $numDelete = (int)$_GET['delid'];
$stmt = $db->prepare("DELETE FROM location WHERE id = :id"); 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->bindValue(":district",$strDistrict);
}
$stmt->bindValue(":id",$numDelete); $stmt->bindValue(":id",$numDelete);
$stmt->execute(); $stmt->execute();
@@ -47,7 +59,9 @@
$stmt->bindValue(":loc_id",$numDelete); $stmt->bindValue(":loc_id",$numDelete);
$stmt->execute(); $stmt->execute();
} }
// ------- Kommentar löschen ------------
// keine Überprüfung - ob richtiger District
if (isset($_GET['delcid'])) { if (isset($_GET['delcid'])) {
if($_GET['csrf'] !== $_SESSION['csrf_token']) { if($_GET['csrf'] !== $_SESSION['csrf_token']) {
die("Ungültiger Token"); die("Ungültiger Token");
@@ -58,12 +72,24 @@
$stmt->execute(); $stmt->execute();
} }
// --------- Feigabe verändern -------------
// Keine Überprüfung, ob richtiger District
if (isset($_GET['approvalId'])) {
if($_GET['csrf'] !== $_SESSION['csrf_token']) {
die("Ungültiger Token");
}
$numApproval=(int)$_GET['approvalId'];
$stmt = $db->prepare("UPDATE location SET approval = not approval WHERE id= :id");
$stmt->bindValue(":id",$numApproval);
$stmt->execute();
}
// ----------- Bild löschen -----------------
// Keine Überprüfung, ob richtiger District
if (isset($_GET['delfid'])) { if (isset($_GET['delfid'])) {
if($_GET['csrf'] !== $_SESSION['csrf_token']) { if($_GET['csrf'] !== $_SESSION['csrf_token']) {
die("Ungültiger Token"); die("Ungültiger Token");
} }
$numDelete=(int)$_GET['delfid']; $numDelete=(int)$_GET['delfid'];
$stmt = $db->prepare("SELECT * FROM files where id = :id"); $stmt = $db->prepare("SELECT * FROM files where id = :id");
$stmt->bindParam(':id', $id); $stmt->bindParam(':id', $id);
@@ -76,9 +102,9 @@
$stmt = $db->prepare("DELETE FROM files WHERE id= :id"); $stmt = $db->prepare("DELETE FROM files WHERE id= :id");
$stmt->bindValue(":id",$numDelete); $stmt->bindValue(":id",$numDelete);
$stmt->execute(); $stmt->execute();
} }
// Karte zeigen
if (isset($_GET['showmap'])) { if (isset($_GET['showmap'])) {
$numShowmap=(int)$_GET['showmap']; $numShowmap=(int)$_GET['showmap'];
$boolShowmap=$numShowmap==1; $boolShowmap=$numShowmap==1;
@@ -99,6 +125,7 @@
4 => "<i class='fa fa-car'></i>", 4 => "<i class='fa fa-car'></i>",
5 => "<i class='fa fa-truck'></i>" 5 => "<i class='fa fa-truck'></i>"
); );
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="de"> <html lang="de">
@@ -107,17 +134,20 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../css/bootstrap.min.css" /> <link rel="stylesheet" href="../css/bootstrap.min.css" />
<link rel="stylesheet" href="../css/font-awesome.min.css"> <link rel="stylesheet" href="../css/font-awesome.min.css">
<link rel="stylesheet" href="../css/lightbox.css" /> <link rel="stylesheet" href="../css/jquery.fancybox.min.css" />
<link rel="stylesheet" href="../css/leaflet.css" /> <link rel="stylesheet" href="../css/leaflet.css" />
<link rel="stylesheet" href="../css/leaflet.awesome-markers.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/jquery.min.js"></script>
<script src="../js/leaflet.js"></script> <script src="../js/leaflet.js"></script>
<script src="../js/leaflet.awesome-markers.js"></script> <script src="../js/leaflet.awesome-markers.js"></script>
<script src="../js/lightbox.min.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> <style>
.tdmap { height:350px; width:300px;} .tdmap { height:350px; width:300px;}
</style> </style>
@@ -126,7 +156,7 @@
<!-- Navbar --> <!-- Navbar -->
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top"> <nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="#">Administration <?= $strTitle ?></a> <a class="navbar-brand" href="#">Administration <?=$strTitle?> <?=$strDistrictTitle?></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbars" aria-controls="navbars" aria-expanded="false" aria-label="Toggle navigation"> <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> <span class="navbar-toggler-icon"></span>
</button> </button>
@@ -135,21 +165,21 @@
<li class="nav-item active"> <li class="nav-item active">
<a class="nav-link" href="index.php">Liste <span class="sr-only">(current)</span></a> <a class="nav-link" href="index.php">Liste <span class="sr-only">(current)</span></a>
</li> </li>
<?php if ($boolSuperAdmin): ?>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="configuration.php">Konfiguration </a> <a class="nav-link" href="configuration.php">Konfiguration </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="geocoding.php">Addressen ermitteln </a> <a class="nav-link" href="geocoding.php">Addressen ermitteln </a>
</li> </li>
<?php endif; ?>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="export.php">Export </a> <a class="nav-link" href="export.php">Export </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="password.php">Passwort ändern </a> <a class="nav-link" href="password.php">Passwort ändern </a>
</li> </li>
</ul> </ul>
<div> <div>
<ul class="navbar-nav mr-auto right"> <ul class="navbar-nav mr-auto right">
<li class="nav-item"> <li class="nav-item">
@@ -161,9 +191,11 @@
<!-- Ende Navbar --> <!-- Ende Navbar -->
<div class="container-fluid" style="margin-top:5em;"> <div class="container-fluid" style="margin-top:5em;">
<table class="table table-bordered table-striped"> <table id="list" class="display">
<thead> <thead>
<tr><th>id</th><th>Username</th> <tr><th>id</th>
<?= ($boolSuperAdmin) ? "<th>Kreis</th>" : "" ?>
<th>Username</th>
<?= ($boolUserinfo) ? "<th>Alter</th><th>Transport</th>" : "" ?> <?= ($boolUserinfo) ? "<th>Alter</th><th>Transport</th>" : "" ?>
<th>Topic</th> <th>Topic</th>
<th>Beschreibung</th> <th>Beschreibung</th>
@@ -174,19 +206,23 @@
<th>Bild</th> <th>Bild</th>
<th>lat/lng</th> <th>lat/lng</th>
<th>Datum</th> <th>Datum</th>
<?= ($boolApprove) ? "<th>Freigabe</th>" : "" ?>
<th>Aktion</th></tr> <th>Aktion</th></tr>
</thead> </thead>
<tbody> <tbody>
<?php <?php
$strScript=""; $strScript="";
//$strSQL="SELECT * FROM location ORDER BY created_at DESC"; $strSQL="SELECT l.id as lid,l.*,adr.*
$strSQL="SELECT l.id as lid,l.*,adr.* FROM location l LEFT JOIN address adr ON l.id=adr.loc_id ORDER BY created_at ASC"; FROM location l LEFT JOIN address adr ON l.id=adr.loc_id
WHERE $sqlDistrict
ORDER BY approval, created_at ASC";
$result = $db->query($strSQL); $result = $db->query($strSQL);
while ($row = $result->fetch(PDO::FETCH_ASSOC)) { while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$id = $row['lid']; $id = $row['lid'];
echo "<tr>"; echo "<tr>";
echo "<td>".$id."</td>"; echo "<td>".$id."</td>";
echo ($boolSuperAdmin) ? "<td>".$row['district']."</td>" : "";
echo "<td>". stripslashes($row['username']) ."</td>"; echo "<td>". stripslashes($row['username']) ."</td>";
echo ($boolUserinfo) ? "<td>".$row['age']."</td><td>".$row['transport']."</td>" : ""; echo ($boolUserinfo) ? "<td>".$row['age']."</td><td>".$row['transport']."</td>" : "";
echo "<td>".$arrIcon[$row['topic']]." ".$arrTopic[$row['topic']]."</td>"; echo "<td>".$arrIcon[$row['topic']]." ".$arrTopic[$row['topic']]."</td>";
@@ -203,27 +239,32 @@
$strDatum = date("d.m.Y",$numDatum); $strDatum = date("d.m.Y",$numDatum);
echo $strDatum."</em><br>"; echo $strDatum."</em><br>";
echo nl2br(stripslashes($comment['comment'])); 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 "</div>";
} }
echo "</td>"; echo "</td>";
echo "<td>".$row['road']." ".$row['house_number']."<br>" echo "<td>".$row['road']." ".$row['house_number']."<br>"
.$row['neighbourhood']." " .$row['neighbourhood']." "
.$row['hamlet']." " .$row['hamlet']." "
.$row['suburb']."</td>"; .$row['suburb']."<br>"
$strDefect = (isset($row['defect']) && $row['defect']>0) ? $arrDefect[$row['defect']] : ""; .$row['postcode']." ".$row['city']."</td>";
$strDefect = (isset($row['defect']) && $row['defect']>=0) ? $arrDefect[$row['defect']] : "";
echo "<td id='defect_".$id."' value='".$row['defect']."'>".$strDefect."</td>\n"; echo "<td id='defect_".$id."' value='".$row['defect']."'>".$strDefect."</td>\n";
// NRW-Hindernismelder keine leere Eingabe
echo "<td id='img_".$id."'>"; echo "<td id='img_".$id."'>";
$strSQL = "SELECT id,filename FROM files WHERE loc_id=".$id; $strSQL = "SELECT id,filename FROM files WHERE loc_id=".$id;
$files=$db->query($strSQL); $files=$db->query($strSQL);
if ($file=$files->fetch(PDO::FETCH_ASSOC)) { if ($file=$files->fetch(PDO::FETCH_ASSOC)) {
echo "<a href='../images/".$file['filename']."' data-lightbox='radweg".$id."'>"; echo "<a href='../images/".$file['filename']."' data-fancybox data-caption='".$strDefect."'>";
echo "<img src='../images/".$file['filename']."' style='width:150px'></a>"; 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"; echo "</td>\n";
// Karte einblenden
// Karte einblenden - Für HTML-Export
if ($boolShowmap) { if ($boolShowmap) {
echo "<td><div class='tdmap' id='map_".$id."'></div></td>\n"; echo "<td><div class='tdmap' id='map_".$id."'></div></td>\n";
} }
@@ -231,17 +272,27 @@
echo "<td>".round($row['lat'],5)." ".round($row['lng'],5)."</td>"; echo "<td>".round($row['lat'],5)." ".round($row['lng'],5)."</td>";
} }
echo "<td>".$row['created_at']."</td>"; echo "<td>".$row['created_at']."</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>"; if ($boolApprove) {
$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']."'>".
"<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 "</td>";
echo "</tr>\n"; echo "</tr>\n";
if ($boolShowmap) { if ($boolShowmap) {
$strScript.="var mymap_".$id." = L.map(map_".$id.").setView([".$row['lat'].", ".$row['lng']."], 16);\n"; $strScript.="var mymap_".$id." = L.map(map_".$id.").setView([".$row['lat'].", ".$row['lng']."], 16);\n";
$strScript.="L.tileLayer(url, {maxZoom: 18,minZoom:12,attribution: attribution,id: 'mapbox/streets-v11',tileSize: 512,zoomOffset: -1}).addTo(mymap_".$id.")\n"; $strScript.="L.tileLayer(url, {maxZoom: 18,minZoom:12,attribution: attribution,id: 'mapbox/streets-v11',tileSize: 512,zoomOffset: -1}).addTo(mymap_".$id.")\n";
$strScript.="L.marker([".$row['lat'].", ".$row['lng']."], { icon: infoMarker } ).addTo(mymap_".$id.")\n\n"; $strScript.="L.marker([".$row['lat'].", ".$row['lng']."], { icon: infoMarker } ).addTo(mymap_".$id.")\n\n";
} }
} }
?> ?>
</tbody> </tbody>
</table> </table>
<a class="btn btn-primary" href="../index.php?ref=1">zurück</a> <a class="btn btn-primary" href="../index.php?ref=1">zurück</a>
@@ -252,6 +303,12 @@
<script> <script>
$( document ).ready(function() { $( 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 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, ' + var attribution = 'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, ' +
@@ -259,7 +316,6 @@ $( document ).ready(function() {
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>'; 'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>';
var infoMarker = L.AwesomeMarkers.icon({icon: 'info', prefix: 'fa', markerColor: 'orange'}); var infoMarker = L.AwesomeMarkers.icon({icon: 'info', prefix: 'fa', markerColor: 'orange'});
$(".edit_defect").on("click", function(e){ $(".edit_defect").on("click", function(e){
e.preventDefault(); e.preventDefault();
$('#dialog_defect').hide(); $('#dialog_defect').hide();
@@ -277,6 +333,7 @@ $( document ).ready(function() {
return false; return false;
}) })
//Sicherheitsabfrage beim Löschen von Einträgen
$(".del").click(function () { $(".del").click(function () {
result=confirm("Wirklich löschen?"); result=confirm("Wirklich löschen?");
return result===true; return result===true;
@@ -295,7 +352,6 @@ $( document ).ready(function() {
processData: false, processData: false,
contentType: false, contentType: false,
cache: false, cache: false,
success: function(data) success: function(data)
{ {
$("#dialog_defect").hide(); $("#dialog_defect").hide();
@@ -324,10 +380,8 @@ $( document ).ready(function() {
$('#close').click(function(e){ $('#close').click(function(e){
$('#dialog_defect').hide(); $('#dialog_defect').hide();
}); });
<?= $strScript ?> <?= $strScript ?>
}); });
</script> </script>
</body> </body>

View File

@@ -1,5 +1,11 @@
<?php <?php
session_start(); session_start();
if (isset($_SESSION['district'])) {
$strDistrict=$_SESSION['district'];
}
session_destroy(); session_destroy();
session_start();
$_SESSION['district']=$strDistrict;
header ("Location: ../index.php"); header ("Location: ../index.php");

View File

@@ -4,15 +4,21 @@
* Ideenmelder * Ideenmelder
* Autor: Walter Hupfeld, Hamm * Autor: Walter Hupfeld, Hamm
* E-Mail: info@hupfeld-software.de * E-Mail: info@hupfeld-software.de
* Version: 1.0 * Version: 3.0
* Datum: 18.05.2021 * Datum: 18.05.2021
* letzte Änderung: 12.03.2024
******************************** */ ******************************** */
session_start(); session_start();
$dbFilename="../db/locations.db"; $strDistrict=$_SESSION['district'];
require ("../config.php");
$strLoginName=(isset($_SESSION['user'])) ? $_SESSION['user'] : "" ; $strLoginName=(isset($_SESSION['user'])) ? $_SESSION['user'] : "" ;
if (isset($_SESSION['superadmin'])) {
$boolSuperAdmin = $_SESSION['superadmin']==true;
} else {
$boolSuperAdmin=false;
}
require ("../config.php");
$boolLogin = (!empty($strLoginName)); $boolLogin = (!empty($strLoginName));
if (!$boolLogin) { if (!$boolLogin) {
header("Location: login.php"); header("Location: login.php");
@@ -44,7 +50,7 @@
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="de">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -72,9 +78,14 @@
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="index.php">Liste <span class="sr-only">(current)</span></a> <a class="nav-link" href="index.php">Liste <span class="sr-only">(current)</span></a>
</li> </li>
<?php if ($boolSuperAdmin): ?>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="configuration.php">Konfiguration </a> <a class="nav-link" href="configuration.php">Konfiguration </a>
</li> </li>
<li class="nav-item">
<a class="nav-link" href="geocoding.php">Addressen ermitteln </a>
</li>
<? endif; ?>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="export.php">Export </a> <a class="nav-link" href="export.php">Export </a>
</li> </li>

View File

@@ -6,27 +6,16 @@
if (!$boolLogin) { if (!$boolLogin) {
header("Location: login.php"); header("Location: login.php");
} }
$strDistrict=$_SESSION['district'];
$dbFilename = "../db/locations.db"; if (isset($_SESSION['superadmin'])) {
$boolSuperAdmin = $_SESSION['superadmin']==true;
} else {
$boolSuperAdmin=false;
}
include("../config.php"); include("../config.php");
$sqlDistrict = ($boolSuperAdmin) ? "1" : "l.district='$strDistrict'";
$arrTopic = array (
1 => "Fußverkehr",
2 => "Radverkehr",
3 => "Bus und Bahn",
4 => "Pkw-Verkehr",
5 => "Lkw-Verkehr"
);
$arrIcon = array (
1 => "<i class='fa fa-male'></i>",
2 => "<i class='fa fa-bicycle'></i>",
3 => "<i class='fa fa-train'></i>",
4 => "<i class='fa fa-car'></i>",
5 => "<i class='fa fa-truck'></i>"
);
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="de"> <html lang="de">
@@ -50,12 +39,11 @@
<body> <body>
<div class="container-fluid"> <div class="container-fluid">
<table class="table table-bordered table-striped"> <table class="table table-bordered table-striped">
<thead> <thead>
<tr><th>id</th><th>Username</th> <tr><th>id</th>
<th>Username</th>
<?= ($boolUserinfo) ? "<th>Alter</th><th>Transport</th>" : ""; ?> <?= ($boolUserinfo) ? "<th>Alter</th><th>Transport</th>" : ""; ?>
<th>Topic</th> <th>Topic</th>
<th>Beschreibung</th> <th>Beschreibung</th>
@@ -70,7 +58,10 @@
<?php <?php
$strScript=""; $strScript="";
$strSQL="SELECT l.id as lid,l.*,adr.* FROM location l LEFT JOIN address adr ON l.id=adr.loc_id ORDER BY city,postcode,suburb,hamlet,road ASC"; $strSQL="SELECT l.id as lid,l.*,adr.*
FROM location l LEFT JOIN address adr ON l.id=adr.loc_id
WHERE $sqlDistrict
ORDER BY city,postcode,suburb,hamlet,road ASC";
$result = $db->query($strSQL); $result = $db->query($strSQL);
while ($row = $result->fetch(PDO::FETCH_ASSOC)) { while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$id = $row['lid']; $id = $row['lid'];
@@ -96,7 +87,7 @@
echo "</div>"; echo "</div>";
} }
echo "</td>"; 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>".$strDefect."</td>\n";
echo "<td>"; echo "<td>";
@@ -114,7 +105,6 @@
$strScript.="var mymap_".$id." = L.map(map_".$id.").setView([".$row['lat'].", ".$row['lng']."], 16);\n"; $strScript.="var mymap_".$id." = L.map(map_".$id.").setView([".$row['lat'].", ".$row['lng']."], 16);\n";
$strScript.="L.tileLayer(url, {maxZoom: 18,minZoom:12,attribution: attribution,id: 'mapbox/streets-v11',tileSize: 512,zoomOffset: -1}).addTo(mymap_".$id.")\n"; $strScript.="L.tileLayer(url, {maxZoom: 18,minZoom:12,attribution: attribution,id: 'mapbox/streets-v11',tileSize: 512,zoomOffset: -1}).addTo(mymap_".$id.")\n";
$strScript.="L.marker([".$row['lat'].", ".$row['lng']."], { icon: infoMarker } ).addTo(mymap_".$id.")\n\n"; $strScript.="L.marker([".$row['lat'].", ".$row['lng']."], { icon: infoMarker } ).addTo(mymap_".$id.")\n\n";
} }
?> ?>
</tbody> </tbody>
@@ -122,17 +112,15 @@
<a class="btn btn-primary" href="../index.php?ref=1">zurück</a> <a class="btn btn-primary" href="../index.php?ref=1">zurück</a>
</div> </div>
</body> </body>
<script> <script>
$( document ).ready(function() { $( document ).ready(function() {
var url = 'https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=<?=$mapbox_key?>';
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, ' + 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>, ' + '<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>'; 'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>';
var infoMarker = L.AwesomeMarkers.icon({icon: 'info', prefix: 'fa', markerColor: 'orange'}); var infoMarker = L.AwesomeMarkers.icon({icon: 'info', prefix: 'fa', markerColor: 'orange'});
<?= $strScript ?> <?= $strScript ?>

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,9 +1,16 @@
<?php <?php
/** *****************************
* Ideenmelder
* Autor: Walter Hupfeld, Hamm
* E-Mail: info@hupfeld-software.de
* Version: 1.0
* Datum: 18.05.2021
* zuletzt geändert: 18.02.2024
******************************** */
// Query // Query
$dbFilename="../db/locations.db";
require ("../config.php"); require_once ("../config.php");
$result = $db->query("SELECT * FROM location ORDER BY created_at ASC"); $result = $db->query("SELECT * FROM location ORDER BY created_at ASC");
@@ -14,13 +21,14 @@ $coords_array = array ();
while ($row = $result->fetch(PDO::FETCH_ASSOC)) { while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$coords_array[]=$row; $coords_array[]=$row;
} }
//DEBUG echo "<pre>"; print_r($coords_array); echo "</pre>";
// If no results are found, echo a message and stop // If no results are found, echo a message and stop
//if ($coords_array == false) { echo "No results"; exit; } //if ($coords_array == false) { echo "No results"; exit; }
unlink ("shape/ideenmelder.shp"); if (file_exists("shape/ideenmelder.shp")) {unlink ("shape/ideenmelder.shp");}
unlink ("shape/ideenmelder.dbf"); if (file_exists("shape/ideenmelder.dbf")) {unlink ("shape/ideenmelder.dbf");}
unlink ("shape/ideenmelder.shx"); if (file_exists("shape/ideenmelder.shx")) {unlink ("shape/ideenmelder.shx");}
//unlink ("shape/ideenmelder.dbt"); //unlink ("shape/ideenmelder.dbt");
require_once('../vendor/Shapefile/ShapefileAutoloader.php'); require_once('../vendor/Shapefile/ShapefileAutoloader.php');
@@ -35,10 +43,9 @@ use Shapefile\Geometry\Point;
try { try {
// Open Shapefile // Open Shapefile
$Shapefile = new ShapefileWriter('shape/ideenmelder.shp'); $Shapefile = new ShapefileWriter('shape/ideenmelder.shp');
// Set shape type // Set shape type
$Shapefile->setShapeType(Shapefile::SHAPE_TYPE_POINT); $Shapefile->setShapeType(Shapefile::SHAPE_TYPE_POINT);
// Create field structure // Create field structure
$Shapefile->addNumericField('ID', 10); $Shapefile->addNumericField('ID', 10);
$Shapefile->addCharField('DESC'); $Shapefile->addCharField('DESC');
@@ -47,7 +54,7 @@ try {
$Shapefile->addCharField('DEFECT',60); $Shapefile->addCharField('DEFECT',60);
foreach ($coords_array as $coords) { 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 // Create a Point Geometry
$lat=$coords['lat']; $lat=$coords['lat'];
$lon=$coords['lng']; $lon=$coords['lng'];

View File

@@ -1,5 +1,5 @@
<?php <?php
$dbFilename="../db/locations.db";
require ("../config.php"); require ("../config.php");
if ($boolComment){ if ($boolComment){

View File

@@ -1,38 +1,48 @@
<?php <?php
$dbFilename="../db/locations.db";
require_once("../config.db.php"); require_once("../config.db.php");
require_once("../config.php"); require_once("../config.php");
require_once("../lib/functions.php"); require_once("../lib/functions.php");
require_once("../lib/geocoding.php"); require_once("../lib/geocoding.php");
$allowed_extensions = array("jpg", "jpeg", "png", "gif");
$strUsername = htmlentities(trim($_POST['username'])); $strUsername = htmlentities(trim($_POST['username']));
$strUsername = addslashes($strUsername); $strUsername = addslashes($strUsername);
$strAge = (isset($_POST['ext_age'])) ? $_POST['ext_age'] : ""; $strAge = (isset($_POST['ext_age'])) ? $_POST['ext_age'] : "";
$strTransport = (isset($_POST['ext_transport'])) ? $_POST['ext_transport'] : ""; $strTransport = (isset($_POST['ext_transport'])) ? $_POST['ext_transport'] : "";
$strDescription = htmlentities(trim($_POST['description'])); $strDescription = htmlentities(trim($_POST['description']));
$strDescription = addslashes($strDescription); $strDescription = addslashes($strDescription);
$numTopic = (isset($_POST['topic'])) ? $_POST['topic'] : 1; $numTopic = (isset($_POST['topic'])) ? $_POST['topic'] : 2;
$numDefect = (isset($_POST['defect'])) ? $_POST['defect'] : 0; $numDefect = (isset($_POST['defect'])) ? $_POST['defect'] : 0;
$numLng = $_POST['lng']; $numLng = $_POST['lng'];
$numLat = $_POST['lat']; $numLat = $_POST['lat'];
$strDistrict = $_POST['district'];
$boolUploadOk=false; $boolUploadOk=false;
//Leere Einträge verhindern
if (empty($strUsername) || empty($numLng) || empty($numLat)) {
die("not valid!");
}
if ($boolUpload && !empty($_FILES['uploadfile']['name'])) { if ($boolUpload && !empty($_FILES['uploadfile']['name'])) {
$uploadfile = $uploaddir . basename($_FILES['uploadfile']['name']); $file=$_FILES['uploadfile'];
$fileinfo = @getimagesize($_FILES["uploadfile"]["tmp_name"]); $fileinfo = @getimagesize($file["tmp_name"]);
if (!empty($fileinfo)) { if (!empty($fileinfo)) {
//$info=read_gps_location($_FILES["uploadfile"]["tmp_name"]); //$info=read_gps_location($_FILES["uploadfile"]["tmp_name"]);
$i=1; $file_extension = pathinfo($file["name"], PATHINFO_EXTENSION);
while (file_exists($uploadfile)) { if (!in_array(strtolower($file_extension), $allowed_extensions)) {
$uploadfile=$uploaddir.$i."_".basename($_FILES['uploadfile']['name']); echo "Invalid file type. Please upload only jpg, jpeg, png, or gif images.";
$i++; exit();
} }
if (move_uploaded_file($_FILES['uploadfile']['tmp_name'], $uploadfile)) { $strNewfilename = uniqid("", true) . "." . $file_extension;
$filename=$_FILES['uploadfile']['name']; while (file_exists($uploaddir . $strNewfilename)) {
$filesize=$_FILES['uploadfile']['size']; $strNewfilename = uniqid("", true) . "." . $file_extension;
$filetype=$_FILES['uploadfile']['type']; }
//echo "Filetype: ".$filetype; if (move_uploaded_file($file['tmp_name'], $uploaddir.$strNewfilename)) {
$filename=$strNewfilename;//$file['name'];
$filesize=$file['size'];
$filetype=$file['type'];
$boolUploadOk = true; $boolUploadOk = true;
} else { } else {
die("Upload failed with error code " . $_FILES['file']['error']); die("Upload failed with error code " . $_FILES['file']['error']);
@@ -40,8 +50,8 @@ if ($boolUpload && !empty($_FILES['uploadfile']['name'])) {
} }
} }
$stmt = $db->prepare("INSERT INTO location (username,age,transport,description,defect,topic,lng,lat) $stmt = $db->prepare("INSERT INTO location (username,age,transport,description,defect,topic,lng,lat,district)
VALUES (:username,:age,:transport,:description,:defect,:topic,:lng,:lat)"); VALUES (:username,:age,:transport,:description,:defect,:topic,:lng,:lat,:district)");
$stmt->bindValue(':username', $strUsername); $stmt->bindValue(':username', $strUsername);
$stmt->bindValue(':age', $strAge); $stmt->bindValue(':age', $strAge);
@@ -51,6 +61,7 @@ $stmt->bindValue(':topic', $numTopic);
$stmt->bindValue(':lng', $numLng); $stmt->bindValue(':lng', $numLng);
$stmt->bindValue(':lat', $numLat); $stmt->bindValue(':lat', $numLat);
$stmt->bindValue(':defect', $numDefect); $stmt->bindValue(':defect', $numDefect);
$stmt->bindValue(':district',$strDistrict);
$stmt->execute(); $stmt->execute();
// fetch last_id - sqlite // fetch last_id - sqlite
@@ -84,8 +95,4 @@ if ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$markerText=generate_tooltip_description($row); $markerText=generate_tooltip_description($row);
$markerText=stripcslashes($markerText); $markerText=stripcslashes($markerText);
} }
echo ($markerText);
echo ($markerText);

View File

@@ -1,5 +1,5 @@
<?php <?php
$dbFilename="../db/locations.db";
require_once("../config.php"); require_once("../config.php");
$mode = trim($_POST['mode']); $mode = trim($_POST['mode']);

View File

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

View File

@@ -1,14 +0,0 @@
<?
$db_server = "mariadb";
$db_user = "root";
$db_passwd = "g0r@w@";
$db_name = "nrw_melder";
$cachetime = 0;
$location_key="8b0d633d90b501";
try {
$db = new PDO('mysql:host='.$db_server.';dbname='.$db_name.';charset=utf8mb4', $db_user, $db_passwd);
} catch (PDOException $e) {echo "Fehler: ".$e->getMessage(); die();}

View File

@@ -8,6 +8,7 @@ $db_name = "nrw_melder";
$cachetime = 0; $cachetime = 0;
$location_key=""; $location_key="";
$mapbox_key="";
try { try {
$db = new PDO('mysql:host='.$db_server.';dbname='.$db_name.';charset=utf8mb4', $db_user, $db_passwd); $db = new PDO('mysql:host='.$db_server.';dbname='.$db_name.';charset=utf8mb4', $db_user, $db_passwd);

View File

@@ -4,90 +4,128 @@
* Ideenmelder * Ideenmelder
* Autor: Walter Hupfeld, Hamm * Autor: Walter Hupfeld, Hamm
* E-Mail: info@hupfeld-software.de * E-Mail: info@hupfeld-software.de
* Version: 1.0 * Version: 3.0
* Datum: 18.05.2021 * Datum: 18.02.2024
* zuletzt bearbeitet: 11.03.2024
******************************** */ ******************************** */
require_once("config.db.php"); require_once("config.db.php");
$strSQL = "select * from config"; $boolTopics=false;
$result = $db->query($strSQL);
while ($row = $result->fetch(PDO::FETCH_ASSOC)) { $strSQL = "select * from config";
switch ($row['key']) { $result = $db->query($strSQL);
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 "zoom":
$numZoom=$row['value'];
break;
case "logo":
$strLogo=$row['value'];
break;
case "contactEmail":
$contactEmail =$row['value'];
break;
case "impressum":
$strImpressum =$row['value'];
break;
case "url":
$strUrl =$row['value'];
break;
case "UrlBez":
$strUrlBez =$row['value'];
break;
case "IntroText":
$strIntroText=$row['value'];
break;
case "boolActive":
$boolActive = ($row['value']=="1");
break;
case "boolRating":
$boolRating = ($row['value']=="1");
break;
case "boolComment":
$boolComment = ($row['value']=="1");
break;
case "boolUpload":
$boolUpload = ($row['value']=="1");
break;
case "boolDefect":
$boolDefect = ($row['value']=="1");
break;
case "boolUserinfo":
$boolUserinfo = ($row['value']=="1");
break;
default: // Allegemeine Konfiguration
echo "Fehler bei ".$row['key']; while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
// Ende Lokalisierung switch ($row['key']) {
case "uploaddir" :
break; $uploaddir=$row['value'];
} break;
case "title" :
$strTitle=$row['value'];
break;
case "logo":
$strLogo=$row['value'];
break;
case "contactEmail":
$contactEmail =$row['value'];
break;
case "introText":
$strIntroText =$row['value'];
break;
case "impressum":
$strImpressum =$row['value'];
break;
case "url":
$strUrl =$row['value'];
break;
case "UrlBez":
$strUrlBez =$row['value'];
break;
case "boolRating":
$boolRating = ($row['value']=="1");
break;
case "boolComment":
$boolComment = ($row['value']=="1");
break;
case "boolUpload":
$boolUpload = ($row['value']=="1");
break;
case "boolDefect":
$boolDefect = ($row['value']=="1");
break;
case "boolUserinfo":
$boolUserinfo = ($row['value']=="1");
break;
case "boolDistrictSelection":
$boolDistrictSelection = ($row['value']=="1");
break;
case "boolApprove":
$boolApprove = ($row['value']=="1");
break;
case "boolSidebar":
$boolSidebar = ($row['value']=="1");
break;
default: ;
//echo "Fehler bei ".$row['key'];
// Ende Lokalisierung
break;
} }
}
// Falls der Parameter district fehlt => Hamm
$result= $db->prepare("SELECT count(*) FROM district WHERE district=:district");
$result->bindParam(":district",$strDistrict);
$result->execute();
if ($row=$result->fetch(PDO::FETCH_NUM)) {
if ($row[0]==0) {
$strDistrict="unkown"; //default setzten
$strDistrictTitle="Unbekannt";
}
}
// Spezifische Konfiguration für Districtt
$result= $db->prepare("SELECT * FROM district WHERE district=:district");
$result->bindParam(":district",$strDistrict);
$result->execute();
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$boolActive = $row['active']==1;
$strDistrict = $row['district'];
$strDistrictTitle = $row['title'];
$strGeojson = $row['geojson'];
$numULAND=$row['ULAND'];
$numUREGBEZ=$row['UREGBEZ'];
$numUKREIS=$row['UKREIS'];
$numUGEMEINDE=$row['UGEMEINDE'];
$numInfoLat=$row['lat'];
$numInfoLng=$row['lng'];
$numZoom=$row['zoom'];
$strIntroText = ($boolActive) ? $strIntroText : "Dateneingabe nicht möglich";
$fileGeojson ="geojson/$strGeojson";
$strLocation = " AND ULAND=$numULAND AND UREGBEZ=$numUREGBEZ AND UKREIS=$numUKREIS ";
if ($numUGEMEINDE>0) {
$strLocation .= "AND UGEMEINDE=$numUGEMEINDE";
}
}
// Arrax mit allen Distrikten für Auswahl
$arrDisctrict = array ();
$strSQL = "SELECT district,title FROM district WHERE active=1 ORDER BY title ASC";
$result=$db->query($strSQL);
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$arrDistrict[$row['district']]=$row['title'];
}
$arrTopic = array ( $arrTopic = array (
2 => "Radverkehr", 2 => "Radverkehr",
1 => "Fußverkehr", // 1 => "Fußverkehr",
3 => "Bus und Bahn", // 3 => "Bus und Bahn",
// 4 => "Pkw-Verkehr", // 4 => "Pkw-Verkehr",
// 5 => "Lkw-Verkehr" // 5 => "Lkw-Verkehr"
); );
@@ -100,6 +138,14 @@ $arrMarkerType = array (
5=>"truckMarker", 5=>"truckMarker",
); );
$arrIcon = array (
1 => "<i class='wa bg-info fa fa-male'></i>",
2 => "<i class='wa bg-success fa fa-bicycle'></i>",
3 => "<i class='wa bg-primary fa fa-bus'></i>",
4 => "<i class='wa bg-danger fa fa-car'></i>",
5 => "<i class='wa bg-warning fa fa-truck'></i>"
);
$arrAge = array ( $arrAge = array (
1 => "keine Angabe", 1 => "keine Angabe",
2 => "bis 14 Jahre", 2 => "bis 14 Jahre",
@@ -111,31 +157,16 @@ $arrAge = array (
); );
$arrDefect = array ( $arrDefect = array (
0 => "Keine Angabe",
1 => "Abrupt endender Radweg", 0 => "Pfosten/Poller",
2 => "Buckelpiste", 1 => "Schranke",
3 => "Gefährliche Gleise/Schienen", 2 => "Umlaufsperre/Drängelgitter",
4 => "Gehweg/Fahrräder frei", 3 => "Laternenmast",
5 => "Falschparker", 4 => "Litfaßsäule",
6 => "Fehlende Abstellmöglichkeiten", 5 => "Stromverteilerkasten",
7 => "Fehlende Radwege", 6 => "Sonstiges"
8 => "Fehlender Abstellbereich",
9 => "Fehlender taktiler Sicherheitstrennstreifen",
10 => "Fehlende Fahrbahnüberleitung",
11 => "Hindernisse auf Radwegen",
12 => "Mangelhafte Radwegmarkierung/kennzeichnung",
13 => "Mögliche grüne Pfeile für Radfahrende",
14 => "Probleme beim Abbiegen",
15 => "Ungenügende Ampelschaltung",
16 => "Ungenügende Bordsteinabsenkung",
17 => "Ungenügender Sicherheitsabstand",
18 => "Ungenügende Wegbreite/Engstellen",
19 => "Unsichere/fehlende Querungsmöglichkeit",
20 => "Unklare Radwegsituation",
21 => "Station für Leihräder",
22 => "Ampelspiegel installieren"
);
);
$arrTransport = array ( $arrTransport = array (
0 => "keine Angabe", 0 => "keine Angabe",
@@ -147,10 +178,3 @@ $arrTransport = array (
6 => "Zu Fuß" 6 => "Zu Fuß"
); );
$arrIcon = array (
1 => "<i class='wa bg-info fa fa-male'></i>",
2 => "<i class='wa bg-success fa fa-bicycle'></i>",
3 => "<i class='wa bg-primary fa fa-bus'></i>",
4 => "<i class='wa bg-danger fa fa-car'></i>",
5 => "<i class='wa bg-warning fa fa-truck'></i>"
);

10
css/bootstrap.min.css vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
css/jquery.fancybox.min.css vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -45,7 +45,10 @@
} }
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */ /* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */ /* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
.leaflet-container .leaflet-overlay-pane svg, .leaflet-container .leaflet-overlay-pane svg {
max-width: none !important;
max-height: none !important;
}
.leaflet-container .leaflet-marker-pane img, .leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img, .leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-tile-pane img, .leaflet-container .leaflet-tile-pane img,
@@ -53,8 +56,15 @@
.leaflet-container .leaflet-tile { .leaflet-container .leaflet-tile {
max-width: none !important; max-width: none !important;
max-height: none !important; max-height: none !important;
width: auto;
padding: 0;
} }
.leaflet-container img.leaflet-tile {
/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */
mix-blend-mode: plus-lighter;
}
.leaflet-container.leaflet-touch-zoom { .leaflet-container.leaflet-touch-zoom {
-ms-touch-action: pan-x pan-y; -ms-touch-action: pan-x pan-y;
touch-action: pan-x pan-y; touch-action: pan-x pan-y;
@@ -166,9 +176,6 @@
/* zoom and fade animations */ /* zoom and fade animations */
.leaflet-fade-anim .leaflet-tile {
will-change: opacity;
}
.leaflet-fade-anim .leaflet-popup { .leaflet-fade-anim .leaflet-popup {
opacity: 0; opacity: 0;
-webkit-transition: opacity 0.2s linear; -webkit-transition: opacity 0.2s linear;
@@ -183,9 +190,10 @@
-ms-transform-origin: 0 0; -ms-transform-origin: 0 0;
transform-origin: 0 0; transform-origin: 0 0;
} }
.leaflet-zoom-anim .leaflet-zoom-animated { svg.leaflet-zoom-animated {
will-change: transform; will-change: transform;
} }
.leaflet-zoom-anim .leaflet-zoom-animated { .leaflet-zoom-anim .leaflet-zoom-animated {
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1); -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1); -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
@@ -251,14 +259,11 @@ svg.leaflet-image-layer.leaflet-interactive path {
.leaflet-container { .leaflet-container {
background: #ddd; background: #ddd;
outline: 0; outline-offset: 1px;
} }
.leaflet-container a { .leaflet-container a {
color: #0078A8; color: #0078A8;
} }
.leaflet-container a.leaflet-active {
outline: 2px solid orange;
}
.leaflet-zoom-box { .leaflet-zoom-box {
border: 2px dotted #38f; border: 2px dotted #38f;
background: rgba(255,255,255,0.5); background: rgba(255,255,255,0.5);
@@ -267,7 +272,10 @@ svg.leaflet-image-layer.leaflet-interactive path {
/* general typography */ /* general typography */
.leaflet-container { .leaflet-container {
font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
font-size: 12px;
font-size: 0.75rem;
line-height: 1.5;
} }
@@ -277,8 +285,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
box-shadow: 0 1px 5px rgba(0,0,0,0.65); box-shadow: 0 1px 5px rgba(0,0,0,0.65);
border-radius: 4px; border-radius: 4px;
} }
.leaflet-bar a, .leaflet-bar a {
.leaflet-bar a:hover {
background-color: #fff; background-color: #fff;
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
width: 26px; width: 26px;
@@ -295,7 +302,8 @@ svg.leaflet-image-layer.leaflet-interactive path {
background-repeat: no-repeat; background-repeat: no-repeat;
display: block; display: block;
} }
.leaflet-bar a:hover { .leaflet-bar a:hover,
.leaflet-bar a:focus {
background-color: #f4f4f4; background-color: #f4f4f4;
} }
.leaflet-bar a:first-child { .leaflet-bar a:first-child {
@@ -385,6 +393,8 @@ svg.leaflet-image-layer.leaflet-interactive path {
} }
.leaflet-control-layers label { .leaflet-control-layers label {
display: block; display: block;
font-size: 13px;
font-size: 1.08333em;
} }
.leaflet-control-layers-separator { .leaflet-control-layers-separator {
height: 0; height: 0;
@@ -393,7 +403,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
} }
/* Default icon URLs */ /* Default icon URLs */
.leaflet-default-icon-path { .leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */
background-image: url(images/marker-icon.png); background-image: url(images/marker-icon.png);
} }
@@ -402,23 +412,27 @@ svg.leaflet-image-layer.leaflet-interactive path {
.leaflet-container .leaflet-control-attribution { .leaflet-container .leaflet-control-attribution {
background: #fff; background: #fff;
background: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.8);
margin: 0; margin: 0;
} }
.leaflet-control-attribution, .leaflet-control-attribution,
.leaflet-control-scale-line { .leaflet-control-scale-line {
padding: 0 5px; padding: 0 5px;
color: #333; color: #333;
line-height: 1.4;
} }
.leaflet-control-attribution a { .leaflet-control-attribution a {
text-decoration: none; text-decoration: none;
} }
.leaflet-control-attribution a:hover { .leaflet-control-attribution a:hover,
.leaflet-control-attribution a:focus {
text-decoration: underline; text-decoration: underline;
} }
.leaflet-container .leaflet-control-attribution, .leaflet-attribution-flag {
.leaflet-container .leaflet-control-scale { display: inline !important;
font-size: 11px; vertical-align: baseline !important;
width: 1em;
height: 0.6669em;
} }
.leaflet-left .leaflet-control-scale { .leaflet-left .leaflet-control-scale {
margin-left: 5px; margin-left: 5px;
@@ -431,14 +445,11 @@ svg.leaflet-image-layer.leaflet-interactive path {
border-top: none; border-top: none;
line-height: 1.1; line-height: 1.1;
padding: 2px 5px 1px; padding: 2px 5px 1px;
font-size: 11px;
white-space: nowrap; white-space: nowrap;
overflow: hidden;
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
background: rgba(255, 255, 255, 0.8);
background: #fff; text-shadow: 1px 1px #fff;
background: rgba(255, 255, 255, 0.5);
} }
.leaflet-control-scale-line:not(:first-child) { .leaflet-control-scale-line:not(:first-child) {
border-top: 2px solid #777; border-top: 2px solid #777;
@@ -474,17 +485,22 @@ svg.leaflet-image-layer.leaflet-interactive path {
border-radius: 12px; border-radius: 12px;
} }
.leaflet-popup-content { .leaflet-popup-content {
margin: 13px 19px; margin: 13px 24px 13px 20px;
line-height: 1.4; line-height: 1.3;
font-size: 13px;
font-size: 1.08333em;
min-height: 1px;
} }
.leaflet-popup-content p { .leaflet-popup-content p {
margin: 18px 0; margin: 17px 0;
margin: 1.3em 0;
} }
.leaflet-popup-tip-container { .leaflet-popup-tip-container {
width: 40px; width: 40px;
height: 20px; height: 20px;
position: absolute; position: absolute;
left: 50%; left: 50%;
margin-top: -1px;
margin-left: -20px; margin-left: -20px;
overflow: hidden; overflow: hidden;
pointer-events: none; pointer-events: none;
@@ -495,6 +511,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
padding: 1px; padding: 1px;
margin: -10px auto 0; margin: -10px auto 0;
pointer-events: auto;
-webkit-transform: rotate(45deg); -webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg); -moz-transform: rotate(45deg);
@@ -511,28 +528,25 @@ svg.leaflet-image-layer.leaflet-interactive path {
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
padding: 4px 4px 0 0;
border: none; border: none;
text-align: center; text-align: center;
width: 18px; width: 24px;
height: 14px; height: 24px;
font: 16px/14px Tahoma, Verdana, sans-serif; font: 16px/24px Tahoma, Verdana, sans-serif;
color: #c3c3c3; color: #757575;
text-decoration: none; text-decoration: none;
font-weight: bold;
background: transparent; background: transparent;
} }
.leaflet-container a.leaflet-popup-close-button:hover { .leaflet-container a.leaflet-popup-close-button:hover,
color: #999; .leaflet-container a.leaflet-popup-close-button:focus {
color: #585858;
} }
.leaflet-popup-scrolled { .leaflet-popup-scrolled {
overflow: auto; overflow: auto;
border-bottom: 1px solid #ddd;
border-top: 1px solid #ddd;
} }
.leaflet-oldie .leaflet-popup-content-wrapper { .leaflet-oldie .leaflet-popup-content-wrapper {
zoom: 1; -ms-zoom: 1;
} }
.leaflet-oldie .leaflet-popup-tip { .leaflet-oldie .leaflet-popup-tip {
width: 24px; width: 24px;
@@ -541,9 +555,6 @@ svg.leaflet-image-layer.leaflet-interactive path {
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
} }
.leaflet-oldie .leaflet-popup-tip-container {
margin-top: -1px;
}
.leaflet-oldie .leaflet-control-zoom, .leaflet-oldie .leaflet-control-zoom,
.leaflet-oldie .leaflet-control-layers, .leaflet-oldie .leaflet-control-layers,
@@ -578,7 +589,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
pointer-events: none; pointer-events: none;
box-shadow: 0 1px 3px rgba(0,0,0,0.4); box-shadow: 0 1px 3px rgba(0,0,0,0.4);
} }
.leaflet-tooltip.leaflet-clickable { .leaflet-tooltip.leaflet-interactive {
cursor: pointer; cursor: pointer;
pointer-events: auto; pointer-events: auto;
} }
@@ -638,3 +649,13 @@ svg.leaflet-image-layer.leaflet-interactive path {
margin-left: -12px; margin-left: -12px;
border-right-color: #fff; border-right-color: #fff;
} }
/* Printing */
@media print {
/* Prevent printers from removing background-images of controls. */
.leaflet-control {
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
}

View File

@@ -73,7 +73,7 @@ body.lb-disable-scrolling {
width: 32px; width: 32px;
height: 32px; height: 32px;
margin: 0 auto; margin: 0 auto;
background: url(images/loading.gif) no-repeat; background: url(../images/loading.gif) no-repeat;
} }
.lb-nav { .lb-nav {
@@ -104,7 +104,7 @@ body.lb-disable-scrolling {
width: 34%; width: 34%;
left: 0; left: 0;
float: left; float: left;
background: url(images/prev.png) left 48% no-repeat; background: url(../images/prev.png) left 48% no-repeat;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
opacity: 0; opacity: 0;
-webkit-transition: opacity 0.6s; -webkit-transition: opacity 0.6s;
@@ -122,7 +122,7 @@ body.lb-disable-scrolling {
width: 64%; width: 64%;
right: 0; right: 0;
float: right; float: right;
background: url(images/next.png) right 48% no-repeat; background: url(../images/next.png) right 48% no-repeat;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
opacity: 0; opacity: 0;
-webkit-transition: opacity 0.6s; -webkit-transition: opacity 0.6s;
@@ -186,7 +186,7 @@ body.lb-disable-scrolling {
float: right; float: right;
width: 30px; width: 30px;
height: 30px; height: 30px;
background: url(images/close.png) top right no-repeat; background: url(../images/close.png) top right no-repeat;
text-align: right; text-align: right;
outline: none; outline: none;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70); filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70);

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -18,7 +18,6 @@ body {
} }
#mapid { #mapid {
margin-top: 5px; margin-top: 5px;
max-height: 1600px; max-height: 1600px;
@@ -92,4 +91,21 @@ i.wa {
left: 50%; left: 50%;
z-index: 1000; z-index: 1000;
display:none; display:none;
} }
.not_approved {
color:darkgray;
}
.logo_navbar {
height: 2.5em;
background-color:white;
margin: 0 1em 0 0;
}
.jumbotron {
background-color:orange;
}
.start {color:orange;}
.start:hover {color:red;}

View File

@@ -1,5 +1,13 @@
<?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'];
require("config.php");
if ($strDistict=="unkown") { header("Location: start.php");}
?>
<!DOCTYPE html> <!DOCTYPE html>
<?php require_once("config.php") ?>
<html lang="de"> <html lang="de">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
@@ -10,12 +18,21 @@
<title>Datenschutzerklärung</title> <title>Datenschutzerklärung</title>
<link rel="stylesheet" href="css/bootstrap.min.css" /> <link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/style.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> </head>
<body> <body>
<!-- Navbar --> <!-- Navbar -->
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top"> <nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="#"><?= $strTitle ?></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"> <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> <span class="navbar-toggler-icon"></span>
</button> </button>
@@ -38,7 +55,7 @@
<a class="nav-link" href="datenschutz.php">Datenschutzerklärung <span class="sr-only">(current)</span></a> <a class="nav-link" href="datenschutz.php">Datenschutzerklärung <span class="sr-only">(current)</span></a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="admin/login.php">Login</a> <a class="nav-link" href="login.php">Login</a>
</li> </li>
</ul> </ul>
</div> </div>

View File

@@ -0,0 +1,40 @@
version: '3'
services:
dev-hindernis:
image: php81:v1
container_name: dev-hindernis
volumes:
- ./:/var/www/html
labels:
- "traefik.enable=true"
- "traefik.http.routers.dev-hindernis.entrypoints=https"
- "traefik.http.routers.dev-hindernis.rule=Host(`nrw-hindernis.hpadm.de`)"
- "traefik.http.routers.dev-hindernis.tls=true"
- "traefik.http.routers.dev-hindernis.tls.certresolver=http"
- "traefik.http.routers.dev-hindernis.middlewares=default@file"
- "traefik.http.routers.dev-hindernis.service=dev-hindernis"
- "traefik.http.services.dev-hindernis.loadbalancer.server.port=80"
- "traefik.docker.network=proxy"
networks:
- default
- proxy
restart: always
dev-hindernis-db:
image: mariadb
container_name: dev-hindernis-db
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=geheim #SQL root Passwort eingeben
- MYSQL_INITDB_SKIP_TZINFO=1
- MARIADB_AUTO_UPGRADE=1
volumes:
- ./database:/var/lib/mysql
networks:
- default
- proxy
networks:
proxy:
external: true

View File

@@ -0,0 +1,7 @@
FROM php:8.1-apache
RUN apt-get update && docker-php-ext-install pdo_mysql calendar mysqli zip
RUN a2enmod rewrite headers
COPY . /var/www
EXPOSE 80

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

1
geojson/aachen.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/bochum.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/bonn.geojson Normal file
View File

@@ -0,0 +1 @@
{"type":"FeatureCollection","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}},"source":"© GeoBasis-DE / BKG 2013 (Daten verändert)","features":[{"type":"Feature","properties":{"ADE":6,"GF":4,"BSG":1,"RS":"053140000000","AGS":"05314000","SDV_RS":"053140000000","GEN":"Bonn","BEZ":"Stadt","IBZ":60,"BEM":"kreisfrei","NBD":"ja","SN_L":"05","SN_R":"3","SN_K":"14","SN_V1":"00","SN_V2":"00","SN_G":"000","FK_S3":"R","NUTS":"DEA22","RS_0":"053140000000","AGS_0":"05314000","WSK":"1969/08/01","DEBKG_ID":"DEBKGDL20000E68L","destatis":{"RS":"053140000000","area":141.06,"population":327258,"population_m":156328,"population_w":170930,"population_density":2320,"zip":"53111","center_lon":"7,099187","center_lat":"50,734245","travel_key":"H08","travel_desc":"Bonn und Rhein-Sieg-Kreis","density_key":"01","density_desc":"dicht besiedelt"}},"geometry":{"type":"Polygon","coordinates":[[[7.132213394039788,50.77185443739246],[7.152489927594295,50.76003796337455],[7.155983590259973,50.754678680559444],[7.162994368355575,50.75637051877679],[7.182585677623933,50.751733766369284],[7.194960773577046,50.74376603543042],[7.198575927382817,50.74756380182978],[7.20910622998039,50.73693102717291],[7.191262592081347,50.726594673433645],[7.196577745090615,50.7130563294482],[7.193541439110321,50.710012393850185],[7.174971638244906,50.707700013488015],[7.168237685457546,50.70348964304006],[7.1765638785753,50.68711446963069],[7.210871863698139,50.649543623738644],[7.198485710421079,50.64820873534376],[7.194148580910258,50.6426736488602],[7.18116837749576,50.652288167493076],[7.173445325656328,50.651120430150364],[7.15643069028438,50.65468256281552],[7.128048493072586,50.647264874977225],[7.124027633004187,50.6550737196975],[7.105341569449689,50.65969235994616],[7.076663672841533,50.642760008402774],[7.068919533825222,50.633108920542085],[7.05609828674614,50.631866029833155],[7.060008559766234,50.63888119869577],[7.050659280245579,50.63962725835669],[7.032482040737388,50.65430012421407],[7.026879245740147,50.654951590872],[7.024341991574657,50.66200938123456],[7.027070449016237,50.66560981294732],[7.037746658332092,50.66181177164791],[7.044293391365028,50.67427663298293],[7.031343309555161,50.67783887649247],[7.039260745560407,50.688740242877515],[7.023486323873603,50.70472497390789],[7.028916532785742,50.713147993396],[7.040284265647784,50.71921720534047],[7.0297930349597,50.72607449828582],[7.040359268496386,50.75321392021528],[7.036550905389681,50.757648920032246],[7.048730628272715,50.764227616334246],[7.05652528427954,50.764261395293055],[7.06565827909231,50.77176542618915],[7.098686033671106,50.76161572856992],[7.106758396344291,50.76348274787046],[7.112695173851539,50.771096360584664],[7.125265297984144,50.77443546646668],[7.132213394039788,50.77185443739246]]]}}]}

1
geojson/borken.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/bottrop.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/coesfeld.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/dortmund.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/dueren.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/duisburg.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/erk.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/essen.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/hagen.geojson Normal file
View File

@@ -0,0 +1 @@
{"type":"FeatureCollection","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}},"source":"© GeoBasis-DE / BKG 2013 (Daten verändert)","features":[{"type":"Feature","properties":{"ADE":6,"GF":4,"BSG":1,"RS":"059140000000","AGS":"05914000","SDV_RS":"059140000000","GEN":"Hagen","BEZ":"Stadt","IBZ":60,"BEM":"kreisfrei","NBD":"ja","SN_L":"05","SN_R":"9","SN_K":"14","SN_V1":"00","SN_V2":"00","SN_G":"000","FK_S3":"R","NUTS":"DEA53","RS_0":"059140000000","AGS_0":"05914000","WSK":"1999/02/01","DEBKG_ID":"DEBKGDL20000E1OI","destatis":{"RS":"059140000000","area":160.45,"population":188814,"population_m":92168,"population_w":96646,"population_density":1177,"zip":"58095","center_lon":"7,467406","center_lat":"51,360171","travel_key":"H11","travel_desc":"Ruhrgebiet","density_key":"01","density_desc":"dicht besiedelt"}},"geometry":{"type":"Polygon","coordinates":[[[7.487180157978995,51.4175713541405],[7.494981538204188,51.415579792683026],[7.50845290761574,51.417941185400174],[7.503289242163876,51.41433649178164],[7.536099101462289,51.406839770129054],[7.531194371111916,51.399413626481866],[7.533588710110251,51.39532321642819],[7.552173040744323,51.39909549824828],[7.566703372640056,51.39854077940354],[7.587816490427026,51.390390414497666],[7.591119030715294,51.38441174857934],[7.584787761770762,51.37779580444411],[7.585948685789316,51.36985134143014],[7.59921540075653,51.346360480917944],[7.593604550633001,51.34414174816323],[7.592891859157715,51.33903687732268],[7.577269302464942,51.33060817276322],[7.584458143631519,51.3196213182544],[7.578517183321369,51.316424104154606],[7.585183801499066,51.30662033601747],[7.583192927430671,51.295865012965216],[7.568924116284109,51.29079092398232],[7.565594470159893,51.281289256960505],[7.550450063143155,51.276008757263625],[7.548881676385763,51.269641234348924],[7.534749304508524,51.27043693186073],[7.517252811795387,51.26486924655582],[7.516854880387277,51.27656487047204],[7.508629353510384,51.2721306301895],[7.498853929563956,51.27316714602382],[7.482015378124063,51.279739054780066],[7.478956825788077,51.28606432023978],[7.486113822213927,51.29513993205325],[7.495644389461222,51.29304027572242],[7.50577880721564,51.3023142099215],[7.503893294291405,51.31586794746874],[7.494522792781022,51.31719871233309],[7.488852789995215,51.313154318418164],[7.482476305029466,51.31661922347857],[7.462273139061231,51.31858289230272],[7.460540934002616,51.31238784829293],[7.454314803818415,51.31745800191746],[7.440118235737004,51.316151941029936],[7.436289862069482,51.30652494591916],[7.427566460235099,51.299894235678536],[7.430051149753901,51.2975280326983],[7.438684149376301,51.2979519183366],[7.433184396385069,51.29490860953218],[7.437831028867999,51.2915542482783],[7.432431688738816,51.28981920150964],[7.429745195405739,51.29457544238171],[7.414470038005143,51.29383213345958],[7.399589221423887,51.30004009086831],[7.400098202524928,51.30229578811203],[7.40942248141175,51.301848601581284],[7.405481752710674,51.30812013329184],[7.418759344371153,51.31087412208424],[7.415110133780876,51.31365972545372],[7.423997685872059,51.31978235313059],[7.421789947571045,51.33088138277895],[7.410074125691876,51.32682733252756],[7.409993514891905,51.3305982462039],[7.398566147151893,51.331665411465124],[7.395236386480828,51.326687646457636],[7.396105863742457,51.332978091318864],[7.390473779146586,51.340384084730026],[7.383738711920587,51.33772001551538],[7.376307999576076,51.34341168172934],[7.378665945627194,51.34998503936672],[7.394195437526633,51.3544762874281],[7.3871034680561,51.357692257752625],[7.395409680409701,51.36035258187323],[7.392631930773249,51.36889674978736],[7.406634813983781,51.379513994175525],[7.402912339506664,51.39333726949466],[7.406274672515681,51.39748701484085],[7.418518643567708,51.40079837712386],[7.435288971330722,51.390438278790725],[7.435963987706289,51.39364429554049],[7.451147581067456,51.39937152196627],[7.454459743387426,51.40891213786608],[7.462752804188664,51.41501567847017],[7.487180157978995,51.4175713541405]]]}}]}

File diff suppressed because one or more lines are too long

1
geojson/herford.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/herne.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/hoexter.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/kleve.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/koeln.geojson Normal file
View File

@@ -0,0 +1 @@
{"type":"FeatureCollection","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}},"source":"© GeoBasis-DE / BKG 2013 (Daten verändert)","features":[{"type":"Feature","properties":{"ADE":6,"GF":4,"BSG":1,"RS":"053150000000","AGS":"05315000","SDV_RS":"053150000000","GEN":"Köln","BEZ":"Stadt","IBZ":60,"BEM":"kreisfrei","NBD":"ja","SN_L":"05","SN_R":"3","SN_K":"15","SN_V1":"00","SN_V2":"00","SN_G":"000","FK_S3":"R","NUTS":"DEA23","RS_0":"053150000000","AGS_0":"05315000","WSK":"1976/06/01","DEBKG_ID":"DEBKGDL20000E006","destatis":{"RS":"053150000000","area":405.01,"population":1085664,"population_m":529368,"population_w":556296,"population_density":2681,"zip":"50667","center_lon":"6,957068","center_lat":"50,938107","travel_key":"H09","travel_desc":"Köln und Rhein-Erft-Kreis","density_key":"01","density_desc":"dicht besiedelt"}},"geometry":{"type":"Polygon","coordinates":[[[6.914502590301775,51.05635779785663],[6.966668146692467,51.03055783771473],[6.973091503701357,51.02363114805622],[6.975462108880114,51.01091720885419],[6.997063271390999,51.011893171347445],[6.99629006289842,51.0166439457062],[7.013899531622805,51.02307220324898],[7.015867625124374,51.0174113253933],[7.021966505637375,51.01587316223706],[7.041455576515597,51.020885064045515],[7.067905843090977,51.0187399792585],[7.061873789836927,51.01342798540017],[7.076542861278531,51.00178104525814],[7.066570538076888,50.99416499293125],[7.067564800102571,50.9900049716309],[7.095587746219517,50.98520837851833],[7.096175844515996,50.980695022984136],[7.099895601777321,50.98094785442352],[7.096129336701266,50.97710458750757],[7.101279656418287,50.96790104172823],[7.086278178364717,50.95795037459573],[7.115999307009579,50.9413181036291],[7.120300012024967,50.944514539285976],[7.144457342844774,50.946006600549055],[7.136667599367226,50.9277953491645],[7.139926081394659,50.922785024240035],[7.138069637409676,50.90664221575512],[7.133217299170487,50.90218777940359],[7.13835596939718,50.89677893899908],[7.137555728974112,50.883038257537834],[7.152731369957507,50.874588418489765],[7.159623341549616,50.874596215408985],[7.163497358824067,50.86934845893292],[7.090617567689435,50.83327427828334],[7.06235484641336,50.82963003268685],[7.061270096197677,50.8441739821413],[7.057926072815622,50.84912583578063],[7.051048560716534,50.85015568500765],[7.027095184478728,50.84700037000049],[7.023335571814935,50.839256349313175],[7.015523947001136,50.8380210604099],[7.011766927380063,50.83993873404802],[6.995180675086827,50.836253016585275],[6.987075659525692,50.839220199183224],[6.984081152790405,50.84412860281874],[6.980936266864355,50.84091588405724],[6.973903254774891,50.84390110686892],[6.956038056933309,50.83524969940873],[6.94669080166975,50.84551222953603],[6.93809639123518,50.84403266595244],[6.940997998059792,50.83902311984847],[6.931213488941947,50.837497485174445],[6.91726190019596,50.85610188243921],[6.920929346659095,50.871321745669604],[6.912960907859209,50.88289463764232],[6.918886120595273,50.891932526257456],[6.879426193288471,50.909572928221884],[6.867708974726131,50.90435170270643],[6.866173235060526,50.90668192316809],[6.856956248903656,50.90430333648614],[6.844307767624318,50.910058952646736],[6.837948248639353,50.91734490130922],[6.83981112128866,50.92444833154472],[6.822461308560777,50.927729436443094],[6.808810164343487,50.94864764728128],[6.824018731255084,50.95782017051452],[6.818989568213391,50.96526946633883],[6.82929817602789,50.971229861518324],[6.827446640998111,50.974452903893535],[6.845046741311863,50.988492817918285],[6.83524937006978,50.999801912872826],[6.840709591417999,51.00366209000226],[6.845489098185578,51.00316357925185],[6.834954862927487,51.0187671575088],[6.841979844831965,51.02465583975792],[6.820292889561406,51.03800828976222],[6.81280188800033,51.034645482807875],[6.805409755227545,51.03946703490677],[6.798291285476728,51.03695289256185],[6.787832530271252,51.0501172173283],[6.773969786307351,51.05806754034137],[6.773632464385643,51.06439001218816],[6.78736059231218,51.06880985623917],[6.791437185800002,51.06741117662739],[6.800867023188823,51.05945691572737],[6.804759525124521,51.048417292041314],[6.813204041478269,51.04610823528489],[6.816842542901293,51.05378686557239],[6.830983814262506,51.05850394093012],[6.822986484226822,51.073864692523166],[6.838640961862522,51.07793536152142],[6.843085261154439,51.08394830304359],[6.853487489168644,51.084255940345955],[6.859863224970212,51.07407773297486],[6.893596723644555,51.06673012313233],[6.914502590301775,51.05635779785663]]]}}]}

1
geojson/krefeld.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/lippe.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/marl.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/mettmann.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/muenster.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/neuss.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/obk.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/olpe.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/rbk.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/rek.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/rsk.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/soest.geojson Normal file

File diff suppressed because one or more lines are too long

1
geojson/solingen.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/viersen.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
geojson/wesel.geojson Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,12 @@
<?php
session_start();
if (!isset($_SESSION['district'])) { header("Location: start.php");}
$strDistrict=$_SESSION['district'];
require("config.php");
if ($strDistict=="unkown") { header("Location: start.php");}
?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="de"> <html lang="de">
<?php require_once("config.php") ?>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -10,12 +16,20 @@
<title>Impressum</title> <title>Impressum</title>
<link rel="stylesheet" href="css/bootstrap.min.css" /> <link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/style.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> </head>
<body> <body>
<!-- Navbar --> <!-- Navbar -->
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top"> <nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="#"><?= $strTitle ?></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"> <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> <span class="navbar-toggler-icon"></span>
</button> </button>
@@ -39,7 +53,7 @@
<a class="nav-link" href="datenschutz.php">Datenschutzerklärung</a> <a class="nav-link" href="datenschutz.php">Datenschutzerklärung</a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="admin/login.php">Login</a> <a class="nav-link" href="login.php">Login</a>
</li> </li>
</ul> </ul>
</div> </div>
@@ -52,22 +66,19 @@
<div class="card"> <div class="card">
<div class="card-header"><h2>Impressum</h2></div> <div class="card-header"><h2>Impressum</h2></div>
<div class="card-body"> <div class="card-body">
<p> Der Ideenmelder wird zur Verfügung gestellt vom:</p>
<p>&nbsp;</p>
<div><img style="width:220px" src="<?=$strLogo?>" alt="Logo"></div> <div><img style="width:220px" src="<?=$strLogo?>" alt="Logo"></div>
<p>&nbsp;</p> <p>&nbsp;</p>
<p> <p>
<?= stripslashes(nl2br($strImpressum)) ?> <?= stripslashes(nl2br($strImpressum)) ?>
</p> </p>
<p><a href="<?=$strUrl?>"><?=$strUrlBez?></a></p> <p style="height:5em;">&nbsp;</p>
<p><a href="<?=$strUrl?>"><?=$strUrlBez?></a><br>
<p>&nbsp;</p> Anfragen bitte an <a href="mailto:<?=$contactEmail?>"><?=$contactEmail?></a></p>
Anfragen zum Ideenmelder an <a href="mailto:<?=$contactEmail?>"><?=$contactEmail?></a>
<p>&nbsp;</p>
<p>&nbsp;</p>
<!-- Bitte nicht entfernen --> <!-- Bitte nicht entfernen -->
<p class="small">Entwicklung: W. Hupfeld, Hamm<br>walter@hupfeld-hamm.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> <a class="btn btn-primary text-white" href="index.php?ref=1">zurück</a>
</div> </div>
</div> </div>

135
index.php
View File

@@ -1,19 +1,25 @@
<?php <?php
/* ******************************
/** *****************************
* 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: 16.03.2024
******************************** */ ******************************** */
// Starte die Session
if (!file_exists("db/locations.db")) { session_start();
header("Location: setup.php"); if (isset($_GET['d'])) {
$strDistrict=$_GET['d'];
$_SESSION['district'] = $_GET['d'];
} else if (isset($_SESSION['district'])) {
$strDistrict=$_SESSION['district'];
} }
require("config.db.php"); else {
require("config.php"); header("Location: start.php");
}
require("config.php");
if ($strDistrict=="unkown") { header("Location: start.php");}
require_once("lib/functions.php"); require_once("lib/functions.php");
$ref=(isset($_GET['ref']) && ($_GET['ref']==1)); $ref=(isset($_GET['ref']) && ($_GET['ref']==1));
@@ -21,18 +27,18 @@
$strIntro ="<h4>".$strTitle."</h4>"; $strIntro ="<h4>".$strTitle."</h4>";
$strIntro .= nl2br2($strIntroText); $strIntro .= nl2br2($strIntroText);
$result= $db->prepare("SELECT loc.*,f.filename
$strSQL="SELECT loc.*,f.filename FROM location loc LEFT JOIN files f ON loc.id=f.loc_id"; FROM location loc LEFT JOIN files f ON loc.id=f.loc_id
WHERE loc.district=:district");
$result->bindParam(":district",$strDistrict);
$result->execute();
/* Für die Auswertung nur bestimmte Kategorien anzeigen /* Für die Auswertung nur bestimmte Kategorien anzeigen
$numDefect="(6,8,21)"; $numDefect="(6,8,21)";
$strSQL="SELECT loc.*,f.filename FROM location loc LEFT JOIN files f ON loc.id=f.loc_id WHERE defect in ".$numDefect; $strSQL="SELECT loc.*,f.filename FROM location loc LEFT JOIN files f ON loc.id=f.loc_id WHERE defect in ".$numDefect;
*/ */
$result = $db->query($strSQL);
$arrMarker = array(); $arrMarker = array();
$arrDescription = array(); $arrDescription = array();
$id=0;
while ($row = $result->fetch(PDO::FETCH_ASSOC)) { while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$id=$row['id']; $id=$row['id'];
$topic = $row['topic']; $topic = $row['topic'];
@@ -62,34 +68,40 @@
<meta name="description" content="Georeferenzieter Ideenmelder"> <meta name="description" content="Georeferenzieter Ideenmelder">
<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/jquery.min.js"></script>
<script src="js/leaflet.js"></script> <script src="js/leaflet.js"></script>
<script src="js/leaflet.ajax.js"></script> <script src="js/leaflet.ajax.js"></script>
<script src="js/leaflet.awesome-markers.js"></script> <script src="js/leaflet.awesome-markers.js"></script>
<script src="js/leaflet.snogylop.js"></script> <script src="js/leaflet.snogylop.js"></script>
<script src="js/lightbox.min.js"></script> <script src="js/jquery.fancybox.min.js"></script>
<script src="js/bootstrap.min.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" /> <title><?=$strTitle?></title>
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/lightbox.css" />
<title>Ideenmelder</title>
</head> </head>
<body> <body>
<!-- Navbar --> <!-- Navbar -->
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top"> <nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="#"><?= $strTitle ?></a> <?php if (!$boolSidebar): ?>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbars" aria-controls="navbars" aria-expanded="false" aria-label="Toggle navigation"> <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> <span class="navbar-toggler-icon"></span>
</button> </button>
<div class="collapse navbar-collapse" id="navbars"> <div class="collapse navbar-collapse" id="navbars">
<ul class="navbar-nav mr-auto"> <ul class="navbar-nav mr-auto">
<li class="nav-item active"> <li class="nav-item active">
<a class="nav-link" href="index.php?ref=1">Karte <span class="sr-only">(current)</span></a> <a class="nav-link" href="index.php?ref=1">Karte <span class="sr-only">(current)</span></a>
@@ -97,8 +109,18 @@
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="liste.php">Liste</a> <a class="nav-link" href="liste.php">Liste</a>
</li> </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()">
<?php foreach ($arrDistrict as $key => $strTitle):
$strActive = ($strDistrict==$key) ? "selected=\"selected\"" : ""; ?>
<option value="<?=$key?>" <?=$strActive?>><?=$strTitle?></option>
<?php endforeach; ?>
</select>
</form>
<?php endif; ?>
</ul> </ul>
<div> <div>
<ul class="navbar-nav mr-auto right"> <ul class="navbar-nav mr-auto right">
<li class="nav-item"> <li class="nav-item">
@@ -108,7 +130,7 @@
<a class="nav-link" href="datenschutz.php">Datenschutzerklärung</a> <a class="nav-link" href="datenschutz.php">Datenschutzerklärung</a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="admin/login.php">Login</a> <a class="nav-link" href="login.php">Login</a>
</li> </li>
</ul> </ul>
</div> </div>
@@ -117,31 +139,28 @@
<!-- Ende Navbar --> <!-- Ende Navbar -->
<div class="container-fluid" style="margin-top: 4em;"> <div class="container-fluid" style="margin-top: 4em;">
<?php if ($boolSidebar): ?>
<div class="row"> <div class="row">
<nav class="col-md-2 d-none d-md-block bg-light sidebar"> <nav class="col-md-2 d-none d-md-block bg-light sidebar">
<div class="sidebar-sticky"> <div class="sidebar-sticky">
<img class="logo" src="<?=$strLogo?>" alt="Logo" > <a href="start.php"><img class="logo" src="<?=$strLogo?>" alt="Logo" ></a>
<ul class="nav flex-column"> <ul class="nav flex-column">
<?php <?php foreach ($arrTopic as $key=>$topic): ?>
foreach ($arrTopic as $key=>$topic) { <li class='nav-item'>
echo "<li class='nav-item'>"; <label>
echo "<label>"; <a class='nav-link'><?=$arrIcon[$key]?>
echo "<a class='nav-link'>".$arrIcon[$key]." "; <input type='checkbox' name='check_".$key."' id='check_".$key."' class='check' checked='checked'>
echo "<input type='checkbox' name='check_".$key."' id='check_".$key."' class='check' checked='checked' > "; <?=$topic?></a></label>
echo $topic."</a></label>"; </li>
echo "</li>"; <?php endforeach; ?>
}
?>
</ul> </ul>
</div> </div>
</nav> </nav>
<?php endif; ?>
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-1"> <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> <div id="mapid"></div>
</main> </main>
<?php if ($boolSidebar) echo "</div>"; ?>
</div>
<!-- row --> <!-- row -->
</div> </div>
<!-- container-fluid --> <!-- container-fluid -->
@@ -153,8 +172,6 @@
?> ?>
<div id="loader"><img src="css/images/ajax-loader.gif"></div> <div id="loader"><img src="css/images/ajax-loader.gif"></div>
<script> <script>
// Map ---------------------------------------------------------------------- // Map ----------------------------------------------------------------------
var mymap = L.map('mapid').setView([<?=$numInfoLat ?>, <?=$numInfoLng ?>], <?=$numZoom ?>); var mymap = L.map('mapid').setView([<?=$numInfoLat ?>, <?=$numInfoLng ?>], <?=$numZoom ?>);
@@ -163,7 +180,7 @@
// ocmlink = '<a href="http://thunderforest.com/">Thunderforest</a>'; // ocmlink = '<a href="http://thunderforest.com/">Thunderforest</a>';
var ocmLink = '<a href="https://www.mapbox.com/">Mapbox</a>'; var ocmLink = '<a href="https://www.mapbox.com/">Mapbox</a>';
L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', { L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=<?=$mapbox_key?>', {
maxZoom: 18, maxZoom: 18,
minZoom:<?=$numZoom ?>, minZoom:<?=$numZoom ?>,
attribution: 'Map data &copy; '+ mapLink +' contributors, ' + attribution: 'Map data &copy; '+ mapLink +' contributors, ' +
@@ -301,13 +318,14 @@
$("#newobjectform").submit(function(event){ $("#newobjectform").submit(function(event){
$("#lat").val(lat); $("#lat").val(lat);
$("#lng").val(lng); $("#lng").val(lng);
topic=$('input[name=topic]:checked').val(); $("#district").val("<?=$strDistrict?>");
//topic=$('input[name=topic]:checked').val();
topic=2; // Keine Eingabe als Auswahlfeld in ADFC-Hindernis-Melder
newMarker = getMarker(topic); newMarker = getMarker(topic);
event.preventDefault(); event.preventDefault();
//grab all form data //grab all form data
var formData = new FormData($(this)[0]); var formData = new FormData($(this)[0]);
console.log(formData);
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "ajax/ajax_location_push.php", url: "ajax/ajax_location_push.php",
@@ -327,7 +345,6 @@
$("#topic").val(2); $("#topic").val(2);
$("#photo").val(""); $("#photo").val("");
popuptext=data; popuptext=data;
console.log(data);
marker[marker_max] = L.marker([lat,lng], { icon: newMarker }).addTo(mymap); marker[marker_max] = L.marker([lat,lng], { icon: newMarker }).addTo(mymap);
marker[marker_max].bindPopup(popuptext); marker[marker_max].bindPopup(popuptext);
marker_max++; marker_max++;
@@ -449,14 +466,15 @@
alert("Keine Bilddatei, nur gif,jpeg,png erlaubt.") alert("Keine Bilddatei, nur gif,jpeg,png erlaubt.")
$("#photo").val(""); $("#photo").val("");
} }
//if (file["size"]>1000000) { alert("Bilder sollten maximal 1 MB groß sein");}
if (image_ok) { if (image_ok) {
img = new Image(); img = new Image();
var objectUrl = _URL.createObjectURL(file); var objectUrl = _URL.createObjectURL(file);
img.onload = function () { img.onload = function () {
image_ok = (this.width<2000 && this.height<2000 && this.width>100 && this.height>100); image_ok = (this.width<4000 && this.height<4000 && this.width>100 && this.height>100);
console.log("Breite:" + this.width + " Höhe: " + this.height); //console.log("Breite:" + this.width + " Höhe: " + this.height);
if (!image_ok) { if (!image_ok) {
alert("Bilder dürfen maximal 2000 x 2000 Pixel groß sein.\n" alert("Bilder sollten maximal 4000 x 4000 Pixel groß sein.\n"
+"Breite:" + this.width + " Höhe: " + this.height) +"Breite:" + this.width + " Höhe: " + this.height)
} }
}; };
@@ -464,7 +482,6 @@
} }
} }
}); });
</script> </script>
</body> </body>
</html> </html>

View File

@@ -1 +0,0 @@
// app.js

8
js/bootstrap.min.js vendored

File diff suppressed because one or more lines are too long

13
js/jquery.fancybox.min.js vendored Normal file

File diff suppressed because one or more lines are too long

4
js/jquery.min.js vendored

File diff suppressed because one or more lines are too long

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

15
js/lightbox.min.js vendored

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

@@ -1,4 +1,3 @@
<div id="dialog_comment" class="card" title="Kommentar"> <div id="dialog_comment" class="card" title="Kommentar">
<div class="card-header">Ihr Kommentar <div class="card-header">Ihr Kommentar
<span id="close_comment" type="button" class="close right text-danger"> <span id="close_comment" type="button" class="close right text-danger">

View File

@@ -15,7 +15,6 @@
} }
</style> </style>
<div id="dialog_defect" class="card" title="Eintrag editieren"> <div id="dialog_defect" class="card" title="Eintrag editieren">
<div class="card-header">Eintrag editieren <div class="card-header">Eintrag editieren
<span id="hint"></span> <span id="hint"></span>
@@ -25,7 +24,7 @@
</div> </div>
<div class="card-body"> <div class="card-body">
<form id="editobjectform" enctype="multipart/form-data" action="#" method="post" > <form id="editobjectform" enctype="multipart/form-data" action="#" method="post" >
<!-- Beschreibung ---------------------------------- --> <!-- Beschreibung ---------------------------------- -->

Some files were not shown because too many files have changed in this diff Show More