This commit is contained in:
Walter Hupfeld 2024-06-04 17:41:28 +02:00
parent 5dd6286ee9
commit d4a4b04d71
4 changed files with 390 additions and 390 deletions

View File

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

View File

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

View File

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

390
sql/nrw_melder.sql Normal file
View File

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