active districts
This commit is contained in:
parent
039687e523
commit
71d2786a97
@ -72,18 +72,6 @@
|
||||
<div class="row">
|
||||
<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-header">
|
||||
@ -108,30 +96,6 @@
|
||||
<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-header">
|
||||
<h3>Anbieterinformation</h3>
|
||||
|
@ -11,7 +11,6 @@
|
||||
if($_POST['csrf'] !== $_SESSION['csrf_token']) {
|
||||
die("Ungültiger Token");
|
||||
}
|
||||
$boolActive = (isset($_POST['active'])) ? "1" : "0";
|
||||
$boolRating = (isset($_POST['rating'])) ? "1" : "0";
|
||||
$boolComment = (isset($_POST['comment'])) ? "1" : "0";
|
||||
$boolUpload = (isset($_POST['fileupload'])) ? "1" : "0";
|
||||
@ -20,12 +19,7 @@
|
||||
|
||||
|
||||
$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'];
|
||||
@ -36,26 +30,19 @@
|
||||
$strImpressum=addslashes($strImpressum);
|
||||
$strIntroText=addslashes($strIntroText);
|
||||
|
||||
$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'");
|
||||
$db->query("UPDATE `config` SET `value`= '$strUploaddir' WHERE `key`='uploaddir'");
|
||||
$db->query("UPDATE `config` SET `value`= '$strTitle' WHERE `key`='title'");
|
||||
$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`= '$strUrlBez' WHERE `key`='UrlBez'");
|
||||
$db->query("UPDATE `config` SET `value`= '$strUrl' WHERE `key`='url'");
|
||||
$db->query("UPDATE `config` SET `value`= '$strIntroText' WHERE `key`='IntroText'");
|
||||
$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");
|
||||
|
||||
|
@ -126,7 +126,7 @@
|
||||
|
||||
<!-- Navbar -->
|
||||
<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">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
@ -51,7 +51,7 @@ $boolLogin=true;
|
||||
|
||||
<!-- Navbar -->
|
||||
<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">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
10
config.php
10
config.php
@ -49,9 +49,6 @@
|
||||
case "UrlBez":
|
||||
$strUrlBez =$row['value'];
|
||||
break;
|
||||
case "boolActive":
|
||||
$boolActive = ($row['value']=="1");
|
||||
break;
|
||||
case "boolRating":
|
||||
$boolRating = ($row['value']=="1");
|
||||
break;
|
||||
@ -90,6 +87,8 @@
|
||||
$result->bindParam(":district",$strDistrict);
|
||||
$result->execute();
|
||||
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
$boolActive = $row['active']==1;
|
||||
$strDistrict = $row['district'];
|
||||
$strTitle = $row['title'];
|
||||
$strGeojson = $row['geojson'];
|
||||
@ -104,8 +103,7 @@
|
||||
$numZoom=$row['zoom'];
|
||||
|
||||
$strTitle = "ADFC Meldeportal $strTitle ";
|
||||
$strIntroText = "$strTitle";
|
||||
|
||||
$strIntroText = ($boolActive) ? $strIntroText = "$strTitle" : "Dateneingabe nicht möglich";
|
||||
$fileGeojson ="geojson/$strGeojson";
|
||||
$strLocation = " AND ULAND=$numULAND AND UREGBEZ=$numUREGBEZ AND UKREIS=$numUKREIS ";
|
||||
if ($numUGEMEINDE>0) {
|
||||
@ -115,7 +113,7 @@
|
||||
|
||||
// Arrax mit allen Distrikten für Auswahl
|
||||
$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);
|
||||
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||
$arrDistrict[$row['district']]=$row['title'];
|
||||
|
Loading…
Reference in New Issue
Block a user