2024-02-16 15:35:01 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/** *****************************
|
|
|
|
* Ideenmelder
|
|
|
|
* Autor: Walter Hupfeld, Hamm
|
|
|
|
* E-Mail: info@hupfeld-software.de
|
2024-02-18 16:01:36 +01:00
|
|
|
* Version: 1.1
|
|
|
|
* Datum: 18.02.2024
|
2024-02-20 22:18:50 +01:00
|
|
|
* zuletzt bearbeitet: 20.02.2024
|
2024-02-16 15:35:01 +01:00
|
|
|
******************************** */
|
|
|
|
|
2024-02-18 19:16:48 +01:00
|
|
|
require_once("config.db.php");
|
2024-02-16 15:35:01 +01:00
|
|
|
|
2024-02-18 19:16:48 +01:00
|
|
|
$strSQL = "select * from config";
|
|
|
|
$result = $db->query($strSQL);
|
2024-02-16 15:35:01 +01:00
|
|
|
|
2024-02-18 19:16:48 +01:00
|
|
|
// Allegemeine Konfiguration
|
|
|
|
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
|
|
|
switch ($row['key']) {
|
|
|
|
case "uploaddir" :
|
|
|
|
$uploaddir=$row['value'];
|
|
|
|
break;
|
|
|
|
case "stadt" :
|
|
|
|
$strStadt=$row['value'];
|
|
|
|
break;
|
|
|
|
case "title" :
|
|
|
|
$strTitle=$row['value'];
|
|
|
|
break;
|
|
|
|
case "fileGeojson":
|
|
|
|
$fileGeojson=$row['value'];
|
|
|
|
break;
|
|
|
|
case "InfoLat":
|
|
|
|
$numInfoLat=$row['value'];
|
|
|
|
break;
|
|
|
|
case "InfoLng":
|
|
|
|
$numInfoLng=$row['value'];
|
|
|
|
break;
|
|
|
|
case "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;
|
2024-02-16 15:35:01 +01:00
|
|
|
|
2024-02-18 19:16:48 +01:00
|
|
|
default: ;
|
|
|
|
//echo "Fehler bei ".$row['key'];
|
|
|
|
// Ende Lokalisierung
|
|
|
|
break;
|
2024-02-16 15:35:01 +01:00
|
|
|
}
|
2024-02-18 19:16:48 +01:00
|
|
|
|
|
|
|
}
|
2024-02-16 15:35:01 +01:00
|
|
|
|
2024-02-18 19:16:48 +01:00
|
|
|
// 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)) {
|
2024-02-20 22:18:50 +01:00
|
|
|
if ($row[0]==0) $strDistrict=""; //default setzten
|
2024-02-18 19:16:48 +01:00
|
|
|
}
|
2024-02-18 13:37:18 +01:00
|
|
|
|
2024-02-18 19:46:30 +01:00
|
|
|
// 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)) {
|
2024-02-18 13:37:18 +01:00
|
|
|
|
2024-02-18 19:46:30 +01:00
|
|
|
$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";
|
2024-02-18 13:37:18 +01:00
|
|
|
}
|
2024-02-18 19:46:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// 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'];
|
|
|
|
}
|
2024-02-16 15:35:01 +01:00
|
|
|
|
|
|
|
|
2024-02-18 16:01:36 +01:00
|
|
|
|
|
|
|
|
2024-02-16 15:35:01 +01:00
|
|
|
$arrTopic = array (
|
|
|
|
2 => "Radverkehr",
|
|
|
|
1 => "Fußverkehr",
|
|
|
|
3 => "Bus und Bahn",
|
|
|
|
// 4 => "Pkw-Verkehr",
|
|
|
|
// 5 => "Lkw-Verkehr"
|
|
|
|
);
|
|
|
|
|
|
|
|
$arrMarkerType = array (
|
|
|
|
1=>"pedestrianMarker",
|
|
|
|
2=>"bicycleMarker",
|
|
|
|
3=>"trainMarker",
|
|
|
|
4=>"carMarker",
|
|
|
|
5=>"truckMarker",
|
|
|
|
);
|
|
|
|
|
2024-02-18 19:46:30 +01:00
|
|
|
$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>"
|
|
|
|
);
|
|
|
|
|
2024-02-16 15:35:01 +01:00
|
|
|
$arrAge = array (
|
|
|
|
1 => "keine Angabe",
|
|
|
|
2 => "bis 14 Jahre",
|
|
|
|
3 => "15-17 Jahre",
|
|
|
|
4 => "18-25 Jahre",
|
|
|
|
5 => "25-39 Jahre",
|
|
|
|
6 => "40-64 Jahre",
|
|
|
|
7 => "65 Jahre und älter",
|
|
|
|
);
|
|
|
|
|
|
|
|
$arrDefect = array (
|
|
|
|
0 => "Keine Angabe",
|
|
|
|
1 => "Abrupt endender Radweg",
|
|
|
|
2 => "Buckelpiste",
|
|
|
|
3 => "Gefährliche Gleise/Schienen",
|
|
|
|
4 => "Gehweg/Fahrräder frei",
|
|
|
|
5 => "Falschparker",
|
|
|
|
6 => "Fehlende Abstellmöglichkeiten",
|
|
|
|
7 => "Fehlende Radwege",
|
|
|
|
8 => "Fehlender Abstellbereich",
|
|
|
|
9 => "Fehlender taktiler Sicherheitstrennstreifen",
|
|
|
|
10 => "Fehlende Fahrbahnüberleitung",
|
|
|
|
11 => "Hindernisse auf Radwegen",
|
|
|
|
12 => "Mangelhafte Radwegmarkierung/kennzeichnung",
|
|
|
|
13 => "Mögliche grüne Pfeile für Radfahrende",
|
|
|
|
14 => "Probleme beim Abbiegen",
|
|
|
|
15 => "Ungenügende Ampelschaltung",
|
|
|
|
16 => "Ungenügende Bordsteinabsenkung",
|
|
|
|
17 => "Ungenügender Sicherheitsabstand",
|
|
|
|
18 => "Ungenügende Wegbreite/Engstellen",
|
|
|
|
19 => "Unsichere/fehlende Querungsmöglichkeit",
|
|
|
|
20 => "Unklare Radwegsituation",
|
|
|
|
21 => "Station für Leihräder",
|
|
|
|
22 => "Ampelspiegel installieren"
|
|
|
|
);
|
|
|
|
|
|
|
|
$arrTransport = array (
|
|
|
|
0 => "keine Angabe",
|
|
|
|
1 => "kein Auto",
|
|
|
|
2 => "Auto",
|
|
|
|
3 => "Motorroller/Motorrad",
|
|
|
|
4 => "Bus/Bahn",
|
|
|
|
5 => "Fahrrad",
|
|
|
|
6 => "Zu Fuß"
|
|
|
|
);
|
|
|
|
|