Compare commits
86 Commits
5fd594a103
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d4a4b04d71 | ||
|
|
5dd6286ee9 | ||
|
|
0c67ce7c06 | ||
|
|
78316dc366 | ||
|
|
74f4dc442d | ||
|
|
e752fd8988 | ||
|
|
a0e8fcaf02 | ||
|
|
4bef36aa6b | ||
|
|
15cb798263 | ||
|
|
01e9fe7eba | ||
|
|
e59574b039 | ||
|
|
7d6b8edf1e | ||
|
|
d392254fda | ||
|
|
c0b38c1ef2 | ||
|
|
852b45f125 | ||
|
|
6eb3594bcd | ||
|
|
a8a3bbee4f | ||
|
|
da4ef6a3b1 | ||
|
|
1ac6774d66 | ||
|
|
d94ea09940 | ||
|
|
0d5fb5e5da | ||
|
|
e325b14ee7 | ||
|
|
c3da0f7c07 | ||
|
|
1e24715598 | ||
|
|
589d9127df | ||
|
|
6e101a8332 | ||
|
|
23009e8f74 | ||
|
|
54fed73f14 | ||
|
|
8071cab15e | ||
|
|
0df358251a | ||
|
|
2ac9d01257 | ||
|
|
8217b5a7ce | ||
|
|
691aaa0bdd | ||
|
|
ce1eddd4bb | ||
|
|
882fb90145 | ||
|
|
d6312dc965 | ||
|
|
7b6ea55d8d | ||
|
|
beba08d4ff | ||
|
|
f79819fda7 | ||
|
|
b028c43d10 | ||
|
|
121626eb5f | ||
|
|
d571968568 | ||
|
|
4c2d55d699 | ||
|
|
913ffd2000 | ||
|
|
e16939b233 | ||
|
|
f4a8cef3f8 | ||
|
|
34af6b6f75 | ||
|
|
824aa44fe2 | ||
|
|
bb53850c3e | ||
|
|
7c658e28f9 | ||
|
|
c2f8c93ef3 | ||
|
|
8b6632d36f | ||
|
|
f8b8feee5b | ||
|
|
f695c98fc3 | ||
|
|
29496004dc | ||
|
|
0a7db03af1 | ||
|
|
c1c4151300 | ||
|
|
11575edc75 | ||
|
|
1f44c21d69 | ||
|
|
d918e97203 | ||
|
|
1fec7c7710 | ||
|
|
b8671a54a8 | ||
|
|
b746e13d3a | ||
|
|
183c570444 | ||
|
|
b55a7f9bc9 | ||
|
|
1c36f67189 | ||
|
|
54f14b1d8b | ||
|
|
9a7aabcc42 | ||
|
|
527308b201 | ||
|
|
85ee0fe91b | ||
|
|
dfb62c2833 | ||
|
|
318200daa4 | ||
|
|
69ab1ac004 | ||
|
|
2d055ac66a | ||
|
|
42b00f4d01 | ||
|
|
71d2786a97 | ||
|
|
039687e523 | ||
|
|
3249bee870 | ||
|
|
418cf9d113 | ||
|
|
9a32d1fbaa | ||
|
|
9d7da21683 | ||
|
|
36c457d658 | ||
|
|
7201930c07 | ||
|
|
98753186b1 | ||
|
|
46ad703473 | ||
|
|
6cdad9be24 |
7
.gitignore
vendored
7
.gitignore
vendored
@@ -1,4 +1,7 @@
|
||||
# ignore
|
||||
|
||||
|
||||
|
||||
/admin/shape/
|
||||
/images/
|
||||
config.db.php
|
||||
.DS_Store
|
||||
|
||||
|
||||
10
.htaccess
Normal file
10
.htaccess
Normal 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]
|
||||
39
README.md
39
README.md
@@ -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..
|
||||
|
||||
@@ -10,7 +10,7 @@ Es sind aus meiner Sicht aber auch viele andere Anwendungsmöglichkeiten denkbar
|
||||
|
||||
### 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
|
||||
|
||||
@@ -22,16 +22,32 @@ Folgende Funktionalitäten können an- bzw. abgeschaltet werden:
|
||||
* Rating (Positive und negative Bewertung)
|
||||
* Hochladen von Bildern (erlaubt jpg/gif/png)
|
||||
* 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
|
||||
|
||||
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
|
||||
|
||||
### Version 3.0
|
||||
|
||||
* Erweiterung auf NRW-Kreise und kreisfreie Städte
|
||||
* Anpassung als NRW-Hindernismelder
|
||||
* Freischaltung von Einträgen
|
||||
|
||||
### Version 2.2
|
||||
|
||||
* 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/
|
||||
* Lizenz: MIT
|
||||
|
||||
|
||||
#### Leaflet-Snogylop
|
||||
|
||||
Erweiterung vom Leaflet um ein Polygon zu invertieren.
|
||||
|
||||
* https://github.com/ebrelsford/Leaflet.snogylop
|
||||
* Lizenz: MIT
|
||||
|
||||
### Lightbox
|
||||
### Fancybox
|
||||
|
||||
Zur Darstellung von Bildern
|
||||
* https://lokeshdhakar.com/projects/lightbox2/
|
||||
* Lizenz: MIT
|
||||
* https://github.com/fancyapps/fancybox
|
||||
* Lizenz: GPLv3
|
||||
|
||||
### Datatable
|
||||
|
||||
@@ -110,6 +126,9 @@ Export von Shape-Files
|
||||
|
||||
## 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)
|
||||
|
||||
## Probleme
|
||||
|
||||
Ohne favicon.ico verliert Chrome die Session.
|
||||
@@ -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");
|
||||
@@ -5,13 +5,17 @@
|
||||
if (!$boolLogin) {
|
||||
header("Location: login.php");
|
||||
}
|
||||
|
||||
$dbFilename = "../db/locations.db";
|
||||
if (isset($_SESSION['superadmin'])) {
|
||||
$boolSuperAdmin = (bool)$_SESSION['superadmin'];
|
||||
}
|
||||
// Für lokale Administration keine Konfiguration
|
||||
if (!$boolSuperAdmin) { header("Location: index.php"); }
|
||||
$strDistrict = $_SESSION['district'];
|
||||
require_once("../config.php");
|
||||
$boolError=false;
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
@@ -19,12 +23,11 @@
|
||||
<link href="../css/font-awesome.min.css" rel="stylesheet">
|
||||
|
||||
<script src="../js/jquery.min.js"></script>
|
||||
<title>Konfigruation</title>
|
||||
<title>Konfiguration</title>
|
||||
<style>
|
||||
.leftlabel { width: 10em;}
|
||||
input[type="text"] { width: 18em;}
|
||||
input.wide {width: 24em;}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -53,7 +56,6 @@
|
||||
<a class="nav-link" href="password.php">Passwort ändern </a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<ul class="navbar-nav mr-auto right">
|
||||
<li class="nav-item">
|
||||
@@ -64,27 +66,13 @@
|
||||
</nav>
|
||||
<!-- Ende Navbar -->
|
||||
|
||||
|
||||
|
||||
<div class="container" style="margin-top:5em;">
|
||||
<h1>Konfiguration</h1>
|
||||
<form method="post" id="myform" action="configuration_chk.php">
|
||||
<div class="row">
|
||||
<div class="col-md-7 col-lg-7">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3>Dateneingabe aktivieren</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<input type="checkbox" id="active" name="active" <?= ($boolActive) ? "checked=\"checked\"" :"" ?> >
|
||||
<label for="active">Dateneingabe aktivieren</label><br>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
<?php if ($boolSuperAdmin): ?>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3>Konfiguration</h3>
|
||||
@@ -97,41 +85,22 @@
|
||||
<input type="checkbox" id="comment" name="comment" <?= ($boolComment) ? "checked=\"checked\"" :"" ?> >
|
||||
<label for="comment">Kommentare erlauben</label><br>
|
||||
<input type="checkbox" id="defect" name="defect" <?= ($boolDefect) ? "checked=\"checked\"" :"" ?> >
|
||||
<label for="defect">Mängelkategrien einblenden</label><br>
|
||||
<label for="defect">Mängelkategorien einblenden</label><br>
|
||||
<input type="checkbox" id="userinfo" name="userinfo" <?= ($boolUserinfo) ? "checked=\"checked\"" :"" ?> >
|
||||
<label for="userinfo">Nutzerinformation (Alter/Verkehrsmittel)</label>
|
||||
<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>
|
||||
<label class="leftlabel">Uplaod-Pfad:</label>
|
||||
<label class="leftlabel">Upload-Pfad:</label>
|
||||
<input type="text" class="wide" name="uploaddir" id="uploaddir" value="<?=$uploaddir?>">
|
||||
</div>
|
||||
</div>
|
||||
<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-header">
|
||||
<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>Impressum: (HTML erlaubt)</label>
|
||||
<textarea id="impressum" name="impressum" rows="8" style="width:35em;"><?= stripslashes($strImpressum) ?></textarea>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
@@ -164,7 +132,27 @@
|
||||
<input type="hidden" name="csrf" value="<?=$_SESSION['csrf_token']?>">
|
||||
<input type="submit" class="btn btn-primary" value="Konfiguration ändern">
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
<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> <!-- row -->
|
||||
</div>
|
||||
|
||||
@@ -5,27 +5,22 @@
|
||||
if (!$boolLogin) {
|
||||
header("Location: login.php");
|
||||
}
|
||||
$dbFilename="../db/locations.db";
|
||||
require("../config.php");
|
||||
|
||||
if($_POST['csrf'] !== $_SESSION['csrf_token']) {
|
||||
die("Ungültiger Token");
|
||||
}
|
||||
$boolActive = (isset($_POST['active'])) ? "1" : "0";
|
||||
$boolRating = (isset($_POST['rating'])) ? "1" : "0";
|
||||
$boolComment = (isset($_POST['comment'])) ? "1" : "0";
|
||||
$boolUpload = (isset($_POST['fileupload'])) ? "1" : "0";
|
||||
$boolUserinfo = (isset($_POST['userinfo'])) ? "1" : "0";
|
||||
$boolDefect = (isset($_POST['defect'])) ? "1" : "0";
|
||||
|
||||
$boolDistrictSelection = (isset($_POST['districtSelection'])) ? "1" : "0";
|
||||
$boolApprove = (isset($_POST['approve'])) ? "1" : "0";
|
||||
$boolSidebar = (isset($_POST['sidebar'])) ? "1" : "0";
|
||||
|
||||
$strUploaddir = $_POST['uploaddir'];
|
||||
$strStadt = $_POST['district'];
|
||||
$strTitle = $_POST['title'];
|
||||
$fileGeojson =$_POST['geojson'];
|
||||
$numInfoLat = $_POST['lat'];
|
||||
$numInfoLng = $_POST['lng'];
|
||||
$numZoom = $_POST['zoom'];
|
||||
$strLogo = $_POST['logo'];
|
||||
$contactEmail= $_POST['contactEmail'];
|
||||
$strImpressum= $_POST['impressum'];
|
||||
@@ -36,27 +31,22 @@
|
||||
$strImpressum=addslashes($strImpressum);
|
||||
$strIntroText=addslashes($strIntroText);
|
||||
|
||||
$db->query("UPDATE config SET value= '$strUploaddir' WHERE key='uploaddir'");
|
||||
$db->query("UPDATE config SET value= '$fileGeojson' WHERE key='fileGeojson'");
|
||||
$db->query("UPDATE config SET value= '$strStadt' WHERE key='stadt'");
|
||||
$db->query("UPDATE config SET value= '$strTitle' WHERE key='title'");
|
||||
$db->query("UPDATE config SET value= '$numInfoLat' WHERE key='InfoLat'");
|
||||
$db->query("UPDATE config SET value= '$numInfoLng' WHERE key='InfoLng'");
|
||||
$db->query("UPDATE config SET value= '$numZoom' WHERE key='zoom'");
|
||||
$db->query("UPDATE config SET value= '$strLogo' WHERE key='logo'");
|
||||
$db->query("UPDATE config SET value= '$contactEmail' WHERE key='contactEmail'");
|
||||
$db->query("UPDATE config SET value= '$strImpressum' WHERE key='impressum'");
|
||||
$db->query("UPDATE config SET value= '$strUrl' WHERE key='url'");
|
||||
$db->query("UPDATE config SET value= '$strUrlBez' WHERE key='UrlBez'");
|
||||
$db->query("UPDATE config SET value= '$strIntroText' WHERE key='IntroText'");
|
||||
|
||||
$db->query("UPDATE config SET value= '$boolActive' WHERE key='boolActive'");
|
||||
$db->query("UPDATE config SET value= '$boolRating' WHERE key='boolRating'");
|
||||
$db->query("UPDATE config SET value= '$boolComment' WHERE key='boolComment'");
|
||||
$db->query("UPDATE config SET value= '$boolUserinfo' WHERE key='boolUserinfo'");
|
||||
$db->query("UPDATE config SET value= '$boolDefect' WHERE key='boolDefect'");
|
||||
$db->query("UPDATE config SET value= '$boolUpload' WHERE key='boolUpload'");
|
||||
|
||||
$db->query("UPDATE `config` SET `value`= '$strUploaddir' WHERE `key`='uploaddir'");
|
||||
$db->query("UPDATE `config` SET `value`= '$strTitle' WHERE `key`='title'");
|
||||
$db->query("UPDATE `config` SET `value`= '$strLogo' WHERE `key`='logo'");
|
||||
$db->query("UPDATE `config` SET `value`= '$contactEmail' WHERE `key`='contactEmail'");
|
||||
$db->query("UPDATE `config` SET `value`= '$strImpressum' WHERE `key`='impressum'");
|
||||
$db->query("UPDATE `config` SET `value`= '$strUrlBez' WHERE `key`='UrlBez'");
|
||||
$db->query("UPDATE `config` SET `value`= '$strUrl' WHERE `key`='url'");
|
||||
$db->query("UPDATE `config` SET `value`= '$strIntroText' WHERE `key`='IntroText'");
|
||||
$db->query("UPDATE `config` SET `value`= '$boolRating' WHERE `key`='boolRating'");
|
||||
$db->query("UPDATE `config` SET `value`= '$boolComment' WHERE `key`='boolComment'");
|
||||
$db->query("UPDATE `config` SET `value`= '$boolUserinfo' WHERE `key`='boolUserinfo'");
|
||||
$db->query("UPDATE `config` SET `value`= '$boolDefect' WHERE `key`='boolDefect'");
|
||||
$db->query("UPDATE `config` SET `value`= '$boolUpload' WHERE `key`='boolUpload'");
|
||||
$db->query("UPDATE `config` SET `value`= '$boolApprove' WHERE `key`='boolApprove'");
|
||||
$db->query("UPDATE `config` SET `value`= '$boolSidebar' WHERE `key`='boolSidebar'");
|
||||
$db->query("UPDATE `config` SET `value`= '$boolDistrictSelection' WHERE `key`='boolDistrictSelection'");
|
||||
header("Location: configuration.php");
|
||||
|
||||
|
||||
|
||||
@@ -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
29
admin/district_chk.php
Normal 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);
|
||||
|
||||
|
||||
?>
|
||||
@@ -15,8 +15,14 @@
|
||||
if (!$boolLogin) {
|
||||
header("Location: login.php");
|
||||
}
|
||||
$strDistrict=$_SESSION['district'];
|
||||
if (isset($_SESSION['superadmin'])) {
|
||||
$boolSuperAdmin = $_SESSION['superadmin']==true;
|
||||
} else {
|
||||
$boolSuperAdmin=false;
|
||||
}
|
||||
$sqlDistrict = ($boolSuperAdmin) ? "1" : "l.district='$strDistrict'";
|
||||
|
||||
require("../config.db.php");
|
||||
require ("../config.php");
|
||||
|
||||
// Set headers to make the browser download the results as a csv file
|
||||
@@ -28,7 +34,9 @@
|
||||
// Query
|
||||
|
||||
$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);
|
||||
|
||||
// Fetch the first row
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Ideenmelder
|
||||
* Autor: Walter Hupfeld, Hamm
|
||||
* E-Mail: info@hupfeld-software.de
|
||||
* Version: 1.0
|
||||
* Version: 3.0
|
||||
* Datum: 18.05.2021
|
||||
* zuletzt geändert: 18.02.2024
|
||||
******************************** */
|
||||
@@ -15,10 +15,16 @@
|
||||
if (!$boolLogin) {
|
||||
header("Location: login.php");
|
||||
}
|
||||
if (isset($_SESSION['superadmin'])) {
|
||||
$boolSuperAdmin = (bool)$_SESSION['superadmin'];
|
||||
}
|
||||
$strDistrict = $_SESSION['district'];
|
||||
$sqlDistrict = ($boolSuperAdmin) ? "1" : "l.district='$strDistrict'";
|
||||
|
||||
require ("../config.php");
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
@@ -26,7 +32,7 @@
|
||||
<link href="../css/font-awesome.min.css" rel="stylesheet">
|
||||
|
||||
<script src="../js/jquery.min.js"></script>
|
||||
<title>Konfigruation</title>
|
||||
<title>Konfiguration</title>
|
||||
<style>
|
||||
.leftlabel { width: 10em;}
|
||||
input[type="text"] { width: 18em;}
|
||||
@@ -46,12 +52,14 @@
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="index.php">Liste <span class="sr-only">(current)</span></a>
|
||||
</li>
|
||||
<?php if ($boolSuperAdmin): ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="configuration.php">Konfiguration </a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="geocoding.php">Addressen ermitteln </a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="export.php">Export </a>
|
||||
</li>
|
||||
@@ -59,7 +67,6 @@
|
||||
<a class="nav-link" href="password.php">Passwort ändern </a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<ul class="navbar-nav mr-auto right">
|
||||
<li class="nav-item">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Ideenmelder
|
||||
* Autor: Walter Hupfeld, Hamm
|
||||
* E-Mail: info@hupfeld-software.de
|
||||
* Version: 1.0
|
||||
* Version: 3.0
|
||||
* Datum: 18.05.2021
|
||||
* zuletzt geändert: 18.02.2024
|
||||
*/
|
||||
@@ -14,7 +14,10 @@
|
||||
if (!$boolLogin) {
|
||||
header("Location: login.php");
|
||||
}
|
||||
require_once("../config.db.php");
|
||||
if (isset($_SESSION['superadmin'])) {
|
||||
$boolSuperAdmin = (bool)$_SESSION['superadmin'];
|
||||
}
|
||||
$strDistrict=$_SESSION['district'];
|
||||
require ("../config.php");
|
||||
require ("../lib/geocoding.php");
|
||||
$boolRefresh = (isset($_GET['refresh']) & $_GET['refresh']==1);
|
||||
@@ -25,7 +28,7 @@
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
@@ -33,12 +36,11 @@
|
||||
<link href="../css/font-awesome.min.css" rel="stylesheet">
|
||||
|
||||
<script src="../js/jquery.min.js"></script>
|
||||
<title>Konfigruation</title>
|
||||
<title>Konfiguration</title>
|
||||
<style>
|
||||
.leftlabel { width: 10em;}
|
||||
input[type="text"] { width: 18em;}
|
||||
input.wide {width: 24em;}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -59,7 +61,6 @@
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="geocoding.php">Addressen ermitteln </a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="export.php">Export </a>
|
||||
</li>
|
||||
@@ -67,7 +68,6 @@
|
||||
<a class="nav-link" href="password.php">Passwort ändern </a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<ul class="navbar-nav mr-auto right">
|
||||
<li class="nav-item">
|
||||
|
||||
116
admin/index.php
116
admin/index.php
@@ -1,32 +1,44 @@
|
||||
<?php
|
||||
|
||||
/** *****************************
|
||||
* Ideenmelder
|
||||
* Autor: Walter Hupfeld, Hamm
|
||||
* E-Mail: info@hupfeld-software.de
|
||||
* Version: 1.0
|
||||
* Version: 3.0
|
||||
* Datum: 18.05.2021
|
||||
* zuletzte bearbeitet: 15.03.2024
|
||||
******************************** */
|
||||
|
||||
|
||||
session_start();
|
||||
$strLoginName=(isset($_SESSION['user'])) ? $_SESSION['user'] : "" ;
|
||||
$boolLogin = (!empty($strLoginName));
|
||||
if (!$boolLogin) {
|
||||
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");
|
||||
$boolShowmap=false;
|
||||
|
||||
$sqlDistrict = ($boolSuperAdmin) ? "1" : "l.district='$strDistrict'";
|
||||
$strDistrictTitle = ($boolSuperAdmin) ? "" : $strDistrictTitle;
|
||||
|
||||
// --------- Eintag löschen -----------------
|
||||
if (isset($_GET['delid'])) {
|
||||
if($_GET['csrf'] !== $_SESSION['csrf_token']) {
|
||||
die("Ungültiger Token");
|
||||
}
|
||||
$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->execute();
|
||||
|
||||
@@ -48,6 +60,8 @@
|
||||
$stmt->execute();
|
||||
}
|
||||
|
||||
// ------- Kommentar löschen ------------
|
||||
// keine Überprüfung - ob richtiger District
|
||||
if (isset($_GET['delcid'])) {
|
||||
if($_GET['csrf'] !== $_SESSION['csrf_token']) {
|
||||
die("Ungültiger Token");
|
||||
@@ -58,12 +72,24 @@
|
||||
$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($_GET['csrf'] !== $_SESSION['csrf_token']) {
|
||||
die("Ungültiger Token");
|
||||
}
|
||||
|
||||
$numDelete=(int)$_GET['delfid'];
|
||||
$stmt = $db->prepare("SELECT * FROM files where id = :id");
|
||||
$stmt->bindParam(':id', $id);
|
||||
@@ -76,9 +102,9 @@
|
||||
$stmt = $db->prepare("DELETE FROM files WHERE id= :id");
|
||||
$stmt->bindValue(":id",$numDelete);
|
||||
$stmt->execute();
|
||||
|
||||
}
|
||||
|
||||
// Karte zeigen
|
||||
if (isset($_GET['showmap'])) {
|
||||
$numShowmap=(int)$_GET['showmap'];
|
||||
$boolShowmap=$numShowmap==1;
|
||||
@@ -99,6 +125,7 @@
|
||||
4 => "<i class='fa fa-car'></i>",
|
||||
5 => "<i class='fa fa-truck'></i>"
|
||||
);
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
@@ -107,17 +134,20 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="../css/bootstrap.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.awesome-markers.css" />
|
||||
|
||||
<link rel="stylesheet" href="../vendor/DataTables/DataTables-2.0.2/css/dataTables.dataTables.min.css">
|
||||
<link rel="stylesheet" href="../vendor/DataTables/DataTables-2.0.2/css/dataTables.bootstrap4.min.css">
|
||||
|
||||
<script src="../js/jquery.min.js"></script>
|
||||
<script src="../js/leaflet.js"></script>
|
||||
<script src="../js/leaflet.awesome-markers.js"></script>
|
||||
<script src="../js/lightbox.min.js"></script>
|
||||
<title>Eintragsliste</title>
|
||||
<script src="../js/jquery.fancybox.min.js"></script>
|
||||
<script src="../vendor/DataTables/DataTables-2.0.2/js/dataTables.min.js"></script>
|
||||
<script src="../vendor/DataTables/DataTables-2.0.2/js/dataTables.bootstrap4.min.js"></script>
|
||||
|
||||
<title>Eintragsliste</title>
|
||||
<style>
|
||||
.tdmap { height:350px; width:300px;}
|
||||
</style>
|
||||
@@ -126,7 +156,7 @@
|
||||
|
||||
<!-- Navbar -->
|
||||
<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">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
@@ -135,21 +165,21 @@
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="index.php">Liste <span class="sr-only">(current)</span></a>
|
||||
</li>
|
||||
<?php if ($boolSuperAdmin): ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="configuration.php">Konfiguration </a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="geocoding.php">Addressen ermitteln </a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="export.php">Export </a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="password.php">Passwort ändern </a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<ul class="navbar-nav mr-auto right">
|
||||
<li class="nav-item">
|
||||
@@ -161,9 +191,11 @@
|
||||
<!-- Ende Navbar -->
|
||||
|
||||
<div class="container-fluid" style="margin-top:5em;">
|
||||
<table class="table table-bordered table-striped">
|
||||
<table id="list" class="display">
|
||||
<thead>
|
||||
<tr><th>id</th><th>Username</th>
|
||||
<tr><th>id</th>
|
||||
<?= ($boolSuperAdmin) ? "<th>Kreis</th>" : "" ?>
|
||||
<th>Username</th>
|
||||
<?= ($boolUserinfo) ? "<th>Alter</th><th>Transport</th>" : "" ?>
|
||||
<th>Topic</th>
|
||||
<th>Beschreibung</th>
|
||||
@@ -174,19 +206,23 @@
|
||||
<th>Bild</th>
|
||||
<th>lat/lng</th>
|
||||
<th>Datum</th>
|
||||
<?= ($boolApprove) ? "<th>Freigabe</th>" : "" ?>
|
||||
<th>Aktion</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php
|
||||
$strScript="";
|
||||
//$strSQL="SELECT * FROM location ORDER BY created_at DESC";
|
||||
$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";
|
||||
$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 approval, created_at ASC";
|
||||
$result = $db->query($strSQL);
|
||||
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||
$id = $row['lid'];
|
||||
echo "<tr>";
|
||||
echo "<td>".$id."</td>";
|
||||
echo ($boolSuperAdmin) ? "<td>".$row['district']."</td>" : "";
|
||||
echo "<td>". stripslashes($row['username']) ."</td>";
|
||||
echo ($boolUserinfo) ? "<td>".$row['age']."</td><td>".$row['transport']."</td>" : "";
|
||||
echo "<td>".$arrIcon[$row['topic']]." ".$arrTopic[$row['topic']]."</td>";
|
||||
@@ -203,27 +239,32 @@
|
||||
$strDatum = date("d.m.Y",$numDatum);
|
||||
echo $strDatum."</em><br>";
|
||||
echo nl2br(stripslashes($comment['comment']));
|
||||
echo "<a class='left' href='".$_SERVER['PHP_SELF']."?delcid=".$comment['id']."&csrf=".$_SESSION['csrf_token']."'><i class='fa fa-trash'></i></a>";
|
||||
echo "<a class='left' href='".$_SERVER['PHP_SELF']."?delcid=".$comment['id']."&csrf=".$_SESSION['csrf_token']."'>".
|
||||
"<span data-toggle='tooltip' title='Löschen'><i class='fa fa-trash'></i></span></a>";
|
||||
echo "</div>";
|
||||
}
|
||||
echo "</td>";
|
||||
echo "<td>".$row['road']." ".$row['house_number']."<br>"
|
||||
.$row['neighbourhood']." "
|
||||
.$row['hamlet']." "
|
||||
.$row['suburb']."</td>";
|
||||
$strDefect = (isset($row['defect']) && $row['defect']>0) ? $arrDefect[$row['defect']] : "";
|
||||
.$row['suburb']."<br>"
|
||||
.$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";
|
||||
// NRW-Hindernismelder keine leere Eingabe
|
||||
|
||||
echo "<td id='img_".$id."'>";
|
||||
$strSQL = "SELECT id,filename FROM files WHERE loc_id=".$id;
|
||||
$files=$db->query($strSQL);
|
||||
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 "<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";
|
||||
// Karte einblenden
|
||||
|
||||
// Karte einblenden - Für HTML-Export
|
||||
if ($boolShowmap) {
|
||||
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>".$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> ";
|
||||
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> ";
|
||||
echo "<a class='edit_defect' href='#' id='edit_".$id."' value='".$id."'>".
|
||||
"<span data-toggle='tooltip' title='Eintrag editieren'><i class='fa fa-pencil'></span></i></a>";
|
||||
echo "</td>";
|
||||
echo "</tr>\n";
|
||||
|
||||
if ($boolShowmap) {
|
||||
$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.marker([".$row['lat'].", ".$row['lng']."], { icon: infoMarker } ).addTo(mymap_".$id.")\n\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<a class="btn btn-primary" href="../index.php?ref=1">zurück</a>
|
||||
@@ -252,6 +303,12 @@
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
||||
let dataTable = new DataTable(
|
||||
"#list",
|
||||
{ language: {url: '../vendor/DataTables/de_DE.json'},
|
||||
lengthMenu: [ [10, 25, 50, -1], [10, 25, 50, 'Alle'] ],
|
||||
order: [[14, 'asc']]
|
||||
});
|
||||
|
||||
var url = 'https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw';
|
||||
var attribution = 'Map data © <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>';
|
||||
var infoMarker = L.AwesomeMarkers.icon({icon: 'info', prefix: 'fa', markerColor: 'orange'});
|
||||
|
||||
|
||||
$(".edit_defect").on("click", function(e){
|
||||
e.preventDefault();
|
||||
$('#dialog_defect').hide();
|
||||
@@ -277,6 +333,7 @@ $( document ).ready(function() {
|
||||
return false;
|
||||
})
|
||||
|
||||
//Sicherheitsabfrage beim Löschen von Einträgen
|
||||
$(".del").click(function () {
|
||||
result=confirm("Wirklich löschen?");
|
||||
return result===true;
|
||||
@@ -295,7 +352,6 @@ $( document ).ready(function() {
|
||||
processData: false,
|
||||
contentType: false,
|
||||
cache: false,
|
||||
|
||||
success: function(data)
|
||||
{
|
||||
$("#dialog_defect").hide();
|
||||
@@ -326,8 +382,6 @@ $( document ).ready(function() {
|
||||
});
|
||||
|
||||
<?= $strScript ?>
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
<?php
|
||||
|
||||
session_start();
|
||||
if (isset($_SESSION['district'])) {
|
||||
$strDistrict=$_SESSION['district'];
|
||||
}
|
||||
session_destroy();
|
||||
session_start();
|
||||
$_SESSION['district']=$strDistrict;
|
||||
|
||||
header ("Location: ../index.php");
|
||||
@@ -4,15 +4,21 @@
|
||||
* Ideenmelder
|
||||
* Autor: Walter Hupfeld, Hamm
|
||||
* E-Mail: info@hupfeld-software.de
|
||||
* Version: 1.0
|
||||
* Version: 3.0
|
||||
* Datum: 18.05.2021
|
||||
* letzte Änderung: 12.03.2024
|
||||
******************************** */
|
||||
|
||||
|
||||
session_start();
|
||||
$dbFilename="../db/locations.db";
|
||||
require ("../config.php");
|
||||
$strDistrict=$_SESSION['district'];
|
||||
$strLoginName=(isset($_SESSION['user'])) ? $_SESSION['user'] : "" ;
|
||||
if (isset($_SESSION['superadmin'])) {
|
||||
$boolSuperAdmin = $_SESSION['superadmin']==true;
|
||||
} else {
|
||||
$boolSuperAdmin=false;
|
||||
}
|
||||
require ("../config.php");
|
||||
|
||||
$boolLogin = (!empty($strLoginName));
|
||||
if (!$boolLogin) {
|
||||
header("Location: login.php");
|
||||
@@ -44,7 +50,7 @@
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
@@ -72,9 +78,14 @@
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="index.php">Liste <span class="sr-only">(current)</span></a>
|
||||
</li>
|
||||
<?php if ($boolSuperAdmin): ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="configuration.php">Konfiguration </a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="geocoding.php">Addressen ermitteln </a>
|
||||
</li>
|
||||
<? endif; ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="export.php">Export </a>
|
||||
</li>
|
||||
|
||||
@@ -6,27 +6,16 @@
|
||||
if (!$boolLogin) {
|
||||
header("Location: login.php");
|
||||
}
|
||||
|
||||
$dbFilename = "../db/locations.db";
|
||||
$strDistrict=$_SESSION['district'];
|
||||
if (isset($_SESSION['superadmin'])) {
|
||||
$boolSuperAdmin = $_SESSION['superadmin']==true;
|
||||
} else {
|
||||
$boolSuperAdmin=false;
|
||||
}
|
||||
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>
|
||||
<html lang="de">
|
||||
@@ -50,12 +39,11 @@
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container-fluid">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr><th>id</th><th>Username</th>
|
||||
<tr><th>id</th>
|
||||
<th>Username</th>
|
||||
<?= ($boolUserinfo) ? "<th>Alter</th><th>Transport</th>" : ""; ?>
|
||||
<th>Topic</th>
|
||||
<th>Beschreibung</th>
|
||||
@@ -70,7 +58,10 @@
|
||||
|
||||
<?php
|
||||
$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);
|
||||
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||
$id = $row['lid'];
|
||||
@@ -96,7 +87,7 @@
|
||||
echo "</div>";
|
||||
}
|
||||
echo "</td>";
|
||||
$strDefect = (isset($row['defect']) && $row['defect']>0) ? $arrDefect[$row['defect']] : "";
|
||||
$strDefect = (isset($row['defect']) && $row['defect']>=0) ? $arrDefect[$row['defect']] : "";
|
||||
echo "<td>".$strDefect."</td>\n";
|
||||
|
||||
echo "<td>";
|
||||
@@ -114,7 +105,6 @@
|
||||
$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.marker([".$row['lat'].", ".$row['lng']."], { icon: infoMarker } ).addTo(mymap_".$id.")\n\n";
|
||||
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
@@ -122,17 +112,15 @@
|
||||
<a class="btn btn-primary" href="../index.php?ref=1">zurück</a>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
||||
|
||||
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=<?=$mapbox_key?>';
|
||||
var attribution = 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, ' +
|
||||
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>';
|
||||
var infoMarker = L.AwesomeMarkers.icon({icon: 'info', prefix: 'fa', markerColor: 'orange'});
|
||||
|
||||
|
||||
<?= $strScript ?>
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,9 +1,16 @@
|
||||
<?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
|
||||
$dbFilename="../db/locations.db";
|
||||
require ("../config.php");
|
||||
|
||||
require_once ("../config.php");
|
||||
|
||||
|
||||
$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)) {
|
||||
$coords_array[]=$row;
|
||||
}
|
||||
//DEBUG echo "<pre>"; print_r($coords_array); echo "</pre>";
|
||||
|
||||
// If no results are found, echo a message and stop
|
||||
//if ($coords_array == false) { echo "No results"; exit; }
|
||||
|
||||
unlink ("shape/ideenmelder.shp");
|
||||
unlink ("shape/ideenmelder.dbf");
|
||||
unlink ("shape/ideenmelder.shx");
|
||||
if (file_exists("shape/ideenmelder.shp")) {unlink ("shape/ideenmelder.shp");}
|
||||
if (file_exists("shape/ideenmelder.dbf")) {unlink ("shape/ideenmelder.dbf");}
|
||||
if (file_exists("shape/ideenmelder.shx")) {unlink ("shape/ideenmelder.shx");}
|
||||
//unlink ("shape/ideenmelder.dbt");
|
||||
|
||||
require_once('../vendor/Shapefile/ShapefileAutoloader.php');
|
||||
@@ -35,10 +43,9 @@ use Shapefile\Geometry\Point;
|
||||
try {
|
||||
// Open Shapefile
|
||||
$Shapefile = new ShapefileWriter('shape/ideenmelder.shp');
|
||||
|
||||
// Set shape type
|
||||
$Shapefile->setShapeType(Shapefile::SHAPE_TYPE_POINT);
|
||||
|
||||
$Shapefile->setShapeType(Shapefile::SHAPE_TYPE_POINT);
|
||||
// Create field structure
|
||||
$Shapefile->addNumericField('ID', 10);
|
||||
$Shapefile->addCharField('DESC');
|
||||
@@ -47,7 +54,7 @@ try {
|
||||
$Shapefile->addCharField('DEFECT',60);
|
||||
|
||||
foreach ($coords_array as $coords) {
|
||||
//echo "Coords ".$coords['id'].":";print_r($coords);echo "<hr>";
|
||||
//DEBUG echo "Coords ".$coords['id'].":";print_r($coords);echo "<hr>";
|
||||
// Create a Point Geometry
|
||||
$lat=$coords['lat'];
|
||||
$lon=$coords['lng'];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
$dbFilename="../db/locations.db";
|
||||
|
||||
require ("../config.php");
|
||||
|
||||
if ($boolComment){
|
||||
|
||||
@@ -1,38 +1,48 @@
|
||||
<?php
|
||||
|
||||
$dbFilename="../db/locations.db";
|
||||
require_once("../config.db.php");
|
||||
require_once("../config.php");
|
||||
require_once("../lib/functions.php");
|
||||
require_once("../lib/geocoding.php");
|
||||
|
||||
$allowed_extensions = array("jpg", "jpeg", "png", "gif");
|
||||
|
||||
$strUsername = htmlentities(trim($_POST['username']));
|
||||
$strUsername = addslashes($strUsername);
|
||||
$strAge = (isset($_POST['ext_age'])) ? $_POST['ext_age'] : "";
|
||||
$strTransport = (isset($_POST['ext_transport'])) ? $_POST['ext_transport'] : "";
|
||||
$strDescription = htmlentities(trim($_POST['description']));
|
||||
$strDescription = addslashes($strDescription);
|
||||
$numTopic = (isset($_POST['topic'])) ? $_POST['topic'] : 1;
|
||||
$numTopic = (isset($_POST['topic'])) ? $_POST['topic'] : 2;
|
||||
$numDefect = (isset($_POST['defect'])) ? $_POST['defect'] : 0;
|
||||
$numLng = $_POST['lng'];
|
||||
$numLat = $_POST['lat'];
|
||||
$strDistrict = $_POST['district'];
|
||||
$boolUploadOk=false;
|
||||
|
||||
//Leere Einträge verhindern
|
||||
if (empty($strUsername) || empty($numLng) || empty($numLat)) {
|
||||
die("not valid!");
|
||||
}
|
||||
|
||||
if ($boolUpload && !empty($_FILES['uploadfile']['name'])) {
|
||||
$uploadfile = $uploaddir . basename($_FILES['uploadfile']['name']);
|
||||
$fileinfo = @getimagesize($_FILES["uploadfile"]["tmp_name"]);
|
||||
$file=$_FILES['uploadfile'];
|
||||
$fileinfo = @getimagesize($file["tmp_name"]);
|
||||
if (!empty($fileinfo)) {
|
||||
//$info=read_gps_location($_FILES["uploadfile"]["tmp_name"]);
|
||||
$i=1;
|
||||
while (file_exists($uploadfile)) {
|
||||
$uploadfile=$uploaddir.$i."_".basename($_FILES['uploadfile']['name']);
|
||||
$i++;
|
||||
$file_extension = pathinfo($file["name"], PATHINFO_EXTENSION);
|
||||
if (!in_array(strtolower($file_extension), $allowed_extensions)) {
|
||||
echo "Invalid file type. Please upload only jpg, jpeg, png, or gif images.";
|
||||
exit();
|
||||
}
|
||||
if (move_uploaded_file($_FILES['uploadfile']['tmp_name'], $uploadfile)) {
|
||||
$filename=$_FILES['uploadfile']['name'];
|
||||
$filesize=$_FILES['uploadfile']['size'];
|
||||
$filetype=$_FILES['uploadfile']['type'];
|
||||
//echo "Filetype: ".$filetype;
|
||||
$strNewfilename = uniqid("", true) . "." . $file_extension;
|
||||
while (file_exists($uploaddir . $strNewfilename)) {
|
||||
$strNewfilename = uniqid("", true) . "." . $file_extension;
|
||||
}
|
||||
if (move_uploaded_file($file['tmp_name'], $uploaddir.$strNewfilename)) {
|
||||
$filename=$strNewfilename;//$file['name'];
|
||||
$filesize=$file['size'];
|
||||
$filetype=$file['type'];
|
||||
$boolUploadOk = true;
|
||||
} else {
|
||||
die("Upload failed with error code " . $_FILES['file']['error']);
|
||||
@@ -40,8 +50,8 @@ if ($boolUpload && !empty($_FILES['uploadfile']['name'])) {
|
||||
}
|
||||
}
|
||||
|
||||
$stmt = $db->prepare("INSERT INTO location (username,age,transport,description,defect,topic,lng,lat)
|
||||
VALUES (: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,:district)");
|
||||
|
||||
$stmt->bindValue(':username', $strUsername);
|
||||
$stmt->bindValue(':age', $strAge);
|
||||
@@ -51,6 +61,7 @@ $stmt->bindValue(':topic', $numTopic);
|
||||
$stmt->bindValue(':lng', $numLng);
|
||||
$stmt->bindValue(':lat', $numLat);
|
||||
$stmt->bindValue(':defect', $numDefect);
|
||||
$stmt->bindValue(':district',$strDistrict);
|
||||
$stmt->execute();
|
||||
|
||||
// fetch last_id - sqlite
|
||||
@@ -84,8 +95,4 @@ if ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||
$markerText=generate_tooltip_description($row);
|
||||
$markerText=stripcslashes($markerText);
|
||||
}
|
||||
|
||||
|
||||
|
||||
echo ($markerText);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
$dbFilename="../db/locations.db";
|
||||
|
||||
require_once("../config.php");
|
||||
|
||||
$mode = trim($_POST['mode']);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?php
|
||||
|
||||
$dbFilename="../db/locations.db";
|
||||
require_once("../config.php");
|
||||
require_once("../lib/functions.php");
|
||||
|
||||
@@ -8,25 +7,28 @@ $strDescription = htmlentities(trim($_POST['description']));
|
||||
$strDescription = addslashes($strDescription);
|
||||
$numDefect = (isset($_POST['defect'])) ? $_POST['defect'] : 0;
|
||||
$id = (int) $_POST['loc_id'];
|
||||
$filename ="";
|
||||
|
||||
$filename = "";
|
||||
$allowed_extensions = array("jpg", "jpeg", "png", "gif");
|
||||
|
||||
$boolUploadOk=false;
|
||||
if ($boolUpload && isset($_FILES['uploadfile'])) {
|
||||
$uploadfile = $uploaddir . basename($_FILES['uploadfile']['name']);
|
||||
$fileinfo = @getimagesize($_FILES["uploadfile"]["tmp_name"]);
|
||||
if ($boolUpload && ($_FILES['uploadfile']['size']>0)) {
|
||||
$file=$_FILES['uploadfile'];
|
||||
$fileinfo = @getimagesize($file["tmp_name"]);
|
||||
if (!empty($fileinfo)) {
|
||||
//$info=read_gps_location($_FILES["uploadfile"]["tmp_name"]);
|
||||
$i=1;
|
||||
while (file_exists($uploadfile)) {
|
||||
$uploadfile=$uploaddir.$i."_".basename($_FILES['uploadfile']['name']);
|
||||
$i++;
|
||||
$file_extension = pathinfo($file["name"], PATHINFO_EXTENSION);
|
||||
if (!in_array(strtolower($file_extension), $allowed_extensions)) {
|
||||
echo "Invalid file type. Please upload only jpg, jpeg, png, or gif images.";
|
||||
exit();
|
||||
}
|
||||
if (move_uploaded_file($_FILES['uploadfile']['tmp_name'], $uploadfile)) {
|
||||
$filename=$_FILES['uploadfile']['name'];
|
||||
$filesize=$_FILES['uploadfile']['size'];
|
||||
$filetype=$_FILES['uploadfile']['type'];
|
||||
//echo "Filetype: ".$filetype;
|
||||
$strNewfilename = uniqid("", true) . "." . $file_extension;
|
||||
while (file_exists($uploaddir . $strNewfilename)) {
|
||||
$strNewfilename = uniqid("", true) . "." . $file_extension;
|
||||
}
|
||||
if (move_uploaded_file($file['tmp_name'], $uploaddir.$strNewfilename)) {
|
||||
$filename=$strNewfilename;//$file['name'];
|
||||
$filesize=$file['size'];
|
||||
$filetype=$file['type'];
|
||||
$boolUploadOk = true;
|
||||
} else {
|
||||
die("Upload failed with error code " . $_FILES['file']['error']);
|
||||
@@ -55,7 +57,7 @@ if ($boolUploadOk) {
|
||||
|
||||
$result = array(
|
||||
"id" => $id,
|
||||
"description" => stripshlashes(nl2br($strDescription)),
|
||||
"description" => stripslashes(nl2br($strDescription)),
|
||||
"defect" => $arrDefect[$numDefect],
|
||||
"filename" => $filename,
|
||||
);
|
||||
|
||||
@@ -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();}
|
||||
@@ -8,6 +8,7 @@ $db_name = "nrw_melder";
|
||||
$cachetime = 0;
|
||||
|
||||
$location_key="";
|
||||
$mapbox_key="";
|
||||
|
||||
try {
|
||||
$db = new PDO('mysql:host='.$db_server.';dbname='.$db_name.';charset=utf8mb4', $db_user, $db_passwd);
|
||||
152
config.php
152
config.php
@@ -4,44 +4,36 @@
|
||||
* Ideenmelder
|
||||
* Autor: Walter Hupfeld, Hamm
|
||||
* E-Mail: info@hupfeld-software.de
|
||||
* Version: 1.0
|
||||
* Datum: 18.05.2021
|
||||
* Version: 3.0
|
||||
* Datum: 18.02.2024
|
||||
* zuletzt bearbeitet: 11.03.2024
|
||||
******************************** */
|
||||
|
||||
require_once("config.db.php");
|
||||
require_once("config.db.php");
|
||||
|
||||
$strSQL = "select * from config";
|
||||
$result = $db->query($strSQL);
|
||||
$boolTopics=false;
|
||||
|
||||
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||
$strSQL = "select * from config";
|
||||
$result = $db->query($strSQL);
|
||||
|
||||
// Allegemeine Konfiguration
|
||||
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||
switch ($row['key']) {
|
||||
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 "introText":
|
||||
$strIntroText =$row['value'];
|
||||
break;
|
||||
case "impressum":
|
||||
$strImpressum =$row['value'];
|
||||
break;
|
||||
@@ -51,12 +43,6 @@
|
||||
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;
|
||||
@@ -72,22 +58,74 @@
|
||||
case "boolUserinfo":
|
||||
$boolUserinfo = ($row['value']=="1");
|
||||
break;
|
||||
|
||||
default:
|
||||
echo "Fehler bei ".$row['key'];
|
||||
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 (
|
||||
2 => "Radverkehr",
|
||||
1 => "Fußverkehr",
|
||||
3 => "Bus und Bahn",
|
||||
// 1 => "Fußverkehr",
|
||||
// 3 => "Bus und Bahn",
|
||||
// 4 => "Pkw-Verkehr",
|
||||
// 5 => "Lkw-Verkehr"
|
||||
);
|
||||
@@ -100,6 +138,14 @@ $arrMarkerType = array (
|
||||
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 (
|
||||
1 => "keine Angabe",
|
||||
2 => "bis 14 Jahre",
|
||||
@@ -111,31 +157,16 @@ $arrAge = array (
|
||||
);
|
||||
|
||||
$arrDefect = array (
|
||||
0 => "Keine Angabe",
|
||||
1 => "Abrupt endender Radweg",
|
||||
2 => "Buckelpiste",
|
||||
3 => "Gefährliche Gleise/Schienen",
|
||||
4 => "Gehweg/Fahrräder frei",
|
||||
5 => "Falschparker",
|
||||
6 => "Fehlende Abstellmöglichkeiten",
|
||||
7 => "Fehlende Radwege",
|
||||
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"
|
||||
);
|
||||
|
||||
0 => "Pfosten/Poller",
|
||||
1 => "Schranke",
|
||||
2 => "Umlaufsperre/Drängelgitter",
|
||||
3 => "Laternenmast",
|
||||
4 => "Litfaßsäule",
|
||||
5 => "Stromverteilerkasten",
|
||||
6 => "Sonstiges"
|
||||
|
||||
);
|
||||
|
||||
$arrTransport = array (
|
||||
0 => "keine Angabe",
|
||||
@@ -147,10 +178,3 @@ $arrTransport = array (
|
||||
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
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
1
css/jquery.fancybox.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
107
css/leaflet.css
107
css/leaflet.css
@@ -45,7 +45,10 @@
|
||||
}
|
||||
/* .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 .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-shadow-pane img,
|
||||
.leaflet-container .leaflet-tile-pane img,
|
||||
@@ -53,8 +56,15 @@
|
||||
.leaflet-container .leaflet-tile {
|
||||
max-width: 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 {
|
||||
-ms-touch-action: pan-x pan-y;
|
||||
touch-action: pan-x pan-y;
|
||||
@@ -166,9 +176,6 @@
|
||||
|
||||
/* zoom and fade animations */
|
||||
|
||||
.leaflet-fade-anim .leaflet-tile {
|
||||
will-change: opacity;
|
||||
}
|
||||
.leaflet-fade-anim .leaflet-popup {
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.2s linear;
|
||||
@@ -183,9 +190,10 @@
|
||||
-ms-transform-origin: 0 0;
|
||||
transform-origin: 0 0;
|
||||
}
|
||||
.leaflet-zoom-anim .leaflet-zoom-animated {
|
||||
svg.leaflet-zoom-animated {
|
||||
will-change: transform;
|
||||
}
|
||||
}
|
||||
|
||||
.leaflet-zoom-anim .leaflet-zoom-animated {
|
||||
-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);
|
||||
@@ -251,14 +259,11 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
||||
|
||||
.leaflet-container {
|
||||
background: #ddd;
|
||||
outline: 0;
|
||||
outline-offset: 1px;
|
||||
}
|
||||
.leaflet-container a {
|
||||
color: #0078A8;
|
||||
}
|
||||
.leaflet-container a.leaflet-active {
|
||||
outline: 2px solid orange;
|
||||
}
|
||||
.leaflet-zoom-box {
|
||||
border: 2px dotted #38f;
|
||||
background: rgba(255,255,255,0.5);
|
||||
@@ -267,7 +272,10 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
||||
|
||||
/* general typography */
|
||||
.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);
|
||||
border-radius: 4px;
|
||||
}
|
||||
.leaflet-bar a,
|
||||
.leaflet-bar a:hover {
|
||||
.leaflet-bar a {
|
||||
background-color: #fff;
|
||||
border-bottom: 1px solid #ccc;
|
||||
width: 26px;
|
||||
@@ -295,7 +302,8 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
||||
background-repeat: no-repeat;
|
||||
display: block;
|
||||
}
|
||||
.leaflet-bar a:hover {
|
||||
.leaflet-bar a:hover,
|
||||
.leaflet-bar a:focus {
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
.leaflet-bar a:first-child {
|
||||
@@ -385,6 +393,8 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
||||
}
|
||||
.leaflet-control-layers label {
|
||||
display: block;
|
||||
font-size: 13px;
|
||||
font-size: 1.08333em;
|
||||
}
|
||||
.leaflet-control-layers-separator {
|
||||
height: 0;
|
||||
@@ -393,7 +403,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
||||
}
|
||||
|
||||
/* 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);
|
||||
}
|
||||
|
||||
@@ -402,23 +412,27 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
||||
|
||||
.leaflet-container .leaflet-control-attribution {
|
||||
background: #fff;
|
||||
background: rgba(255, 255, 255, 0.7);
|
||||
background: rgba(255, 255, 255, 0.8);
|
||||
margin: 0;
|
||||
}
|
||||
.leaflet-control-attribution,
|
||||
.leaflet-control-scale-line {
|
||||
padding: 0 5px;
|
||||
color: #333;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.leaflet-control-attribution a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.leaflet-control-attribution a:hover {
|
||||
.leaflet-control-attribution a:hover,
|
||||
.leaflet-control-attribution a:focus {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.leaflet-container .leaflet-control-attribution,
|
||||
.leaflet-container .leaflet-control-scale {
|
||||
font-size: 11px;
|
||||
.leaflet-attribution-flag {
|
||||
display: inline !important;
|
||||
vertical-align: baseline !important;
|
||||
width: 1em;
|
||||
height: 0.6669em;
|
||||
}
|
||||
.leaflet-left .leaflet-control-scale {
|
||||
margin-left: 5px;
|
||||
@@ -431,14 +445,11 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
||||
border-top: none;
|
||||
line-height: 1.1;
|
||||
padding: 2px 5px 1px;
|
||||
font-size: 11px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
|
||||
background: #fff;
|
||||
background: rgba(255, 255, 255, 0.5);
|
||||
background: rgba(255, 255, 255, 0.8);
|
||||
text-shadow: 1px 1px #fff;
|
||||
}
|
||||
.leaflet-control-scale-line:not(:first-child) {
|
||||
border-top: 2px solid #777;
|
||||
@@ -474,17 +485,22 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
||||
border-radius: 12px;
|
||||
}
|
||||
.leaflet-popup-content {
|
||||
margin: 13px 19px;
|
||||
line-height: 1.4;
|
||||
margin: 13px 24px 13px 20px;
|
||||
line-height: 1.3;
|
||||
font-size: 13px;
|
||||
font-size: 1.08333em;
|
||||
min-height: 1px;
|
||||
}
|
||||
.leaflet-popup-content p {
|
||||
margin: 18px 0;
|
||||
margin: 17px 0;
|
||||
margin: 1.3em 0;
|
||||
}
|
||||
.leaflet-popup-tip-container {
|
||||
width: 40px;
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
margin-top: -1px;
|
||||
margin-left: -20px;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
@@ -495,6 +511,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
||||
padding: 1px;
|
||||
|
||||
margin: -10px auto 0;
|
||||
pointer-events: auto;
|
||||
|
||||
-webkit-transform: rotate(45deg);
|
||||
-moz-transform: rotate(45deg);
|
||||
@@ -511,28 +528,25 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
padding: 4px 4px 0 0;
|
||||
border: none;
|
||||
text-align: center;
|
||||
width: 18px;
|
||||
height: 14px;
|
||||
font: 16px/14px Tahoma, Verdana, sans-serif;
|
||||
color: #c3c3c3;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
font: 16px/24px Tahoma, Verdana, sans-serif;
|
||||
color: #757575;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
background: transparent;
|
||||
}
|
||||
.leaflet-container a.leaflet-popup-close-button:hover {
|
||||
color: #999;
|
||||
.leaflet-container a.leaflet-popup-close-button:hover,
|
||||
.leaflet-container a.leaflet-popup-close-button:focus {
|
||||
color: #585858;
|
||||
}
|
||||
.leaflet-popup-scrolled {
|
||||
overflow: auto;
|
||||
border-bottom: 1px solid #ddd;
|
||||
border-top: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.leaflet-oldie .leaflet-popup-content-wrapper {
|
||||
zoom: 1;
|
||||
-ms-zoom: 1;
|
||||
}
|
||||
.leaflet-oldie .leaflet-popup-tip {
|
||||
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)";
|
||||
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-layers,
|
||||
@@ -578,7 +589,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
||||
pointer-events: none;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.4);
|
||||
}
|
||||
.leaflet-tooltip.leaflet-clickable {
|
||||
.leaflet-tooltip.leaflet-interactive {
|
||||
cursor: pointer;
|
||||
pointer-events: auto;
|
||||
}
|
||||
@@ -638,3 +649,13 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
||||
margin-left: -12px;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ body.lb-disable-scrolling {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
margin: 0 auto;
|
||||
background: url(images/loading.gif) no-repeat;
|
||||
background: url(../images/loading.gif) no-repeat;
|
||||
}
|
||||
|
||||
.lb-nav {
|
||||
@@ -104,7 +104,7 @@ body.lb-disable-scrolling {
|
||||
width: 34%;
|
||||
left: 0;
|
||||
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);
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.6s;
|
||||
@@ -122,7 +122,7 @@ body.lb-disable-scrolling {
|
||||
width: 64%;
|
||||
right: 0;
|
||||
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);
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.6s;
|
||||
@@ -186,7 +186,7 @@ body.lb-disable-scrolling {
|
||||
float: right;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
background: url(images/close.png) top right no-repeat;
|
||||
background: url(../images/close.png) top right no-repeat;
|
||||
text-align: right;
|
||||
outline: none;
|
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70);
|
||||
|
||||
BIN
css/logo_nordrhein_westfalen.png
Normal file
BIN
css/logo_nordrhein_westfalen.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
@@ -18,7 +18,6 @@ body {
|
||||
}
|
||||
|
||||
|
||||
|
||||
#mapid {
|
||||
margin-top: 5px;
|
||||
max-height: 1600px;
|
||||
@@ -93,3 +92,20 @@ i.wa {
|
||||
z-index: 1000;
|
||||
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;}
|
||||
|
||||
|
||||
@@ -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>
|
||||
<?php require_once("config.php") ?>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
@@ -10,12 +18,21 @@
|
||||
<title>Datenschutzerklärung</title>
|
||||
<link rel="stylesheet" href="css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="css/style.css" />
|
||||
|
||||
<script src="js/jquery.slim.min.js"></script>
|
||||
<script src="js/popper.min.js"></script>
|
||||
<script src="js/bootstrap.min.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Navbar -->
|
||||
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
|
||||
<a class="navbar-brand" href="#"><?= $strTitle ?></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?> » <?=$strDistrictTitle?></a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbars" aria-controls="navbars" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
@@ -38,7 +55,7 @@
|
||||
<a class="nav-link" href="datenschutz.php">Datenschutzerklärung <span class="sr-only">(current)</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="admin/login.php">Login</a>
|
||||
<a class="nav-link" href="login.php">Login</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
40
docker/docker-compose.sample.yml
Normal file
40
docker/docker-compose.sample.yml
Normal 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
|
||||
7
docker/php81-apache/Dockerfile
Normal file
7
docker/php81-apache/Dockerfile
Normal 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
BIN
favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
1
geojson/aachen.geojson
Normal file
1
geojson/aachen.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/bielefeld.geojson
Normal file
1
geojson/bielefeld.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/bochum.geojson
Normal file
1
geojson/bochum.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/bonn.geojson
Normal file
1
geojson/bonn.geojson
Normal 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
1
geojson/borken.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/bottrop.geojson
Normal file
1
geojson/bottrop.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/coesfeld.geojson
Normal file
1
geojson/coesfeld.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/dortmund.geojson
Normal file
1
geojson/dortmund.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/dueren.geojson
Normal file
1
geojson/dueren.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/duesseldorf.geojson
Normal file
1
geojson/duesseldorf.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/duisburg.geojson
Normal file
1
geojson/duisburg.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/erk.geojson
Normal file
1
geojson/erk.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/essen.geojson
Normal file
1
geojson/essen.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/euskirchen.geojson
Normal file
1
geojson/euskirchen.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/gelsenkirchen.geojson
Normal file
1
geojson/gelsenkirchen.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/guetersloh.geojson
Normal file
1
geojson/guetersloh.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/hagen.geojson
Normal file
1
geojson/hagen.geojson
Normal 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]]]}}]}
|
||||
1
geojson/heinsberg.geojson
Normal file
1
geojson/heinsberg.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/herford.geojson
Normal file
1
geojson/herford.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/herne.geojson
Normal file
1
geojson/herne.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/hochsauerlandkreis.geojson
Normal file
1
geojson/hochsauerlandkreis.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/hoexter.geojson
Normal file
1
geojson/hoexter.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/kleve.geojson
Normal file
1
geojson/kleve.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/koeln.geojson
Normal file
1
geojson/koeln.geojson
Normal 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
1
geojson/krefeld.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/leverkusen.geojson
Normal file
1
geojson/leverkusen.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/lippe.geojson
Normal file
1
geojson/lippe.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/maerkischerkreis.geojson
Normal file
1
geojson/maerkischerkreis.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/marl.geojson
Normal file
1
geojson/marl.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/mettmann.geojson
Normal file
1
geojson/mettmann.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/minden-luebbecke.geojson
Normal file
1
geojson/minden-luebbecke.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/moenchengladbach.geojson
Normal file
1
geojson/moenchengladbach.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/muenster.geojson
Normal file
1
geojson/muenster.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/neuss.geojson
Normal file
1
geojson/neuss.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/oberhausen.geojson
Normal file
1
geojson/oberhausen.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/obk.geojson
Normal file
1
geojson/obk.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/olpe.geojson
Normal file
1
geojson/olpe.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/paderborn.geojson
Normal file
1
geojson/paderborn.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/rbk.geojson
Normal file
1
geojson/rbk.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/recklinghausen.geojson
Normal file
1
geojson/recklinghausen.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/rek.geojson
Normal file
1
geojson/rek.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/remscheid.geojson
Normal file
1
geojson/remscheid.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/rsk.geojson
Normal file
1
geojson/rsk.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/siegen-wittgenstein.geojson
Normal file
1
geojson/siegen-wittgenstein.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/soest.geojson
Normal file
1
geojson/soest.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/solingen.geojson
Normal file
1
geojson/solingen.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/steinfurt.geojson
Normal file
1
geojson/steinfurt.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/viersen.geojson
Normal file
1
geojson/viersen.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/warendorf.geojson
Normal file
1
geojson/warendorf.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/wesel.geojson
Normal file
1
geojson/wesel.geojson
Normal file
File diff suppressed because one or more lines are too long
1
geojson/wuppertal.geojson
Normal file
1
geojson/wuppertal.geojson
Normal file
File diff suppressed because one or more lines are too long
@@ -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>
|
||||
<html lang="de">
|
||||
<?php require_once("config.php") ?>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
@@ -10,12 +16,20 @@
|
||||
<title>Impressum</title>
|
||||
<link rel="stylesheet" href="css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="css/style.css" />
|
||||
|
||||
<script src="js/jquery.slim.min.js"></script>
|
||||
<script src="js/popper.min.js"></script>
|
||||
<script src="js/bootstrap.min.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Navbar -->
|
||||
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
|
||||
<a class="navbar-brand" href="#"><?= $strTitle ?></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?> » <?=$strDistrictTitle?></a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbars" aria-controls="navbars" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
@@ -39,7 +53,7 @@
|
||||
<a class="nav-link" href="datenschutz.php">Datenschutzerklärung</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="admin/login.php">Login</a>
|
||||
<a class="nav-link" href="login.php">Login</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -52,22 +66,19 @@
|
||||
<div class="card">
|
||||
<div class="card-header"><h2>Impressum</h2></div>
|
||||
<div class="card-body">
|
||||
<p> Der Ideenmelder wird zur Verfügung gestellt vom:</p>
|
||||
<p> </p>
|
||||
|
||||
<div><img style="width:220px" src="<?=$strLogo?>" alt="Logo"></div>
|
||||
<p> </p>
|
||||
<p>
|
||||
<?= stripslashes(nl2br($strImpressum)) ?>
|
||||
</p>
|
||||
<p><a href="<?=$strUrl?>"><?=$strUrlBez?></a></p>
|
||||
|
||||
<p> </p>
|
||||
Anfragen zum Ideenmelder an <a href="mailto:<?=$contactEmail?>"><?=$contactEmail?></a>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<p style="height:5em;"> </p>
|
||||
<p><a href="<?=$strUrl?>"><?=$strUrlBez?></a><br>
|
||||
Anfragen bitte an <a href="mailto:<?=$contactEmail?>"><?=$contactEmail?></a></p>
|
||||
<!-- Bitte nicht entfernen -->
|
||||
<p class="small">Entwicklung: W. Hupfeld, Hamm<br>walter@hupfeld-hamm.de</p>
|
||||
|
||||
<p style="height:5em;"> </p>
|
||||
<p class="small">Entwicklung: W. Hupfeld, Hamm<br>walter.hupfeld@adfc-hamm.de</p>
|
||||
<!-- --- -->
|
||||
<a class="btn btn-primary text-white" href="index.php?ref=1">zurück</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
123
index.php
123
index.php
@@ -1,19 +1,25 @@
|
||||
<?php
|
||||
|
||||
/** *****************************
|
||||
/* ******************************
|
||||
* Ideenmelder
|
||||
* Autor: Walter Hupfeld, Hamm
|
||||
* E-Mail: info@hupfeld-software.de
|
||||
* Version: 2.0
|
||||
* Datum: 16.02.2024
|
||||
* Version: 3.0
|
||||
* Datum: 16.03.2024
|
||||
******************************** */
|
||||
|
||||
|
||||
if (!file_exists("db/locations.db")) {
|
||||
header("Location: setup.php");
|
||||
// Starte die Session
|
||||
session_start();
|
||||
if (isset($_GET['d'])) {
|
||||
$strDistrict=$_GET['d'];
|
||||
$_SESSION['district'] = $_GET['d'];
|
||||
} else if (isset($_SESSION['district'])) {
|
||||
$strDistrict=$_SESSION['district'];
|
||||
}
|
||||
else {
|
||||
header("Location: start.php");
|
||||
}
|
||||
require("config.db.php");
|
||||
require("config.php");
|
||||
if ($strDistrict=="unkown") { header("Location: start.php");}
|
||||
require_once("lib/functions.php");
|
||||
|
||||
$ref=(isset($_GET['ref']) && ($_GET['ref']==1));
|
||||
@@ -21,18 +27,18 @@
|
||||
$strIntro ="<h4>".$strTitle."</h4>";
|
||||
$strIntro .= nl2br2($strIntroText);
|
||||
|
||||
|
||||
$strSQL="SELECT loc.*,f.filename FROM location loc LEFT JOIN files f ON loc.id=f.loc_id";
|
||||
|
||||
$result= $db->prepare("SELECT loc.*,f.filename
|
||||
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
|
||||
$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;
|
||||
*/
|
||||
|
||||
$result = $db->query($strSQL);
|
||||
$arrMarker = array();
|
||||
$arrDescription = array();
|
||||
|
||||
$id=0;
|
||||
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||
$id=$row['id'];
|
||||
$topic = $row['topic'];
|
||||
@@ -62,34 +68,40 @@
|
||||
<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/leaflet.js"></script>
|
||||
<script src="js/leaflet.ajax.js"></script>
|
||||
<script src="js/leaflet.awesome-markers.js"></script>
|
||||
<script src="js/leaflet.snogylop.js"></script>
|
||||
<script src="js/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" />
|
||||
<link rel="stylesheet" href="css/style.css" />
|
||||
<link rel="stylesheet" href="css/lightbox.css" />
|
||||
|
||||
<title>Ideenmelder</title>
|
||||
|
||||
<title><?=$strTitle?></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Navbar -->
|
||||
<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 ?> » <?=$strDistrictTitle?></a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbars" aria-controls="navbars" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbars">
|
||||
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="index.php?ref=1">Karte <span class="sr-only">(current)</span></a>
|
||||
@@ -97,8 +109,18 @@
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="liste.php">Liste</a>
|
||||
</li>
|
||||
<?php if ($boolDistrictSelection): ?>
|
||||
<!-- District -->
|
||||
<form method="GET" action="index.php">
|
||||
<select name="d" style="float:left;margin-top:0.5em;margin-right:0.5em;" onchange="this.form.submit()">
|
||||
<?php foreach ($arrDistrict as $key => $strTitle):
|
||||
$strActive = ($strDistrict==$key) ? "selected=\"selected\"" : ""; ?>
|
||||
<option value="<?=$key?>" <?=$strActive?>><?=$strTitle?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<ul class="navbar-nav mr-auto right">
|
||||
<li class="nav-item">
|
||||
@@ -108,7 +130,7 @@
|
||||
<a class="nav-link" href="datenschutz.php">Datenschutzerklärung</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="admin/login.php">Login</a>
|
||||
<a class="nav-link" href="login.php">Login</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -117,31 +139,28 @@
|
||||
<!-- Ende Navbar -->
|
||||
|
||||
<div class="container-fluid" style="margin-top: 4em;">
|
||||
<?php if ($boolSidebar): ?>
|
||||
<div class="row">
|
||||
|
||||
<nav class="col-md-2 d-none d-md-block bg-light sidebar">
|
||||
<div class="sidebar-sticky">
|
||||
<img class="logo" src="<?=$strLogo?>" alt="Logo" >
|
||||
<a href="start.php"><img class="logo" src="<?=$strLogo?>" alt="Logo" ></a>
|
||||
<ul class="nav flex-column">
|
||||
<?php
|
||||
foreach ($arrTopic as $key=>$topic) {
|
||||
echo "<li class='nav-item'>";
|
||||
echo "<label>";
|
||||
echo "<a class='nav-link'>".$arrIcon[$key]." ";
|
||||
echo "<input type='checkbox' name='check_".$key."' id='check_".$key."' class='check' checked='checked' > ";
|
||||
echo $topic."</a></label>";
|
||||
echo "</li>";
|
||||
}
|
||||
?>
|
||||
<?php foreach ($arrTopic as $key=>$topic): ?>
|
||||
<li class='nav-item'>
|
||||
<label>
|
||||
<a class='nav-link'><?=$arrIcon[$key]?>
|
||||
<input type='checkbox' name='check_".$key."' id='check_".$key."' class='check' checked='checked'>
|
||||
<?=$topic?></a></label>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-1">
|
||||
<?php endif; ?>
|
||||
<main role="main" class="<?= ($boolSidebar)?"col-md-9 col-lg-10":"col-md-12 col-lg-12"?> ml-sm-auto px-1">
|
||||
<div id="mapid"></div>
|
||||
</main>
|
||||
|
||||
</div>
|
||||
<?php if ($boolSidebar) echo "</div>"; ?>
|
||||
<!-- row -->
|
||||
</div>
|
||||
<!-- container-fluid -->
|
||||
@@ -153,8 +172,6 @@
|
||||
?>
|
||||
<div id="loader"><img src="css/images/ajax-loader.gif"></div>
|
||||
<script>
|
||||
|
||||
|
||||
// Map ----------------------------------------------------------------------
|
||||
|
||||
var mymap = L.map('mapid').setView([<?=$numInfoLat ?>, <?=$numInfoLng ?>], <?=$numZoom ?>);
|
||||
@@ -163,7 +180,7 @@
|
||||
// ocmlink = '<a href="http://thunderforest.com/">Thunderforest</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,
|
||||
minZoom:<?=$numZoom ?>,
|
||||
attribution: 'Map data © '+ mapLink +' contributors, ' +
|
||||
@@ -301,13 +318,14 @@
|
||||
$("#newobjectform").submit(function(event){
|
||||
$("#lat").val(lat);
|
||||
$("#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);
|
||||
event.preventDefault();
|
||||
|
||||
//grab all form data
|
||||
var formData = new FormData($(this)[0]);
|
||||
console.log(formData);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "ajax/ajax_location_push.php",
|
||||
@@ -327,7 +345,6 @@
|
||||
$("#topic").val(2);
|
||||
$("#photo").val("");
|
||||
popuptext=data;
|
||||
console.log(data);
|
||||
marker[marker_max] = L.marker([lat,lng], { icon: newMarker }).addTo(mymap);
|
||||
marker[marker_max].bindPopup(popuptext);
|
||||
marker_max++;
|
||||
@@ -449,14 +466,15 @@
|
||||
alert("Keine Bilddatei, nur gif,jpeg,png erlaubt.")
|
||||
$("#photo").val("");
|
||||
}
|
||||
//if (file["size"]>1000000) { alert("Bilder sollten maximal 1 MB groß sein");}
|
||||
if (image_ok) {
|
||||
img = new Image();
|
||||
var objectUrl = _URL.createObjectURL(file);
|
||||
img.onload = function () {
|
||||
image_ok = (this.width<2000 && this.height<2000 && this.width>100 && this.height>100);
|
||||
console.log("Breite:" + this.width + " Höhe: " + this.height);
|
||||
image_ok = (this.width<4000 && this.height<4000 && this.width>100 && this.height>100);
|
||||
//console.log("Breite:" + this.width + " Höhe: " + this.height);
|
||||
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)
|
||||
}
|
||||
};
|
||||
@@ -464,7 +482,6 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
8
js/bootstrap.min.js
vendored
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
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
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
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
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
5
js/popper.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -1,4 +1,3 @@
|
||||
|
||||
<div id="dialog_comment" class="card" title="Kommentar">
|
||||
<div class="card-header">Ihr Kommentar
|
||||
<span id="close_comment" type="button" class="close right text-danger">
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<div id="dialog_defect" class="card" title="Eintrag editieren">
|
||||
<div class="card-header">Eintrag editieren
|
||||
<span id="hint"></span>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user