active districts
This commit is contained in:
parent
039687e523
commit
71d2786a97
@ -72,18 +72,6 @@
|
|||||||
<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">
|
|
||||||
<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">
|
||||||
@ -108,30 +96,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>
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
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";
|
||||||
@ -20,12 +19,7 @@
|
|||||||
|
|
||||||
|
|
||||||
$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,26 +30,19 @@
|
|||||||
$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= '$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");
|
||||||
|
|
||||||
|
@ -126,7 +126,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 NRW Meldeportal</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>
|
||||||
|
@ -51,7 +51,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="#">ADFC Meldeportal</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>
|
||||||
|
10
config.php
10
config.php
@ -49,9 +49,6 @@
|
|||||||
case "UrlBez":
|
case "UrlBez":
|
||||||
$strUrlBez =$row['value'];
|
$strUrlBez =$row['value'];
|
||||||
break;
|
break;
|
||||||
case "boolActive":
|
|
||||||
$boolActive = ($row['value']=="1");
|
|
||||||
break;
|
|
||||||
case "boolRating":
|
case "boolRating":
|
||||||
$boolRating = ($row['value']=="1");
|
$boolRating = ($row['value']=="1");
|
||||||
break;
|
break;
|
||||||
@ -90,6 +87,8 @@
|
|||||||
$result->bindParam(":district",$strDistrict);
|
$result->bindParam(":district",$strDistrict);
|
||||||
$result->execute();
|
$result->execute();
|
||||||
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||||
|
|
||||||
|
$boolActive = $row['active']==1;
|
||||||
$strDistrict = $row['district'];
|
$strDistrict = $row['district'];
|
||||||
$strTitle = $row['title'];
|
$strTitle = $row['title'];
|
||||||
$strGeojson = $row['geojson'];
|
$strGeojson = $row['geojson'];
|
||||||
@ -104,8 +103,7 @@
|
|||||||
$numZoom=$row['zoom'];
|
$numZoom=$row['zoom'];
|
||||||
|
|
||||||
$strTitle = "ADFC Meldeportal $strTitle ";
|
$strTitle = "ADFC Meldeportal $strTitle ";
|
||||||
$strIntroText = "$strTitle";
|
$strIntroText = ($boolActive) ? $strIntroText = "$strTitle" : "Dateneingabe nicht möglich";
|
||||||
|
|
||||||
$fileGeojson ="geojson/$strGeojson";
|
$fileGeojson ="geojson/$strGeojson";
|
||||||
$strLocation = " AND ULAND=$numULAND AND UREGBEZ=$numUREGBEZ AND UKREIS=$numUKREIS ";
|
$strLocation = " AND ULAND=$numULAND AND UREGBEZ=$numUREGBEZ AND UKREIS=$numUKREIS ";
|
||||||
if ($numUGEMEINDE>0) {
|
if ($numUGEMEINDE>0) {
|
||||||
@ -115,7 +113,7 @@
|
|||||||
|
|
||||||
// Arrax mit allen Distrikten für Auswahl
|
// Arrax mit allen Distrikten für Auswahl
|
||||||
$arrDisctrict = array ();
|
$arrDisctrict = array ();
|
||||||
$strSQL = "SELECT district,title FROM district ORDER BY title ASC";
|
$strSQL = "SELECT district,title FROM district WHERE active=1 ORDER BY title ASC";
|
||||||
$result=$db->query($strSQL);
|
$result=$db->query($strSQL);
|
||||||
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||||
$arrDistrict[$row['district']]=$row['title'];
|
$arrDistrict[$row['district']]=$row['title'];
|
||||||
|
Loading…
Reference in New Issue
Block a user