Compare commits
41 Commits
5fd594a103
...
ideenmelde
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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
|
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]
|
||||||
14
README.md
14
README.md
@@ -1,8 +1,8 @@
|
|||||||
# Ideenmelder
|
# Ideenmelder
|
||||||
|
|
||||||
Die Anwendung ermöglicht die Markierung von Standorten in einem begrenzten Bezirk (Stadt Hamm). Die Eingaben können beschrieben und bewertet werden. Das Hochladen von Bildern und das Kommentieren von Beiträgen ist möglich.
|
Die Anwendung ermöglicht die Markierung von Standorten in einem begrenzten Bezirk für alle Kreise und kreisfreien Städten in NRW. Die Eingaben können beschrieben und bewertet werden. Das Hochladen von Bildern und das Kommentieren von Beiträgen ist möglich.
|
||||||
|
|
||||||
Die Idee zu dieser Anwendung kam durch einen Artikel in der ADFC-Zeitschrift Radwelt zu Ibbenbüren, wo Vorschläge zur Verkehrsinfrastruktur über eine Webanwendung erfasst wurden. Ich habe diese Idee übernommen und neu programmiert. Eine Demoanwendung findet man unter https://karte.hpadm.de (Login: admin Passwort: testtest)
|
Die Idee zu dieser Anwendung kam durch einen Artikel in der ADFC-Zeitschrift Radwelt zu Ibbenbüren, wo Vorschläge zur Verkehrsinfrastruktur über eine Webanwendung erfasst wurden. Ich habe diese Idee übernommen und neu programmiert. Eine Demoanwendung findet man unter https://nrw-melder.hpadm.de (Login: admin Passwort: testtest)
|
||||||
|
|
||||||
Es sind aus meiner Sicht aber auch viele andere Anwendungsmöglichkeiten denkbar, z.B. Erfassung/Meldung von Eichenprozessionsspinnern, Markierung/Erfassung von Stromtankstellen etc..
|
Es sind aus meiner Sicht aber auch viele andere Anwendungsmöglichkeiten denkbar, z.B. Erfassung/Meldung von Eichenprozessionsspinnern, Markierung/Erfassung von Stromtankstellen etc..
|
||||||
|
|
||||||
@@ -23,15 +23,23 @@ Folgende Funktionalitäten können an- bzw. abgeschaltet werden:
|
|||||||
* Hochladen von Bildern (erlaubt jpg/gif/png)
|
* Hochladen von Bildern (erlaubt jpg/gif/png)
|
||||||
* Kommentare
|
* Kommentare
|
||||||
|
|
||||||
|
### 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.
|
||||||
|
|
||||||
### Reverse Georeferenzierung
|
### Reverse Georeferenzierung
|
||||||
|
|
||||||
Aus den übermittelten Geodaten wird die Adresse ermittelt. Dazu wird der Dienst https://locationiq.com verwendet. Die Adressen werden nur im Backend angezeigt, um die Auswertung der Daten zu erleichtern.
|
Aus den übermittelten Geodaten wird die Adresse ermittelt. Dazu wird der Dienst https://locationiq.com verwendet. Die Adressen werden nur im Backend angezeigt, um die Auswertung der Daten zu erleichtern.
|
||||||
Für locationiq.com muss ein Api-Key beantragt werden. Dieser ist in der Datei /lib/geocoding.php einzutragen. Für die Georeferenzierung kann auch
|
Für locationiq.com muss ein Api-Key beantragt werden. Dieser ist in der Datei /config.db.php einzutragen.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Versionen
|
## Versionen
|
||||||
|
|
||||||
|
### Version 3.0
|
||||||
|
|
||||||
|
* Erweiterung auf NRW-Kreise und kreisfreie Städte
|
||||||
|
|
||||||
### Version 2.2
|
### Version 2.2
|
||||||
|
|
||||||
* Behandlung der Eingaben mit Zeilenumbruch, Anführungszeichen und Hochkommas
|
* Behandlung der Eingaben mit Zeilenumbruch, Anführungszeichen und Hochkommas
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
exit();
|
||||||
|
// ist veraltet, muss noch angepasst werden.
|
||||||
session_start();
|
session_start();
|
||||||
$strLoginName=(isset($_SESSION['user'])) ? $_SESSION['user'] : "" ;
|
$strLoginName=(isset($_SESSION['user'])) ? $_SESSION['user'] : "" ;
|
||||||
$boolLogin = (!empty($strLoginName));
|
$boolLogin = (!empty($strLoginName));
|
||||||
@@ -7,8 +9,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
date_default_timezone_set('UTC');
|
date_default_timezone_set('UTC');
|
||||||
const DB_FILENAME = "../db/locations.db";
|
|
||||||
$db = new SQLite3(DB_FILENAME);
|
|
||||||
|
|
||||||
$strSQL="ALTER TABLE location ADD COLUMN defect INTEGER";
|
$strSQL="ALTER TABLE location ADD COLUMN defect INTEGER";
|
||||||
$db->exec($strSQL);
|
$db->exec($strSQL);
|
||||||
@@ -22,3 +22,10 @@ $db->exec("CREATE TABLE IF NOT EXISTS user(
|
|||||||
)");
|
)");
|
||||||
|
|
||||||
header("Location: configuration.php");
|
header("Location: configuration.php");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO user (username, passwordhash, district)
|
||||||
|
SELECT district, "$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2", district
|
||||||
|
FROM district;
|
||||||
|
|
||||||
|
|||||||
@@ -6,12 +6,18 @@
|
|||||||
header("Location: login.php");
|
header("Location: login.php");
|
||||||
}
|
}
|
||||||
|
|
||||||
$dbFilename = "../db/locations.db";
|
if (isset($_SESSION['superadmin'])) {
|
||||||
|
$boolSuperAdmin = $_SESSION['superadmin']==true;
|
||||||
|
} else {
|
||||||
|
$boolSuperAdmin=false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
require_once("../config.php");
|
require_once("../config.php");
|
||||||
$boolError=false;
|
$boolError=false;
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
@@ -72,19 +78,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-7 col-lg-7">
|
<div class="col-md-7 col-lg-7">
|
||||||
|
|
||||||
<div class="card">
|
<?php if ($boolSuperAdmin): ?>
|
||||||
<div class="card-header">
|
|
||||||
<h3>Dateneingabe aktivieren</h3>
|
|
||||||
</div>
|
|
||||||
<div class="card-body">
|
|
||||||
<input type="checkbox" id="active" name="active" <?= ($boolActive) ? "checked=\"checked\"" :"" ?> >
|
|
||||||
<label for="active">Dateneingabe aktivieren</label><br>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h3>Konfiguration</h3>
|
<h3>Konfiguration</h3>
|
||||||
@@ -99,7 +93,9 @@
|
|||||||
<input type="checkbox" id="defect" name="defect" <?= ($boolDefect) ? "checked=\"checked\"" :"" ?> >
|
<input type="checkbox" id="defect" name="defect" <?= ($boolDefect) ? "checked=\"checked\"" :"" ?> >
|
||||||
<label for="defect">Mängelkategrien einblenden</label><br>
|
<label for="defect">Mängelkategrien einblenden</label><br>
|
||||||
<input type="checkbox" id="userinfo" name="userinfo" <?= ($boolUserinfo) ? "checked=\"checked\"" :"" ?> >
|
<input type="checkbox" id="userinfo" name="userinfo" <?= ($boolUserinfo) ? "checked=\"checked\"" :"" ?> >
|
||||||
<label for="userinfo">Nutzerinformation (Alter/Verkehrsmittel)</label>
|
<label for="userinfo">Nutzerinformation (Alter/Verkehrsmittel)</label><br>
|
||||||
|
<input type="checkbox" id="districtSelection" name="districtSelection" <?= ($boolDistrictSelection) ? "checked=\"checked\"" :"" ?> >
|
||||||
|
<label for="districtSelection">Auswahl Kreise in Navigation</label>
|
||||||
<br>
|
<br>
|
||||||
<label class="leftlabel">Uplaod-Pfad:</label>
|
<label class="leftlabel">Uplaod-Pfad:</label>
|
||||||
<input type="text" class="wide" name="uploaddir" id="uploaddir" value="<?=$uploaddir?>">
|
<input type="text" class="wide" name="uploaddir" id="uploaddir" value="<?=$uploaddir?>">
|
||||||
@@ -108,30 +104,6 @@
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-header">
|
|
||||||
<h3>Karteninfo</h3>
|
|
||||||
</div>
|
|
||||||
<div class="card-body">
|
|
||||||
<h4>Stadt oder Kreis</h4>
|
|
||||||
<label class="leftlabel">Stadt/Kreis: </label>
|
|
||||||
<input type="text" name="district" id="district" value="<?=$strStadt?>" >
|
|
||||||
<h4>Kartenzentrum</h4>
|
|
||||||
<div class="small">Hier liegt das Zentrum der Karte und es erscheint der Info-Marker.</div>
|
|
||||||
<label class="leftlabel">Latitude:</label><input type="text" name="lat" id="lat" value="<?=$numInfoLat?>"><br>
|
|
||||||
<label class="leftlabel">Longitude:</label><input type="text" name="lng" id="lng" value="<?=$numInfoLng?>"><br>
|
|
||||||
<div class="small">Zoom-Faktor beim Start der Karte.</div>
|
|
||||||
<label class="leftlabel">Startzoom:</label><input type="text" name="zoom" id="zoom" value="<?=$numZoom?>">
|
|
||||||
|
|
||||||
|
|
||||||
<h4>GeoJson</h4>
|
|
||||||
<p>Die Datei kann man von folgender Adresse laden und ins Vezeichnis /geojson kopieren:
|
|
||||||
<a href="https://public.opendatasoft.com/explore/dataset/landkreise-in-germany/export/">public.opendatasoft.com</a>
|
|
||||||
</p>
|
|
||||||
<label class="leftlabel">GeoJson-Datei: </label><input type="text" name="geojson" id="geojson" value="<?=$fileGeojson?>">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h3>Anbieterinformation</h3>
|
<h3>Anbieterinformation</h3>
|
||||||
@@ -164,7 +136,26 @@
|
|||||||
<input type="hidden" name="csrf" value="<?=$_SESSION['csrf_token']?>">
|
<input type="hidden" name="csrf" value="<?=$_SESSION['csrf_token']?>">
|
||||||
<input type="submit" class="btn btn-primary" value="Konfiguration ändern">
|
<input type="submit" class="btn btn-primary" value="Konfiguration ändern">
|
||||||
</form>
|
</form>
|
||||||
|
<?php endif; ?>
|
||||||
<br><br><br>
|
<br><br><br>
|
||||||
|
|
||||||
|
<h2>Auswahl Kreise und kreisfreie Städte</h2>
|
||||||
|
<form method="post" id="districtform" action="district_chk.php">
|
||||||
|
<?php
|
||||||
|
$strSQL="select * from district order by district";
|
||||||
|
$result = $db->query($strSQL);
|
||||||
|
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||||
|
$strChecked= ($row['active']==1) ? "checked='checked'" : "";
|
||||||
|
$strValue=$row['active'];
|
||||||
|
$strDistrict=$row['district'];
|
||||||
|
echo "<input type='checkbox' $strChecked id='$strDistrict' name='$strDistrict' value='$strValue'> ";
|
||||||
|
echo "<label for='$strDistrict'>".$row['title']."</label><br>\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<br>
|
||||||
|
<input type="hidden" name="csrf" value="<?=$_SESSION['csrf_token']?>">
|
||||||
|
<input type="submit" class="btn btn-primary" value="Auswahl ändern">
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div> <!-- row -->
|
</div> <!-- row -->
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,27 +5,21 @@
|
|||||||
if (!$boolLogin) {
|
if (!$boolLogin) {
|
||||||
header("Location: login.php");
|
header("Location: login.php");
|
||||||
}
|
}
|
||||||
$dbFilename="../db/locations.db";
|
|
||||||
require("../config.php");
|
require("../config.php");
|
||||||
|
|
||||||
if($_POST['csrf'] !== $_SESSION['csrf_token']) {
|
if($_POST['csrf'] !== $_SESSION['csrf_token']) {
|
||||||
die("Ungültiger Token");
|
die("Ungültiger Token");
|
||||||
}
|
}
|
||||||
$boolActive = (isset($_POST['active'])) ? "1" : "0";
|
|
||||||
$boolRating = (isset($_POST['rating'])) ? "1" : "0";
|
$boolRating = (isset($_POST['rating'])) ? "1" : "0";
|
||||||
$boolComment = (isset($_POST['comment'])) ? "1" : "0";
|
$boolComment = (isset($_POST['comment'])) ? "1" : "0";
|
||||||
$boolUpload = (isset($_POST['fileupload'])) ? "1" : "0";
|
$boolUpload = (isset($_POST['fileupload'])) ? "1" : "0";
|
||||||
$boolUserinfo = (isset($_POST['userinfo'])) ? "1" : "0";
|
$boolUserinfo = (isset($_POST['userinfo'])) ? "1" : "0";
|
||||||
$boolDefect = (isset($_POST['defect'])) ? "1" : "0";
|
$boolDefect = (isset($_POST['defect'])) ? "1" : "0";
|
||||||
|
$boolDistrictSelection = (isset($_POST['districtSelection'])) ? "1" : "0";
|
||||||
|
|
||||||
|
|
||||||
$strUploaddir = $_POST['uploaddir'];
|
$strUploaddir = $_POST['uploaddir'];
|
||||||
$strStadt = $_POST['district'];
|
|
||||||
$strTitle = $_POST['title'];
|
$strTitle = $_POST['title'];
|
||||||
$fileGeojson =$_POST['geojson'];
|
|
||||||
$numInfoLat = $_POST['lat'];
|
|
||||||
$numInfoLng = $_POST['lng'];
|
|
||||||
$numZoom = $_POST['zoom'];
|
|
||||||
$strLogo = $_POST['logo'];
|
$strLogo = $_POST['logo'];
|
||||||
$contactEmail= $_POST['contactEmail'];
|
$contactEmail= $_POST['contactEmail'];
|
||||||
$strImpressum= $_POST['impressum'];
|
$strImpressum= $_POST['impressum'];
|
||||||
@@ -36,27 +30,20 @@
|
|||||||
$strImpressum=addslashes($strImpressum);
|
$strImpressum=addslashes($strImpressum);
|
||||||
$strIntroText=addslashes($strIntroText);
|
$strIntroText=addslashes($strIntroText);
|
||||||
|
|
||||||
$db->query("UPDATE config SET value= '$strUploaddir' WHERE key='uploaddir'");
|
$db->query("UPDATE `config` SET `value`= '$strUploaddir' WHERE `key`='uploaddir'");
|
||||||
$db->query("UPDATE config SET value= '$fileGeojson' WHERE key='fileGeojson'");
|
$db->query("UPDATE `config` SET `value`= '$strTitle' WHERE `key`='title'");
|
||||||
$db->query("UPDATE config SET value= '$strStadt' WHERE key='stadt'");
|
$db->query("UPDATE `config` SET `value`= '$strLogo' WHERE `key`='logo'");
|
||||||
$db->query("UPDATE config SET value= '$strTitle' WHERE key='title'");
|
$db->query("UPDATE `config` SET `value`= '$contactEmail' WHERE `key`='contactEmail'");
|
||||||
$db->query("UPDATE config SET value= '$numInfoLat' WHERE key='InfoLat'");
|
$db->query("UPDATE `config` SET `value`= '$strImpressum' WHERE `key`='impressum'");
|
||||||
$db->query("UPDATE config SET value= '$numInfoLng' WHERE key='InfoLng'");
|
$db->query("UPDATE `config` SET `value`= '$strUrlBez' WHERE `key`='UrlBez'");
|
||||||
$db->query("UPDATE config SET value= '$numZoom' WHERE key='zoom'");
|
$db->query("UPDATE `config` SET `value`= '$strUrl' WHERE `key`='url'");
|
||||||
$db->query("UPDATE config SET value= '$strLogo' WHERE key='logo'");
|
$db->query("UPDATE `config` SET `value`= '$strIntroText' WHERE `key`='IntroText'");
|
||||||
$db->query("UPDATE config SET value= '$contactEmail' WHERE key='contactEmail'");
|
$db->query("UPDATE `config` SET `value`= '$boolRating' WHERE `key`='boolRating'");
|
||||||
$db->query("UPDATE config SET value= '$strImpressum' WHERE key='impressum'");
|
$db->query("UPDATE `config` SET `value`= '$boolComment' WHERE `key`='boolComment'");
|
||||||
$db->query("UPDATE config SET value= '$strUrl' WHERE key='url'");
|
$db->query("UPDATE `config` SET `value`= '$boolUserinfo' WHERE `key`='boolUserinfo'");
|
||||||
$db->query("UPDATE config SET value= '$strUrlBez' WHERE key='UrlBez'");
|
$db->query("UPDATE `config` SET `value`= '$boolDefect' WHERE `key`='boolDefect'");
|
||||||
$db->query("UPDATE config SET value= '$strIntroText' WHERE key='IntroText'");
|
$db->query("UPDATE `config` SET `value`= '$boolUpload' WHERE `key`='boolUpload'");
|
||||||
|
$db->query("UPDATE `config` SET `value`= '$boolDistrictSelection' WHERE `key`='boolDistrictSelection'");
|
||||||
$db->query("UPDATE config SET value= '$boolActive' WHERE key='boolActive'");
|
|
||||||
$db->query("UPDATE config SET value= '$boolRating' WHERE key='boolRating'");
|
|
||||||
$db->query("UPDATE config SET value= '$boolComment' WHERE key='boolComment'");
|
|
||||||
$db->query("UPDATE config SET value= '$boolUserinfo' WHERE key='boolUserinfo'");
|
|
||||||
$db->query("UPDATE config SET value= '$boolDefect' WHERE key='boolDefect'");
|
|
||||||
$db->query("UPDATE config SET value= '$boolUpload' WHERE key='boolUpload'");
|
|
||||||
|
|
||||||
header("Location: configuration.php");
|
header("Location: configuration.php");
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
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) {
|
if (!$boolLogin) {
|
||||||
header("Location: login.php");
|
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");
|
require ("../config.php");
|
||||||
|
|
||||||
// Set headers to make the browser download the results as a csv file
|
// Set headers to make the browser download the results as a csv file
|
||||||
@@ -28,7 +34,9 @@
|
|||||||
// Query
|
// Query
|
||||||
|
|
||||||
$strSQL="SELECT l.id as lid,l.*,adr.*
|
$strSQL="SELECT l.id as lid,l.*,adr.*
|
||||||
FROM location l LEFT JOIN address adr ON l.id=adr.loc_id ORDER BY created_at ASC";
|
FROM location l LEFT JOIN address adr ON l.id=adr.loc_id
|
||||||
|
WHERE $sqlDistrict
|
||||||
|
ORDER BY created_at ASC";
|
||||||
$query = $db->query($strSQL);
|
$query = $db->query($strSQL);
|
||||||
|
|
||||||
// Fetch the first row
|
// Fetch the first row
|
||||||
|
|||||||
@@ -15,10 +15,17 @@
|
|||||||
if (!$boolLogin) {
|
if (!$boolLogin) {
|
||||||
header("Location: login.php");
|
header("Location: login.php");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$strDistrict=$_SESSION['district'];
|
||||||
|
$sqlDistrict = ($boolSuperAdmin) ? "1" : "l.district='$strDistrict'";
|
||||||
|
|
||||||
|
|
||||||
require ("../config.php");
|
require ("../config.php");
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
@@ -37,7 +44,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<!-- Navbar -->
|
<!-- Navbar -->
|
||||||
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
|
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
|
||||||
<a class="navbar-brand" href="#">Administration <?= $strTitle ?></a>
|
<a class="navbar-brand" href="#">Administration <?= $strTitle ?> <?=$strDistrictTitle?></a>
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbars" aria-controls="navbars" aria-expanded="false" aria-label="Toggle navigation">
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbars" aria-controls="navbars" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
if (!$boolLogin) {
|
if (!$boolLogin) {
|
||||||
header("Location: login.php");
|
header("Location: login.php");
|
||||||
}
|
}
|
||||||
require_once("../config.db.php");
|
$strDistrict=$_SESSION['district'];
|
||||||
require ("../config.php");
|
require ("../config.php");
|
||||||
require ("../lib/geocoding.php");
|
require ("../lib/geocoding.php");
|
||||||
$boolRefresh = (isset($_GET['refresh']) & $_GET['refresh']==1);
|
$boolRefresh = (isset($_GET['refresh']) & $_GET['refresh']==1);
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
* E-Mail: info@hupfeld-software.de
|
* E-Mail: info@hupfeld-software.de
|
||||||
* Version: 1.0
|
* Version: 1.0
|
||||||
* Datum: 18.05.2021
|
* Datum: 18.05.2021
|
||||||
|
* zuletzte bearbeitet: 21.02.2024
|
||||||
******************************** */
|
******************************** */
|
||||||
|
|
||||||
|
|
||||||
@@ -15,19 +16,31 @@
|
|||||||
if (!$boolLogin) {
|
if (!$boolLogin) {
|
||||||
header("Location: login.php");
|
header("Location: login.php");
|
||||||
}
|
}
|
||||||
|
$strDistrict=$_SESSION['district'];
|
||||||
|
|
||||||
|
|
||||||
|
if (isset($_SESSION['superadmin'])) {
|
||||||
|
$boolSuperAdmin = $_SESSION['superadmin']==true;
|
||||||
|
} else {
|
||||||
|
$boolSuperAdmin=false;
|
||||||
|
}
|
||||||
|
|
||||||
$dbFilename = "../db/locations.db";
|
|
||||||
include("../config.php");
|
include("../config.php");
|
||||||
$boolShowmap=false;
|
$boolShowmap=false;
|
||||||
|
|
||||||
|
$sqlDistrict = ($boolSuperAdmin) ? "1" : "l.district='$strDistrict'";
|
||||||
|
|
||||||
|
// Eintag löschen
|
||||||
if (isset($_GET['delid'])) {
|
if (isset($_GET['delid'])) {
|
||||||
if($_GET['csrf'] !== $_SESSION['csrf_token']) {
|
if($_GET['csrf'] !== $_SESSION['csrf_token']) {
|
||||||
die("Ungültiger Token");
|
die("Ungültiger Token");
|
||||||
}
|
}
|
||||||
$numDelete = (int)$_GET['delid'];
|
$numDelete = (int)$_GET['delid'];
|
||||||
|
|
||||||
$stmt = $db->prepare("DELETE FROM location WHERE id = :id");
|
|
||||||
|
$stmt = $db->prepare("DELETE FROM location WHERE id = :id AND district=:district");
|
||||||
$stmt->bindValue(":id",$numDelete);
|
$stmt->bindValue(":id",$numDelete);
|
||||||
|
$stmt->bindValue(":district",$strDistrict);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
|
|
||||||
$stmt = $db->prepare("DELETE FROM comment WHERE loc_id= :loc_id");
|
$stmt = $db->prepare("DELETE FROM comment WHERE loc_id= :loc_id");
|
||||||
@@ -48,6 +61,7 @@
|
|||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Kommentar löschen
|
||||||
if (isset($_GET['delcid'])) {
|
if (isset($_GET['delcid'])) {
|
||||||
if($_GET['csrf'] !== $_SESSION['csrf_token']) {
|
if($_GET['csrf'] !== $_SESSION['csrf_token']) {
|
||||||
die("Ungültiger Token");
|
die("Ungültiger Token");
|
||||||
@@ -58,7 +72,7 @@
|
|||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Bild löschen
|
||||||
if (isset($_GET['delfid'])) {
|
if (isset($_GET['delfid'])) {
|
||||||
if($_GET['csrf'] !== $_SESSION['csrf_token']) {
|
if($_GET['csrf'] !== $_SESSION['csrf_token']) {
|
||||||
die("Ungültiger Token");
|
die("Ungültiger Token");
|
||||||
@@ -79,6 +93,7 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Karte zeigen
|
||||||
if (isset($_GET['showmap'])) {
|
if (isset($_GET['showmap'])) {
|
||||||
$numShowmap=(int)$_GET['showmap'];
|
$numShowmap=(int)$_GET['showmap'];
|
||||||
$boolShowmap=$numShowmap==1;
|
$boolShowmap=$numShowmap==1;
|
||||||
@@ -126,7 +141,7 @@
|
|||||||
|
|
||||||
<!-- Navbar -->
|
<!-- Navbar -->
|
||||||
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
|
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
|
||||||
<a class="navbar-brand" href="#">Administration <?= $strTitle ?></a>
|
<a class="navbar-brand" href="#">Administration <?=$strTitle?> <?=$strDistrictTitle?></a>
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbars" aria-controls="navbars" aria-expanded="false" aria-label="Toggle navigation">
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbars" aria-controls="navbars" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
@@ -163,7 +178,9 @@
|
|||||||
<div class="container-fluid" style="margin-top:5em;">
|
<div class="container-fluid" style="margin-top:5em;">
|
||||||
<table class="table table-bordered table-striped">
|
<table class="table table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr><th>id</th><th>Username</th>
|
<tr><th>id</th>
|
||||||
|
<?= ($boolSuperAdmin) ? "<th>Kreis</th>" : "" ?>
|
||||||
|
<th>Username</th>
|
||||||
<?= ($boolUserinfo) ? "<th>Alter</th><th>Transport</th>" : "" ?>
|
<?= ($boolUserinfo) ? "<th>Alter</th><th>Transport</th>" : "" ?>
|
||||||
<th>Topic</th>
|
<th>Topic</th>
|
||||||
<th>Beschreibung</th>
|
<th>Beschreibung</th>
|
||||||
@@ -181,12 +198,16 @@
|
|||||||
<?php
|
<?php
|
||||||
$strScript="";
|
$strScript="";
|
||||||
//$strSQL="SELECT * FROM location ORDER BY created_at DESC";
|
//$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 created_at ASC";
|
||||||
$result = $db->query($strSQL);
|
$result = $db->query($strSQL);
|
||||||
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||||
$id = $row['lid'];
|
$id = $row['lid'];
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo "<td>".$id."</td>";
|
echo "<td>".$id."</td>";
|
||||||
|
echo ($boolSuperAdmin) ? "<td>".$row['district']."</td>" : "";
|
||||||
echo "<td>". stripslashes($row['username']) ."</td>";
|
echo "<td>". stripslashes($row['username']) ."</td>";
|
||||||
echo ($boolUserinfo) ? "<td>".$row['age']."</td><td>".$row['transport']."</td>" : "";
|
echo ($boolUserinfo) ? "<td>".$row['age']."</td><td>".$row['transport']."</td>" : "";
|
||||||
echo "<td>".$arrIcon[$row['topic']]." ".$arrTopic[$row['topic']]."</td>";
|
echo "<td>".$arrIcon[$row['topic']]." ".$arrTopic[$row['topic']]."</td>";
|
||||||
@@ -210,7 +231,8 @@
|
|||||||
echo "<td>".$row['road']." ".$row['house_number']."<br>"
|
echo "<td>".$row['road']." ".$row['house_number']."<br>"
|
||||||
.$row['neighbourhood']." "
|
.$row['neighbourhood']." "
|
||||||
.$row['hamlet']." "
|
.$row['hamlet']." "
|
||||||
.$row['suburb']."</td>";
|
.$row['suburb']."<br>"
|
||||||
|
.$row['postcode']." ".$row['city']."</td>";
|
||||||
$strDefect = (isset($row['defect']) && $row['defect']>0) ? $arrDefect[$row['defect']] : "";
|
$strDefect = (isset($row['defect']) && $row['defect']>0) ? $arrDefect[$row['defect']] : "";
|
||||||
echo "<td id='defect_".$id."' value='".$row['defect']."'>".$strDefect."</td>\n";
|
echo "<td id='defect_".$id."' value='".$row['defect']."'>".$strDefect."</td>\n";
|
||||||
|
|
||||||
|
|||||||
@@ -6,11 +6,17 @@
|
|||||||
* E-Mail: info@hupfeld-software.de
|
* E-Mail: info@hupfeld-software.de
|
||||||
* Version: 1.0
|
* Version: 1.0
|
||||||
* Datum: 18.05.2021
|
* Datum: 18.05.2021
|
||||||
|
* zuletzt bearbeitet: 21.02.2024
|
||||||
******************************** */
|
******************************** */
|
||||||
|
|
||||||
|
// Starte die Session
|
||||||
|
session_start();
|
||||||
$dbFilename = "../db/locations.db";
|
if (isset($_SESSION['district'])) {
|
||||||
|
$strDistrict=$_SESSION['district'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$strDistrict="";
|
||||||
|
}
|
||||||
require_once("../config.php");
|
require_once("../config.php");
|
||||||
$boolLogin=true;
|
$boolLogin=true;
|
||||||
|
|
||||||
@@ -18,13 +24,15 @@ $boolLogin=true;
|
|||||||
if (isset($_POST['login']) && isset($_POST['password'])) {
|
if (isset($_POST['login']) && isset($_POST['password'])) {
|
||||||
$strUser = trim($_POST['login']);
|
$strUser = trim($_POST['login']);
|
||||||
$strPassword = trim($_POST['password']);
|
$strPassword = trim($_POST['password']);
|
||||||
$strSQL = "SELECT username,passwordhash FROM user WHERE username='$strUser'";
|
$strSQL = "SELECT username,passwordhash,district,role FROM user WHERE username='$strUser'";
|
||||||
$result = $db->query($strSQL);
|
$result = $db->query($strSQL);
|
||||||
if ($row=$result->fetch(PDO::FETCH_ASSOC)) {
|
if ($row=$result->fetch(PDO::FETCH_ASSOC)) {
|
||||||
if (password_verify($strPassword,$row['passwordhash'])) {
|
$boolOk = $strDistrict==$row['district'] || $row['role']=="admin";
|
||||||
session_start();
|
if (password_verify($strPassword,$row['passwordhash']) && $boolOk) {
|
||||||
$_SESSION['user']=$strUser;
|
$_SESSION['user']=$strUser;
|
||||||
$_SESSION['csrf_token'] = uniqid('', true);
|
$_SESSION['csrf_token'] = uniqid('', true);
|
||||||
|
$_SESSION['superadmin'] = $row['role']=="admin";
|
||||||
|
$db->query("UPDATE `user` SET `lastlogin`= NOW() WHERE `username`='$strUser'");
|
||||||
header ("Location: index.php");
|
header ("Location: index.php");
|
||||||
} else {
|
} else {
|
||||||
$boolLogin=false;
|
$boolLogin=false;
|
||||||
@@ -34,8 +42,6 @@ $boolLogin=true;
|
|||||||
$boolLogin=false;
|
$boolLogin=false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
@@ -51,7 +57,7 @@ $boolLogin=true;
|
|||||||
|
|
||||||
<!-- Navbar -->
|
<!-- Navbar -->
|
||||||
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
|
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
|
||||||
<a class="navbar-brand" href="#"><?= $strTitle ?></a>
|
<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">
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbars" aria-controls="navbars" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
@@ -60,6 +66,9 @@ $boolLogin=true;
|
|||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="../index.php?ref=1">Karte</a>
|
<a class="nav-link" href="../index.php?ref=1">Karte</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="../liste.php">Liste</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
@@ -75,7 +84,6 @@ $boolLogin=true;
|
|||||||
</div> <br>
|
</div> <br>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h2>Login</h2>
|
<h2>Login</h2>
|
||||||
@@ -89,6 +97,7 @@ $boolLogin=true;
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="password">Password</label>
|
<label for="password">Password</label>
|
||||||
<input type="password" name="password" class="form-control" id="password" placeholder="Passwort" required>
|
<input type="password" name="password" class="form-control" id="password" placeholder="Passwort" required>
|
||||||
|
<input type="hidden" name="district" value="<?=$strDistrict?>">
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btn btn-primary">Absenden</button>
|
<button type="submit" class="btn btn-primary">Absenden</button>
|
||||||
</form>
|
</form>
|
||||||
@@ -97,12 +106,9 @@ $boolLogin=true;
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="margin-top:5em;">
|
||||||
<div style="margin-top:5em;">
|
<a class="btn btn-primary text-white" href="../index.php?ref=1">zurück</a>
|
||||||
<a class="btn btn-primary text-white" href="../index.php?ref=1">zurück</a>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,5 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
|
if (isset($_SESSION['district'])) {
|
||||||
|
$strDistrict=$_SESSION['district'];
|
||||||
|
}
|
||||||
session_destroy();
|
session_destroy();
|
||||||
|
session_start();
|
||||||
|
$_SESSION['district']=$strDistrict;
|
||||||
|
|
||||||
header ("Location: ../index.php");
|
header ("Location: ../index.php");
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|||||||
@@ -6,27 +6,16 @@
|
|||||||
if (!$boolLogin) {
|
if (!$boolLogin) {
|
||||||
header("Location: login.php");
|
header("Location: login.php");
|
||||||
}
|
}
|
||||||
|
$strDistrict=$_SESSION['district'];
|
||||||
$dbFilename = "../db/locations.db";
|
if (isset($_SESSION['superadmin'])) {
|
||||||
|
$boolSuperAdmin = $_SESSION['superadmin']==true;
|
||||||
|
} else {
|
||||||
|
$boolSuperAdmin=false;
|
||||||
|
}
|
||||||
include("../config.php");
|
include("../config.php");
|
||||||
|
$sqlDistrict = ($boolSuperAdmin) ? "1" : "l.district='$strDistrict'";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$arrTopic = array (
|
|
||||||
1 => "Fußverkehr",
|
|
||||||
2 => "Radverkehr",
|
|
||||||
3 => "Bus und Bahn",
|
|
||||||
4 => "Pkw-Verkehr",
|
|
||||||
5 => "Lkw-Verkehr"
|
|
||||||
);
|
|
||||||
|
|
||||||
$arrIcon = array (
|
|
||||||
1 => "<i class='fa fa-male'></i>",
|
|
||||||
2 => "<i class='fa fa-bicycle'></i>",
|
|
||||||
3 => "<i class='fa fa-train'></i>",
|
|
||||||
4 => "<i class='fa fa-car'></i>",
|
|
||||||
5 => "<i class='fa fa-truck'></i>"
|
|
||||||
);
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
@@ -50,12 +39,11 @@
|
|||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<table class="table table-bordered table-striped">
|
<table class="table table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr><th>id</th><th>Username</th>
|
<tr><th>id</th>
|
||||||
|
<th>Username</th>
|
||||||
<?= ($boolUserinfo) ? "<th>Alter</th><th>Transport</th>" : ""; ?>
|
<?= ($boolUserinfo) ? "<th>Alter</th><th>Transport</th>" : ""; ?>
|
||||||
<th>Topic</th>
|
<th>Topic</th>
|
||||||
<th>Beschreibung</th>
|
<th>Beschreibung</th>
|
||||||
@@ -70,7 +58,10 @@
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
$strScript="";
|
$strScript="";
|
||||||
$strSQL="SELECT l.id as lid,l.*,adr.* FROM location l LEFT JOIN address adr ON l.id=adr.loc_id ORDER BY city,postcode,suburb,hamlet,road ASC";
|
$strSQL="SELECT l.id as lid,l.*,adr.*
|
||||||
|
FROM location l LEFT JOIN address adr ON l.id=adr.loc_id
|
||||||
|
WHERE $sqlDistrict
|
||||||
|
ORDER BY city,postcode,suburb,hamlet,road ASC";
|
||||||
$result = $db->query($strSQL);
|
$result = $db->query($strSQL);
|
||||||
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||||
$id = $row['lid'];
|
$id = $row['lid'];
|
||||||
@@ -114,7 +105,6 @@
|
|||||||
$strScript.="var mymap_".$id." = L.map(map_".$id.").setView([".$row['lat'].", ".$row['lng']."], 16);\n";
|
$strScript.="var mymap_".$id." = L.map(map_".$id.").setView([".$row['lat'].", ".$row['lng']."], 16);\n";
|
||||||
$strScript.="L.tileLayer(url, {maxZoom: 18,minZoom:12,attribution: attribution,id: 'mapbox/streets-v11',tileSize: 512,zoomOffset: -1}).addTo(mymap_".$id.")\n";
|
$strScript.="L.tileLayer(url, {maxZoom: 18,minZoom:12,attribution: attribution,id: 'mapbox/streets-v11',tileSize: 512,zoomOffset: -1}).addTo(mymap_".$id.")\n";
|
||||||
$strScript.="L.marker([".$row['lat'].", ".$row['lng']."], { icon: infoMarker } ).addTo(mymap_".$id.")\n\n";
|
$strScript.="L.marker([".$row['lat'].", ".$row['lng']."], { icon: infoMarker } ).addTo(mymap_".$id.")\n\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -122,17 +112,15 @@
|
|||||||
<a class="btn btn-primary" href="../index.php?ref=1">zurück</a>
|
<a class="btn btn-primary" href="../index.php?ref=1">zurück</a>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$( document ).ready(function() {
|
$( document ).ready(function() {
|
||||||
|
var url = 'https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=<?=$mapbox_key?>';
|
||||||
|
|
||||||
var url = 'https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw';
|
|
||||||
var attribution = 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, ' +
|
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>, ' +
|
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||||
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>';
|
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>';
|
||||||
var infoMarker = L.AwesomeMarkers.icon({icon: 'info', prefix: 'fa', markerColor: 'orange'});
|
var infoMarker = L.AwesomeMarkers.icon({icon: 'info', prefix: 'fa', markerColor: 'orange'});
|
||||||
|
|
||||||
|
|
||||||
<?= $strScript ?>
|
<?= $strScript ?>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,9 +1,17 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/** *****************************
|
||||||
|
* Ideenmelder
|
||||||
|
* Autor: Walter Hupfeld, Hamm
|
||||||
|
* E-Mail: info@hupfeld-software.de
|
||||||
|
* Version: 1.0
|
||||||
|
* Datum: 18.05.2021
|
||||||
|
* zuletzt geändert: 18.02.2024
|
||||||
|
******************************** */
|
||||||
|
|
||||||
// Query
|
// Query
|
||||||
$dbFilename="../db/locations.db";
|
|
||||||
require ("../config.php");
|
require_once("../config.db.php");
|
||||||
|
require_once ("../config.php");
|
||||||
|
|
||||||
|
|
||||||
$result = $db->query("SELECT * FROM location ORDER BY created_at ASC");
|
$result = $db->query("SELECT * FROM location ORDER BY created_at ASC");
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
$dbFilename="../db/locations.db";
|
|
||||||
require ("../config.php");
|
require ("../config.php");
|
||||||
|
|
||||||
if ($boolComment){
|
if ($boolComment){
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$dbFilename="../db/locations.db";
|
|
||||||
require_once("../config.db.php");
|
require_once("../config.db.php");
|
||||||
require_once("../config.php");
|
require_once("../config.php");
|
||||||
require_once("../lib/functions.php");
|
require_once("../lib/functions.php");
|
||||||
@@ -16,6 +15,7 @@ $numTopic = (isset($_POST['topic'])) ? $_POST['topic'] : 1;
|
|||||||
$numDefect = (isset($_POST['defect'])) ? $_POST['defect'] : 0;
|
$numDefect = (isset($_POST['defect'])) ? $_POST['defect'] : 0;
|
||||||
$numLng = $_POST['lng'];
|
$numLng = $_POST['lng'];
|
||||||
$numLat = $_POST['lat'];
|
$numLat = $_POST['lat'];
|
||||||
|
$strDistrict = $_POST['district'];
|
||||||
$boolUploadOk=false;
|
$boolUploadOk=false;
|
||||||
|
|
||||||
if ($boolUpload && !empty($_FILES['uploadfile']['name'])) {
|
if ($boolUpload && !empty($_FILES['uploadfile']['name'])) {
|
||||||
@@ -40,8 +40,8 @@ if ($boolUpload && !empty($_FILES['uploadfile']['name'])) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$stmt = $db->prepare("INSERT INTO location (username,age,transport,description,defect,topic,lng,lat)
|
$stmt = $db->prepare("INSERT INTO location (username,age,transport,description,defect,topic,lng,lat,district)
|
||||||
VALUES (:username,:age,:transport,:description,:defect,:topic,:lng,:lat)");
|
VALUES (:username,:age,:transport,:description,:defect,:topic,:lng,:lat,:district)");
|
||||||
|
|
||||||
$stmt->bindValue(':username', $strUsername);
|
$stmt->bindValue(':username', $strUsername);
|
||||||
$stmt->bindValue(':age', $strAge);
|
$stmt->bindValue(':age', $strAge);
|
||||||
@@ -51,6 +51,7 @@ $stmt->bindValue(':topic', $numTopic);
|
|||||||
$stmt->bindValue(':lng', $numLng);
|
$stmt->bindValue(':lng', $numLng);
|
||||||
$stmt->bindValue(':lat', $numLat);
|
$stmt->bindValue(':lat', $numLat);
|
||||||
$stmt->bindValue(':defect', $numDefect);
|
$stmt->bindValue(':defect', $numDefect);
|
||||||
|
$stmt->bindValue(':district',$strDistrict);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
|
|
||||||
// fetch last_id - sqlite
|
// fetch last_id - sqlite
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
$dbFilename="../db/locations.db";
|
|
||||||
require_once("../config.php");
|
require_once("../config.php");
|
||||||
|
|
||||||
$mode = trim($_POST['mode']);
|
$mode = trim($_POST['mode']);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$dbFilename="../db/locations.db";
|
|
||||||
require_once("../config.php");
|
require_once("../config.php");
|
||||||
require_once("../lib/functions.php");
|
require_once("../lib/functions.php");
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
$cachetime = 0;
|
||||||
|
|
||||||
$location_key="";
|
$location_key="";
|
||||||
|
$mapbox_key="pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$db = new PDO('mysql:host='.$db_server.';dbname='.$db_name.';charset=utf8mb4', $db_user, $db_passwd);
|
$db = new PDO('mysql:host='.$db_server.';dbname='.$db_name.';charset=utf8mb4', $db_user, $db_passwd);
|
||||||
193
config.php
193
config.php
@@ -4,84 +4,117 @@
|
|||||||
* Ideenmelder
|
* Ideenmelder
|
||||||
* Autor: Walter Hupfeld, Hamm
|
* Autor: Walter Hupfeld, Hamm
|
||||||
* E-Mail: info@hupfeld-software.de
|
* E-Mail: info@hupfeld-software.de
|
||||||
* Version: 1.0
|
* Version: 1.1
|
||||||
* Datum: 18.05.2021
|
* Datum: 18.02.2024
|
||||||
|
* zuletzt bearbeitet: 20.02.2024
|
||||||
******************************** */
|
******************************** */
|
||||||
|
|
||||||
require_once("config.db.php");
|
require_once("config.db.php");
|
||||||
|
|
||||||
$strSQL = "select * from config";
|
$strSQL = "select * from config";
|
||||||
$result = $db->query($strSQL);
|
$result = $db->query($strSQL);
|
||||||
|
|
||||||
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 "impressum":
|
|
||||||
$strImpressum =$row['value'];
|
|
||||||
break;
|
|
||||||
case "url":
|
|
||||||
$strUrl =$row['value'];
|
|
||||||
break;
|
|
||||||
case "UrlBez":
|
|
||||||
$strUrlBez =$row['value'];
|
|
||||||
break;
|
|
||||||
case "IntroText":
|
|
||||||
$strIntroText=$row['value'];
|
|
||||||
break;
|
|
||||||
case "boolActive":
|
|
||||||
$boolActive = ($row['value']=="1");
|
|
||||||
break;
|
|
||||||
case "boolRating":
|
|
||||||
$boolRating = ($row['value']=="1");
|
|
||||||
break;
|
|
||||||
case "boolComment":
|
|
||||||
$boolComment = ($row['value']=="1");
|
|
||||||
break;
|
|
||||||
case "boolUpload":
|
|
||||||
$boolUpload = ($row['value']=="1");
|
|
||||||
break;
|
|
||||||
case "boolDefect":
|
|
||||||
$boolDefect = ($row['value']=="1");
|
|
||||||
break;
|
|
||||||
case "boolUserinfo":
|
|
||||||
$boolUserinfo = ($row['value']=="1");
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
echo "Fehler bei ".$row['key'];
|
|
||||||
// Ende Lokalisierung
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// Allegemeine Konfiguration
|
||||||
|
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||||
|
switch ($row['key']) {
|
||||||
|
case "uploaddir" :
|
||||||
|
$uploaddir=$row['value'];
|
||||||
|
break;
|
||||||
|
case "title" :
|
||||||
|
$strTitle=$row['value'];
|
||||||
|
break;
|
||||||
|
case "logo":
|
||||||
|
$strLogo=$row['value'];
|
||||||
|
break;
|
||||||
|
case "contactEmail":
|
||||||
|
$contactEmail =$row['value'];
|
||||||
|
break;
|
||||||
|
case "introText":
|
||||||
|
$strIntroText =$row['value'];
|
||||||
|
break;
|
||||||
|
case "impressum":
|
||||||
|
$strImpressum =$row['value'];
|
||||||
|
break;
|
||||||
|
case "url":
|
||||||
|
$strUrl =$row['value'];
|
||||||
|
break;
|
||||||
|
case "UrlBez":
|
||||||
|
$strUrlBez =$row['value'];
|
||||||
|
break;
|
||||||
|
case "boolRating":
|
||||||
|
$boolRating = ($row['value']=="1");
|
||||||
|
break;
|
||||||
|
case "boolComment":
|
||||||
|
$boolComment = ($row['value']=="1");
|
||||||
|
break;
|
||||||
|
case "boolUpload":
|
||||||
|
$boolUpload = ($row['value']=="1");
|
||||||
|
break;
|
||||||
|
case "boolDefect":
|
||||||
|
$boolDefect = ($row['value']=="1");
|
||||||
|
break;
|
||||||
|
case "boolUserinfo":
|
||||||
|
$boolUserinfo = ($row['value']=="1");
|
||||||
|
break;
|
||||||
|
case "boolDistrictSelection":
|
||||||
|
$boolDistrictSelection = ($row['value']=="1");
|
||||||
|
break;
|
||||||
|
default: ;
|
||||||
|
//echo "Fehler bei ".$row['key'];
|
||||||
|
// Ende Lokalisierung
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Falls der Parameter district fehlt => Hamm
|
||||||
|
$result= $db->prepare("SELECT count(*) FROM district WHERE district=:district");
|
||||||
|
$result->bindParam(":district",$strDistrict);
|
||||||
|
$result->execute();
|
||||||
|
if ($row=$result->fetch(PDO::FETCH_NUM)) {
|
||||||
|
if ($row[0]==0) {
|
||||||
|
$strDistrict="unkown"; //default setzten
|
||||||
|
$strDistrictTitle="Unbekannt";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Spezifische Konfiguration für Districtt
|
||||||
|
$result= $db->prepare("SELECT * FROM district WHERE district=:district");
|
||||||
|
$result->bindParam(":district",$strDistrict);
|
||||||
|
$result->execute();
|
||||||
|
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||||
|
|
||||||
|
$boolActive = $row['active']==1;
|
||||||
|
$strDistrict = $row['district'];
|
||||||
|
$strDistrictTitle = $row['title'];
|
||||||
|
$strGeojson = $row['geojson'];
|
||||||
|
|
||||||
|
$numULAND=$row['ULAND'];
|
||||||
|
$numUREGBEZ=$row['UREGBEZ'];
|
||||||
|
$numUKREIS=$row['UKREIS'];
|
||||||
|
$numUGEMEINDE=$row['UGEMEINDE'];
|
||||||
|
|
||||||
|
$numInfoLat=$row['lat'];
|
||||||
|
$numInfoLng=$row['lng'];
|
||||||
|
$numZoom=$row['zoom'];
|
||||||
|
|
||||||
|
$strIntroText = ($boolActive) ? $strIntroText : "Dateneingabe nicht möglich";
|
||||||
|
$fileGeojson ="geojson/$strGeojson";
|
||||||
|
$strLocation = " AND ULAND=$numULAND AND UREGBEZ=$numUREGBEZ AND UKREIS=$numUKREIS ";
|
||||||
|
if ($numUGEMEINDE>0) {
|
||||||
|
$strLocation .= "AND UGEMEINDE=$numUGEMEINDE";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Arrax mit allen Distrikten für Auswahl
|
||||||
|
$arrDisctrict = array ();
|
||||||
|
$strSQL = "SELECT district,title FROM district WHERE active=1 ORDER BY title ASC";
|
||||||
|
$result=$db->query($strSQL);
|
||||||
|
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||||
|
$arrDistrict[$row['district']]=$row['title'];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$arrTopic = array (
|
$arrTopic = array (
|
||||||
@@ -100,6 +133,14 @@ $arrMarkerType = array (
|
|||||||
5=>"truckMarker",
|
5=>"truckMarker",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$arrIcon = array (
|
||||||
|
1 => "<i class='wa bg-info fa fa-male'></i>",
|
||||||
|
2 => "<i class='wa bg-success fa fa-bicycle'></i>",
|
||||||
|
3 => "<i class='wa bg-primary fa fa-bus'></i>",
|
||||||
|
4 => "<i class='wa bg-danger fa fa-car'></i>",
|
||||||
|
5 => "<i class='wa bg-warning fa fa-truck'></i>"
|
||||||
|
);
|
||||||
|
|
||||||
$arrAge = array (
|
$arrAge = array (
|
||||||
1 => "keine Angabe",
|
1 => "keine Angabe",
|
||||||
2 => "bis 14 Jahre",
|
2 => "bis 14 Jahre",
|
||||||
@@ -136,7 +177,6 @@ $arrDefect = array (
|
|||||||
22 => "Ampelspiegel installieren"
|
22 => "Ampelspiegel installieren"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
$arrTransport = array (
|
$arrTransport = array (
|
||||||
0 => "keine Angabe",
|
0 => "keine Angabe",
|
||||||
1 => "kein Auto",
|
1 => "kein Auto",
|
||||||
@@ -147,10 +187,3 @@ $arrTransport = array (
|
|||||||
6 => "Zu Fuß"
|
6 => "Zu Fuß"
|
||||||
);
|
);
|
||||||
|
|
||||||
$arrIcon = array (
|
|
||||||
1 => "<i class='wa bg-info fa fa-male'></i>",
|
|
||||||
2 => "<i class='wa bg-success fa fa-bicycle'></i>",
|
|
||||||
3 => "<i class='wa bg-primary fa fa-bus'></i>",
|
|
||||||
4 => "<i class='wa bg-danger fa fa-car'></i>",
|
|
||||||
5 => "<i class='wa bg-warning fa fa-truck'></i>"
|
|
||||||
);
|
|
||||||
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 |
@@ -93,3 +93,8 @@ i.wa {
|
|||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.jumbotron {
|
||||||
|
background-color:orange;
|
||||||
|
}
|
||||||
|
a, a:active, a:visited, a:active {color:orange;}
|
||||||
@@ -1,5 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
session_start();
|
||||||
|
if (!isset($_SESSION['district'])) { header("Location: start.php");}
|
||||||
|
$strDistrict=$_SESSION['district'];
|
||||||
|
require("config.php");
|
||||||
|
if ($strDistict=="unkown") { header("Location: start.php");}
|
||||||
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<?php require_once("config.php") ?>
|
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
@@ -15,7 +21,7 @@
|
|||||||
|
|
||||||
<!-- Navbar -->
|
<!-- Navbar -->
|
||||||
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
|
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
|
||||||
<a class="navbar-brand" href="#"><?= $strTitle ?></a>
|
<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">
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbars" aria-controls="navbars" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
40
docker-compose.sample.yml
Normal file
40
docker-compose.sample.yml
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
dev-ideenmelder:
|
||||||
|
image: php81:v1
|
||||||
|
container_name: dev-ideenmelder
|
||||||
|
volumes:
|
||||||
|
- ./:/var/www/html
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.dev-ideenmelder.entrypoints=https"
|
||||||
|
- "traefik.http.routers.dev-ideenmelder.rule=Host(`nrw-ideenmelder.hpadm.de`)"
|
||||||
|
- "traefik.http.routers.dev-ideenmelder.tls=true"
|
||||||
|
- "traefik.http.routers.dev-ideenmelder.tls.certresolver=http"
|
||||||
|
- "traefik.http.routers.dev-ideenmelder.middlewares=default@file"
|
||||||
|
- "traefik.http.routers.dev-ideenmelder.service=dev-ideenmelder"
|
||||||
|
- "traefik.http.services.dev-ideenmelder.loadbalancer.server.port=80"
|
||||||
|
- "traefik.docker.network=proxy"
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
|
- proxy
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
dev-ideenmelder-db:
|
||||||
|
image: mariadb
|
||||||
|
container_name: dev-ideenmelder-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
|
||||||
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>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
<?php require_once("config.php") ?>
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
@@ -15,7 +21,7 @@
|
|||||||
|
|
||||||
<!-- Navbar -->
|
<!-- Navbar -->
|
||||||
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
|
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
|
||||||
<a class="navbar-brand" href="#"><?= $strTitle ?></a>
|
<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">
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbars" aria-controls="navbars" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
56
index.php
56
index.php
@@ -1,6 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/*******************************
|
||||||
/** *****************************
|
|
||||||
* Ideenmelder
|
* Ideenmelder
|
||||||
* Autor: Walter Hupfeld, Hamm
|
* Autor: Walter Hupfeld, Hamm
|
||||||
* E-Mail: info@hupfeld-software.de
|
* E-Mail: info@hupfeld-software.de
|
||||||
@@ -8,12 +7,19 @@
|
|||||||
* Datum: 16.02.2024
|
* Datum: 16.02.2024
|
||||||
******************************** */
|
******************************** */
|
||||||
|
|
||||||
|
// Starte die Session
|
||||||
if (!file_exists("db/locations.db")) {
|
session_start();
|
||||||
header("Location: setup.php");
|
if (isset($_GET['d'])) {
|
||||||
|
$strDistrict=$_GET['d'];
|
||||||
|
$_SESSION['district'] = $_GET['d'];
|
||||||
|
} else if (isset($_SESSION['district'])) {
|
||||||
|
$strDistrict=$_SESSION['district'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
header("Location: start.php");
|
||||||
}
|
}
|
||||||
require("config.db.php");
|
|
||||||
require("config.php");
|
require("config.php");
|
||||||
|
if ($strDistrict=="unkown") { header("Location: start.php");}
|
||||||
require_once("lib/functions.php");
|
require_once("lib/functions.php");
|
||||||
|
|
||||||
$ref=(isset($_GET['ref']) && ($_GET['ref']==1));
|
$ref=(isset($_GET['ref']) && ($_GET['ref']==1));
|
||||||
@@ -21,18 +27,19 @@
|
|||||||
$strIntro ="<h4>".$strTitle."</h4>";
|
$strIntro ="<h4>".$strTitle."</h4>";
|
||||||
$strIntro .= nl2br2($strIntroText);
|
$strIntro .= nl2br2($strIntroText);
|
||||||
|
|
||||||
|
$result= $db->prepare("SELECT loc.*,f.filename
|
||||||
$strSQL="SELECT loc.*,f.filename FROM location loc LEFT JOIN files f ON loc.id=f.loc_id";
|
FROM location loc LEFT JOIN files f ON loc.id=f.loc_id
|
||||||
|
WHERE loc.district=:district");
|
||||||
|
$result->bindParam(":district",$strDistrict);
|
||||||
|
$result->execute();
|
||||||
/* Für die Auswertung nur bestimmte Kategorien anzeigen
|
/* Für die Auswertung nur bestimmte Kategorien anzeigen
|
||||||
$numDefect="(6,8,21)";
|
$numDefect="(6,8,21)";
|
||||||
$strSQL="SELECT loc.*,f.filename FROM location loc LEFT JOIN files f ON loc.id=f.loc_id WHERE defect in ".$numDefect;
|
$strSQL="SELECT loc.*,f.filename FROM location loc LEFT JOIN files f ON loc.id=f.loc_id WHERE defect in ".$numDefect;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$result = $db->query($strSQL);
|
|
||||||
$arrMarker = array();
|
$arrMarker = array();
|
||||||
$arrDescription = array();
|
$arrDescription = array();
|
||||||
|
$id=0;
|
||||||
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||||
$id=$row['id'];
|
$id=$row['id'];
|
||||||
$topic = $row['topic'];
|
$topic = $row['topic'];
|
||||||
@@ -77,15 +84,15 @@
|
|||||||
<link rel="stylesheet" href="css/style.css" />
|
<link rel="stylesheet" href="css/style.css" />
|
||||||
<link rel="stylesheet" href="css/lightbox.css" />
|
<link rel="stylesheet" href="css/lightbox.css" />
|
||||||
|
|
||||||
<title>Ideenmelder</title>
|
<title><?=$strTitle?></title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<!-- Navbar -->
|
<!-- Navbar -->
|
||||||
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
|
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
|
||||||
<a class="navbar-brand" href="#"><?= $strTitle ?></a>
|
<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">
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbars" aria-controls="navbars" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
<div class="collapse navbar-collapse" id="navbars">
|
<div class="collapse navbar-collapse" id="navbars">
|
||||||
@@ -97,8 +104,20 @@
|
|||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="liste.php">Liste</a>
|
<a class="nav-link" href="liste.php">Liste</a>
|
||||||
</li>
|
</li>
|
||||||
|
<?php if ($boolDistrictSelection): ?>
|
||||||
|
<!-- District -->
|
||||||
|
<form method="GET" action="index.php">
|
||||||
|
<select name="d" style="float:left;margin-top:0.5em;margin-right:0.5em;" onchange="this.form.submit()">
|
||||||
|
<?php foreach ($arrDistrict as $key => $strTitle):
|
||||||
|
$strActive = ($strDistrict==$key) ? "selected=\"selected\"" : ""; ?>
|
||||||
|
<option value="<?=$key?>" <?=$strActive?>><?=$strTitle?></option>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</select>
|
||||||
|
</form>
|
||||||
|
<?php endif; ?>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<ul class="navbar-nav mr-auto right">
|
<ul class="navbar-nav mr-auto right">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
@@ -118,10 +137,9 @@
|
|||||||
|
|
||||||
<div class="container-fluid" style="margin-top: 4em;">
|
<div class="container-fluid" style="margin-top: 4em;">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<nav class="col-md-2 d-none d-md-block bg-light sidebar">
|
<nav class="col-md-2 d-none d-md-block bg-light sidebar">
|
||||||
<div class="sidebar-sticky">
|
<div class="sidebar-sticky">
|
||||||
<img class="logo" src="<?=$strLogo?>" alt="Logo" >
|
<a href="start.php"><img class="logo" src="<?=$strLogo?>" alt="Logo" ></a>
|
||||||
<ul class="nav flex-column">
|
<ul class="nav flex-column">
|
||||||
<?php
|
<?php
|
||||||
foreach ($arrTopic as $key=>$topic) {
|
foreach ($arrTopic as $key=>$topic) {
|
||||||
@@ -153,8 +171,6 @@
|
|||||||
?>
|
?>
|
||||||
<div id="loader"><img src="css/images/ajax-loader.gif"></div>
|
<div id="loader"><img src="css/images/ajax-loader.gif"></div>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
|
||||||
// Map ----------------------------------------------------------------------
|
// Map ----------------------------------------------------------------------
|
||||||
|
|
||||||
var mymap = L.map('mapid').setView([<?=$numInfoLat ?>, <?=$numInfoLng ?>], <?=$numZoom ?>);
|
var mymap = L.map('mapid').setView([<?=$numInfoLat ?>, <?=$numInfoLng ?>], <?=$numZoom ?>);
|
||||||
@@ -163,7 +179,7 @@
|
|||||||
// ocmlink = '<a href="http://thunderforest.com/">Thunderforest</a>';
|
// ocmlink = '<a href="http://thunderforest.com/">Thunderforest</a>';
|
||||||
var ocmLink = '<a href="https://www.mapbox.com/">Mapbox</a>';
|
var ocmLink = '<a href="https://www.mapbox.com/">Mapbox</a>';
|
||||||
|
|
||||||
L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {
|
L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=<?=$mapbox_key?>', {
|
||||||
maxZoom: 18,
|
maxZoom: 18,
|
||||||
minZoom:<?=$numZoom ?>,
|
minZoom:<?=$numZoom ?>,
|
||||||
attribution: 'Map data © '+ mapLink +' contributors, ' +
|
attribution: 'Map data © '+ mapLink +' contributors, ' +
|
||||||
@@ -301,6 +317,7 @@
|
|||||||
$("#newobjectform").submit(function(event){
|
$("#newobjectform").submit(function(event){
|
||||||
$("#lat").val(lat);
|
$("#lat").val(lat);
|
||||||
$("#lng").val(lng);
|
$("#lng").val(lng);
|
||||||
|
$("#district").val("<?=$strDistrict?>");
|
||||||
topic=$('input[name=topic]:checked').val();
|
topic=$('input[name=topic]:checked').val();
|
||||||
newMarker = getMarker(topic);
|
newMarker = getMarker(topic);
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
@@ -464,7 +481,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -84,6 +84,7 @@
|
|||||||
|
|
||||||
<input type="hidden" id="lng" name="lng" value="0" />
|
<input type="hidden" id="lng" name="lng" value="0" />
|
||||||
<input type="hidden" id="lat" name="lat" value="0" />
|
<input type="hidden" id="lat" name="lat" value="0" />
|
||||||
|
<input type="hidden" id="district" name="district" value="<?=$strDistrict?>" />
|
||||||
|
|
||||||
<!-- Dateiupload ---------------------------------- -->
|
<!-- Dateiupload ---------------------------------- -->
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
require("../config.db.php");
|
require("../config.db.php");
|
||||||
|
|
||||||
function getAddress($lat,$lng) {
|
function getAddress($lat,$lng) {
|
||||||
|
global $location_key;
|
||||||
|
|
||||||
$key = $location_key;
|
$key = $location_key;
|
||||||
$url = "https://us1.locationiq.com/v1/reverse.php?key=".$key."&lat=".$lat."&lon=".$lng."&format=json";
|
$url = "https://us1.locationiq.com/v1/reverse.php?key=".$key."&lat=".$lat."&lon=".$lng."&format=json";
|
||||||
@@ -108,7 +109,7 @@ function fillAddressTable($db,$limit=20) {
|
|||||||
}
|
}
|
||||||
$strTable .= "</tr>";
|
$strTable .= "</tr>";
|
||||||
|
|
||||||
sleep(0.5); //api restriction
|
sleep(1); //api restriction
|
||||||
writeAddress($db,$id,$data);
|
writeAddress($db,$id,$data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
50
liste.php
50
liste.php
@@ -8,11 +8,12 @@
|
|||||||
* Datum: 18.05.2021
|
* Datum: 18.05.2021
|
||||||
******************************** */
|
******************************** */
|
||||||
|
|
||||||
|
session_start();
|
||||||
if (!file_exists("config.php")) {
|
if (!isset($_SESSION['district'])) { header("Location: start.php");}
|
||||||
header("Location: setup.php");
|
$strDistrict=$_SESSION['district'];
|
||||||
}
|
require("config.php");
|
||||||
require("config.php");
|
if ($strDistrict=="unkown") { header("Location: start.php");}
|
||||||
|
?>
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
@@ -28,7 +29,9 @@
|
|||||||
<link rel="stylesheet" href="css/leaflet.awesome-markers.css" />
|
<link rel="stylesheet" href="css/leaflet.awesome-markers.css" />
|
||||||
<link rel="stylesheet" href="css/lightbox.css" />
|
<link rel="stylesheet" href="css/lightbox.css" />
|
||||||
<link rel="stylesheet" href="css/font-awesome.min.css">
|
<link rel="stylesheet" href="css/font-awesome.min.css">
|
||||||
<link rel="stylesheet" href="vendor/DataTables/datatable.min.css">
|
<link rel="stylesheet" href="//cdn.datatables.net/2.0.0/css/dataTables.dataTables.min.css">
|
||||||
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="vendor/DataTables/DataTables-1.10.21/css/dataTables.bootstrap4.min.css">
|
<link rel="stylesheet" href="vendor/DataTables/DataTables-1.10.21/css/dataTables.bootstrap4.min.css">
|
||||||
|
|
||||||
|
|
||||||
@@ -38,8 +41,11 @@
|
|||||||
<script src="js/leaflet.ajax.js"></script>
|
<script src="js/leaflet.ajax.js"></script>
|
||||||
<script src="js/leaflet.awesome-markers.js"></script>
|
<script src="js/leaflet.awesome-markers.js"></script>
|
||||||
<script src="js/lightbox.min.js"></script>
|
<script src="js/lightbox.min.js"></script>
|
||||||
<script src="vendor/DataTables/datatables.js"></script>
|
|
||||||
<script src="vendor/DataTables/DataTables-1.10.21/js/dataTables.bootstrap4.min.js"></script>
|
<script src="//cdn.datatables.net/2.0.0/js/dataTables.min.js"></script>
|
||||||
|
|
||||||
|
<script src="vendor/DataTables/DataTables-1.10.21/js/dataTables.bootstrap4.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -52,7 +58,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<!-- Navbar -->
|
<!-- Navbar -->
|
||||||
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
|
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
|
||||||
<a class="navbar-brand" href="#"><?= $strTitle ?></a>
|
<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">
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbars" aria-controls="navbars" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
@@ -64,6 +70,18 @@
|
|||||||
<li class="nav-item active">
|
<li class="nav-item active">
|
||||||
<a class="nav-link" href="liste.php">Liste <span class="sr-only">(current)</span></a>
|
<a class="nav-link" href="liste.php">Liste <span class="sr-only">(current)</span></a>
|
||||||
</li>
|
</li>
|
||||||
|
<!-- District -->
|
||||||
|
<?php if ($boolDistrictSelection): ?>
|
||||||
|
<form method="GET" action="index.php">
|
||||||
|
<select name="d" style="float:left;margin-top:0.5em;margin-right:0.5em;" onchange="this.form.submit()">
|
||||||
|
<?php foreach ($arrDistrict as $key => $strMTitle):
|
||||||
|
$strActive = ($strDistrict==$key) ? "selected=\"selected\"" : ""; ?>
|
||||||
|
<option value="<?=$key?>" <?=$strActive?>><?=$strMTitle?></option>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</select>
|
||||||
|
</form>
|
||||||
|
<?php endif; ?>
|
||||||
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@@ -84,7 +102,7 @@
|
|||||||
|
|
||||||
<div class="container-fluid main" style="max-width:1360px;">
|
<div class="container-fluid main" style="max-width:1360px;">
|
||||||
<p> </p>
|
<p> </p>
|
||||||
<h2>Liste der Einträge</h2>
|
<h2>Liste der Einträge für <?=$strDistrictTitle?></h2>
|
||||||
|
|
||||||
<table id="list" class="table table-bordered table-striped">
|
<table id="list" class="table table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -102,9 +120,11 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once("config.php");
|
|
||||||
|
|
||||||
$strSQL="SELECT loc.*,f.filename FROM location loc LEFT JOIN files f ON loc.id=f.loc_id ORDER BY created_at DESC";
|
$strSQL="SELECT loc.*,f.filename
|
||||||
|
FROM location loc LEFT JOIN files f ON loc.id=f.loc_id
|
||||||
|
WHERE district='$strDistrict'
|
||||||
|
ORDER BY created_at DESC";
|
||||||
$result = $db->query($strSQL);
|
$result = $db->query($strSQL);
|
||||||
$numCounter=1;
|
$numCounter=1;
|
||||||
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||||
@@ -178,7 +198,9 @@
|
|||||||
jQuery(document).ready(function(){
|
jQuery(document).ready(function(){
|
||||||
|
|
||||||
|
|
||||||
dataTable = $('#list').DataTable( {
|
let dataTable = new DataTable(
|
||||||
|
"#list",
|
||||||
|
{
|
||||||
language: {
|
language: {
|
||||||
url: 'vendor/DataTables/de_DE.json'
|
url: 'vendor/DataTables/de_DE.json'
|
||||||
}
|
}
|
||||||
@@ -194,7 +216,7 @@ jQuery(document).ready(function(){
|
|||||||
?>
|
?>
|
||||||
var mymap = L.map('detailmap').setView([51.66, 7.82], 17);
|
var mymap = L.map('detailmap').setView([51.66, 7.82], 17);
|
||||||
|
|
||||||
L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {
|
L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=<?=$mapbox_key?>', {
|
||||||
maxZoom: 18,
|
maxZoom: 18,
|
||||||
minZoom:12,
|
minZoom:12,
|
||||||
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, ' +
|
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, ' +
|
||||||
|
|||||||
7
php81-apache/Dockerfile
Normal file
7
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
|
||||||
57
setup.php
57
setup.php
@@ -8,18 +8,12 @@
|
|||||||
* Datum: 18.05.2021
|
* Datum: 18.05.2021
|
||||||
******************************** */
|
******************************** */
|
||||||
|
|
||||||
|
exit();
|
||||||
$dbFilename = "db/locations.db";
|
// noch nicht vollständig angepasst
|
||||||
|
require("config.db.php");
|
||||||
$boolError=false;
|
$boolError=false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (file_exists("db/locations.php")) {
|
|
||||||
die ("Datenbank existiert bereits.");
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
@@ -29,10 +23,9 @@
|
|||||||
|
|
||||||
<title>Setup</title>
|
<title>Setup</title>
|
||||||
<style>
|
<style>
|
||||||
.leftlabel { width: 10em;}
|
.leftlabel { width: 10em;}
|
||||||
input[type="text"] { width: 18em;}
|
input[type="text"] { width: 18em;}
|
||||||
input.wide {width: 24em;}
|
input.wide {width: 24em;}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@@ -79,9 +72,9 @@
|
|||||||
* Datenbank anlegen
|
* Datenbank anlegen
|
||||||
*
|
*
|
||||||
************************************************** */
|
************************************************** */
|
||||||
|
$boolError=true;
|
||||||
echo "Datenbank anlegen: ";
|
echo "Datenbank anlegen: ";
|
||||||
if (!$boolError && !file_exists("db/locations.db")) {
|
if (!$boolError) {
|
||||||
require("admin/create_database.php");
|
require("admin/create_database.php");
|
||||||
echo "Datenbank angelegt";
|
echo "Datenbank angelegt";
|
||||||
} else {
|
} else {
|
||||||
@@ -108,7 +101,7 @@ require("config.php");
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
<!--
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h3>Dateneingabe aktivieren</h3>
|
<h3>Dateneingabe aktivieren</h3>
|
||||||
@@ -119,7 +112,7 @@ require("config.php");
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
-->
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h3>Konfiguration</h3>
|
<h3>Konfiguration</h3>
|
||||||
@@ -142,35 +135,6 @@ require("config.php");
|
|||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-header">
|
|
||||||
<h3>Karteninfo</h3>
|
|
||||||
</div>
|
|
||||||
<div class="card-body">
|
|
||||||
<h4>Stadt oder Kreis</h4>
|
|
||||||
<label class="leftlabel">Stadt/Kreis: </label>
|
|
||||||
<input type="text" name="district" id="district" value="<?=$strStadt?>" required >
|
|
||||||
<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?>" required><br>
|
|
||||||
<label class="leftlabel">Longitude:</label><input type="text" name="lng" id="lng" value="<?=$numInfoLng?>" required><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?>" required>
|
|
||||||
|
|
||||||
|
|
||||||
<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?>" required>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h3>Anbieterinformation</h3>
|
<h3>Anbieterinformation</h3>
|
||||||
@@ -226,4 +190,3 @@ require("config.php");
|
|||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
* Datum: 18.05.2021
|
* Datum: 18.05.2021
|
||||||
******************************** */
|
******************************** */
|
||||||
|
|
||||||
|
exit();
|
||||||
require("config.db.php");
|
require("config.db.php");
|
||||||
|
|
||||||
$db->query("TRUNCATE config");
|
$db->query("TRUNCATE config");
|
||||||
|
|||||||
61
start.php
Normal file
61
start.php
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
<?php
|
||||||
|
session_start();
|
||||||
|
require("config.php");
|
||||||
|
|
||||||
|
$directory = $_SERVER['REQUEST_URI'];
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="de">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="author" content="Walter Hupfeld, info@hupfeld-software.de">
|
||||||
|
<meta name="description" content="Georeferenzieter Ideenmelder">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="css/bootstrap.min.css" />
|
||||||
|
<link rel="stylesheet" href="css/style.css" />
|
||||||
|
<title><?=$strTitle?></title>
|
||||||
|
<script src="js/jquery.min.js"></script>
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<h1><?=$strTitle?></h1>
|
||||||
|
<div class="jumbotron">
|
||||||
|
<img src="<?=$strLogo?>" />
|
||||||
|
<?=$strIntroText?>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<form method="GET" action="index.php">
|
||||||
|
<select name="d" style="float:left;margin-top:0.5em;margin-right:0.5em;" onchange="this.form.submit()">
|
||||||
|
<?php foreach ($arrDistrict as $key => $strTitle): ?>
|
||||||
|
<option value="<?=$key?>"><?=$strTitle?></option>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</select>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<p style="clear:both";>
|
||||||
|
<h3>Teilnehmende Kreise und kreisfreie Städte</h3>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-4">
|
||||||
|
<?php
|
||||||
|
$i=0;
|
||||||
|
foreach ($arrDistrict as $key => $strTitle):?>
|
||||||
|
<a href="<?php echo "./".$key ?>"><?=$strTitle?></a><br>
|
||||||
|
<?php
|
||||||
|
$i++;
|
||||||
|
if ($i%20==0) echo "</div><div class='col-4'>";
|
||||||
|
endforeach; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
© ADFC NRW
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
BIN
vendor/.DS_Store
vendored
Normal file
BIN
vendor/.DS_Store
vendored
Normal file
Binary file not shown.
Reference in New Issue
Block a user