Compare commits
17 Commits
b746e13d3a
...
ideenmelde
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4a8cef3f8 | ||
|
|
34af6b6f75 | ||
|
|
824aa44fe2 | ||
|
|
bb53850c3e | ||
|
|
7c658e28f9 | ||
|
|
c2f8c93ef3 | ||
|
|
8b6632d36f | ||
|
|
f8b8feee5b | ||
|
|
f695c98fc3 | ||
|
|
29496004dc | ||
|
|
0a7db03af1 | ||
|
|
c1c4151300 | ||
|
|
11575edc75 | ||
|
|
1f44c21d69 | ||
|
|
d918e97203 | ||
|
|
1fec7c7710 | ||
|
|
b8671a54a8 |
@@ -23,6 +23,10 @@ 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.
|
||||||
@@ -32,6 +36,10 @@ Für locationiq.com muss ein Api-Key beantragt werden. Dieser ist in der Datei /
|
|||||||
|
|
||||||
## 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,7 +6,13 @@
|
|||||||
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;
|
||||||
?>
|
?>
|
||||||
@@ -72,7 +78,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-7 col-lg-7">
|
<div class="col-md-7 col-lg-7">
|
||||||
|
|
||||||
|
<?php if ($boolSuperAdmin): ?>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h3>Konfiguration</h3>
|
<h3>Konfiguration</h3>
|
||||||
@@ -130,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,7 +5,6 @@
|
|||||||
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']) {
|
||||||
|
|||||||
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,6 +15,13 @@
|
|||||||
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>
|
||||||
@@ -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);
|
||||||
|
|||||||
@@ -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
|
||||||
******************************** */
|
******************************** */
|
||||||
|
|
||||||
|
|
||||||
@@ -16,17 +17,30 @@
|
|||||||
header("Location: login.php");
|
header("Location: login.php");
|
||||||
}
|
}
|
||||||
$strDistrict=$_SESSION['district'];
|
$strDistrict=$_SESSION['district'];
|
||||||
|
|
||||||
|
|
||||||
|
if (isset($_SESSION['superadmin'])) {
|
||||||
|
$boolSuperAdmin = $_SESSION['superadmin']==true;
|
||||||
|
} else {
|
||||||
|
$boolSuperAdmin=false;
|
||||||
|
}
|
||||||
|
|
||||||
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");
|
||||||
@@ -47,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");
|
||||||
@@ -57,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");
|
||||||
@@ -78,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;
|
||||||
@@ -162,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>
|
||||||
@@ -180,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>";
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ if (isset($_SESSION['district'])) {
|
|||||||
else {
|
else {
|
||||||
$strDistrict="";
|
$strDistrict="";
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once("../config.php");
|
require_once("../config.php");
|
||||||
$boolLogin=true;
|
$boolLogin=true;
|
||||||
|
|
||||||
@@ -25,12 +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";
|
||||||
|
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;
|
||||||
@@ -40,8 +42,6 @@ $boolLogin=true;
|
|||||||
$boolLogin=false;
|
$boolLogin=false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
@@ -57,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="#">ADFC Meldeportal</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>
|
||||||
@@ -84,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>
|
||||||
@@ -107,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");
|
||||||
@@ -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=<?=$mapbox_key?>';
|
||||||
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 ?>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
$dbFilename="../db/locations.db";
|
|
||||||
require ("../config.php");
|
require ("../config.php");
|
||||||
|
|
||||||
if ($boolComment){
|
if ($boolComment){
|
||||||
|
|||||||
@@ -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");
|
||||||
|
|
||||||
|
|||||||
@@ -72,7 +72,10 @@ $result= $db->prepare("SELECT count(*) FROM district WHERE district=:district");
|
|||||||
$result->bindParam(":district",$strDistrict);
|
$result->bindParam(":district",$strDistrict);
|
||||||
$result->execute();
|
$result->execute();
|
||||||
if ($row=$result->fetch(PDO::FETCH_NUM)) {
|
if ($row=$result->fetch(PDO::FETCH_NUM)) {
|
||||||
if ($row[0]==0) $strDistrict=""; //default setzten
|
if ($row[0]==0) {
|
||||||
|
$strDistrict="unkown"; //default setzten
|
||||||
|
$strDistrictTitle="Unbekannt";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Spezifische Konfiguration für Districtt
|
// Spezifische Konfiguration für Districtt
|
||||||
|
|||||||
@@ -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,15 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
if (isset($_SESSION['district']))
|
if (!isset($_SESSION['district'])) { header("Location: start.php");}
|
||||||
{
|
$strDistrict=$_SESSION['district'];
|
||||||
$strDistrict=$_SESSION['district'];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
header("Location: start.php");
|
|
||||||
}
|
|
||||||
echo $strDistrict;
|
|
||||||
require("config.php");
|
require("config.php");
|
||||||
|
if ($strDistict=="unkown") { header("Location: start.php");}
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
|
|||||||
@@ -1,29 +1,29 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
dev-unfallkarte:
|
dev-ideenmelder:
|
||||||
image: php81:v1
|
image: php81:v1
|
||||||
container_name: dev-unfallkarte
|
container_name: dev-ideenmelder
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/var/www/html
|
- ./:/var/www/html
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.dev-unfallkarte.entrypoints=https"
|
- "traefik.http.routers.dev-ideenmelder.entrypoints=https"
|
||||||
- "traefik.http.routers.dev-unfallkarte.rule=Host(`unfallkarte.hpadm.de`)"
|
- "traefik.http.routers.dev-ideenmelder.rule=Host(`nrw-ideenmelder.hpadm.de`)"
|
||||||
- "traefik.http.routers.dev-unfallkarte.tls=true"
|
- "traefik.http.routers.dev-ideenmelder.tls=true"
|
||||||
- "traefik.http.routers.dev-unfallkarte.tls.certresolver=http"
|
- "traefik.http.routers.dev-ideenmelder.tls.certresolver=http"
|
||||||
- "traefik.http.routers.dev-unfallkarte.middlewares=default@file"
|
- "traefik.http.routers.dev-ideenmelder.middlewares=default@file"
|
||||||
- "traefik.http.routers.dev-unfallkarte.service=dev-unfallkarte"
|
- "traefik.http.routers.dev-ideenmelder.service=dev-ideenmelder"
|
||||||
- "traefik.http.services.dev-unfallkarte.loadbalancer.server.port=80"
|
- "traefik.http.services.dev-ideenmelder.loadbalancer.server.port=80"
|
||||||
- "traefik.docker.network=proxy"
|
- "traefik.docker.network=proxy"
|
||||||
networks:
|
networks:
|
||||||
- default
|
- default
|
||||||
- proxy
|
- proxy
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
dev-unfallkarte-db:
|
dev-ideenmelder-db:
|
||||||
image: mariadb
|
image: mariadb
|
||||||
container_name: dev-unfallkarte-db
|
container_name: dev-ideenmelder-db
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=geheim #SQL root Passwort eingeben
|
- MYSQL_ROOT_PASSWORD=geheim #SQL root Passwort eingeben
|
||||||
|
|||||||
@@ -1,15 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
session_start();
|
if (!isset($_SESSION['district'])) { header("Location: start.php");}
|
||||||
if (isset($_SESSION['district']))
|
$strDistrict=$_SESSION['district'];
|
||||||
{
|
|
||||||
$strDistrict=$_SESSION['district'];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
header("Location: start.php");
|
|
||||||
}
|
|
||||||
echo $strDistrict;
|
|
||||||
require("config.php");
|
require("config.php");
|
||||||
|
if ($strDistict=="unkown") { header("Location: start.php");}
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
|
|||||||
31
index.php
31
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,11 +7,6 @@
|
|||||||
* Datum: 16.02.2024
|
* Datum: 16.02.2024
|
||||||
******************************** */
|
******************************** */
|
||||||
|
|
||||||
/*
|
|
||||||
if (!file_exists("db/locations.db")) {
|
|
||||||
header("Location: setup.php");
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
// Starte die Session
|
// Starte die Session
|
||||||
session_start();
|
session_start();
|
||||||
if (isset($_GET['d'])) {
|
if (isset($_GET['d'])) {
|
||||||
@@ -24,8 +18,8 @@
|
|||||||
else {
|
else {
|
||||||
header("Location: start.php");
|
header("Location: start.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));
|
||||||
@@ -33,17 +27,16 @@
|
|||||||
$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");
|
||||||
WHERE loc.district='$strDistrict'";
|
$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;
|
$id=0;
|
||||||
@@ -91,7 +84,7 @@
|
|||||||
<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>
|
||||||
@@ -134,7 +127,7 @@
|
|||||||
<a class="nav-link" href="datenschutz.php">Datenschutzerklärung</a>
|
<a class="nav-link" href="datenschutz.php">Datenschutzerklärung</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="admin/login.php?d=".$strDistrict>Login</a>
|
<a class="nav-link" href="admin/login.php">Login</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -144,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) {
|
||||||
@@ -179,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 ?>);
|
||||||
@@ -491,7 +481,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -109,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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
19
liste.php
19
liste.php
@@ -8,19 +8,12 @@
|
|||||||
* Datum: 18.05.2021
|
* Datum: 18.05.2021
|
||||||
******************************** */
|
******************************** */
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
if (isset($_GET['d'])) {
|
if (!isset($_SESSION['district'])) { header("Location: start.php");}
|
||||||
$strDistrict=$_GET['d'];
|
$strDistrict=$_SESSION['district'];
|
||||||
$_SESSION['district'] = $strDistrict;
|
require("config.php");
|
||||||
} else if (isset($_SESSION['district']))
|
if ($strDistrict=="unkown") { header("Location: start.php");}
|
||||||
{
|
?>
|
||||||
$strDistrict=$_SESSION['district'];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
header("Location: start.php");
|
|
||||||
}
|
|
||||||
echo $strDistrict;
|
|
||||||
require("config.php");
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
FROM php:8.1-apache
|
FROM php:8.1-apache
|
||||||
RUN apt-get update && docker-php-ext-install pdo_mysql calendar mysqli
|
RUN apt-get update && docker-php-ext-install pdo_mysql calendar mysqli zip
|
||||||
|
|
||||||
RUN a2enmod rewrite headers
|
RUN a2enmod rewrite headers
|
||||||
|
|
||||||
|
|||||||
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");
|
||||||
|
|||||||
24
start.php
24
start.php
@@ -14,17 +14,8 @@
|
|||||||
|
|
||||||
<link rel="stylesheet" href="css/bootstrap.min.css" />
|
<link rel="stylesheet" href="css/bootstrap.min.css" />
|
||||||
<link rel="stylesheet" href="css/style.css" />
|
<link rel="stylesheet" href="css/style.css" />
|
||||||
<link rel="stylesheet" href="vendor/DataTables/datatable.min.css">
|
|
||||||
<link rel="stylesheet" href="vendor/DataTables/DataTables-1.10.21/css/dataTables.bootstrap4.min.css">
|
|
||||||
|
|
||||||
|
|
||||||
<title><?=$strTitle?></title>
|
<title><?=$strTitle?></title>
|
||||||
<script src="js/jquery.min.js"></script>
|
<script src="js/jquery.min.js"></script>
|
||||||
<script src="vendor/DataTables/datatables.js"></script>
|
|
||||||
<script src="vendor/DataTables/DataTables-1.10.21/js/dataTables.bootstrap4.min.js"></script>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@@ -47,13 +38,22 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<p style="clear:both";>
|
<p style="clear:both";>
|
||||||
<h3>Kreise und kreisfreie Städte</h3>
|
<h3>Teilnehmende Kreise und kreisfreie Städte</h3>
|
||||||
<div>
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-4">
|
||||||
<?php
|
<?php
|
||||||
|
$i=0;
|
||||||
foreach ($arrDistrict as $key => $strTitle):?>
|
foreach ($arrDistrict as $key => $strTitle):?>
|
||||||
<a href="<?php echo "./".$key ?>"><?=$strTitle?></a><br>
|
<a href="<?php echo "./".$key ?>"><?=$strTitle?></a><br>
|
||||||
<?php endforeach; ?>
|
<?php
|
||||||
|
$i++;
|
||||||
|
if ($i%20==0) echo "</div><div class='col-4'>";
|
||||||
|
endforeach; ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<hr>
|
||||||
|
© ADFC NRW
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user