districts
This commit is contained in:
25
index.php
25
index.php
@@ -8,10 +8,14 @@
|
||||
* Datum: 16.02.2024
|
||||
******************************** */
|
||||
|
||||
|
||||
/*
|
||||
if (!file_exists("db/locations.db")) {
|
||||
header("Location: setup.php");
|
||||
}
|
||||
*/
|
||||
|
||||
$strDistrict = (isset($_GET['d'])) ? $_GET['d'] : "hamm";
|
||||
|
||||
require("config.db.php");
|
||||
require("config.php");
|
||||
require_once("lib/functions.php");
|
||||
@@ -92,12 +96,22 @@
|
||||
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="index.php?ref=1">Karte <span class="sr-only">(current)</span></a>
|
||||
<a class="nav-link" href="index.php?ref=1?d=<?=$strDistrict?>">Karte <span class="sr-only">(current)</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="liste.php">Liste</a>
|
||||
<a class="nav-link" href="liste.php?d=<?=$strDistrict?>">Liste</a>
|
||||
</li>
|
||||
<!-- District -->
|
||||
<form method="GET" action="index.php">
|
||||
<select name="d" style="float:left;margin-top:0.5em;margin-right:0.5em;" onchange="this.form.submit()">
|
||||
<?php foreach ($arrDistrict as $key => $strTitle):
|
||||
$strActive = ($strDistrict==$key) ? "selected=\"selected\"" : ""; ?>
|
||||
<option value="<?=$key?>" <?=$strActive?>><?=$strTitle?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</form>
|
||||
</ul>
|
||||
|
||||
|
||||
<div>
|
||||
<ul class="navbar-nav mr-auto right">
|
||||
@@ -108,7 +122,7 @@
|
||||
<a class="nav-link" href="datenschutz.php">Datenschutzerklärung</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="admin/login.php">Login</a>
|
||||
<a class="nav-link" href="admin/login.php?d=".$strDistrict>Login</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -163,7 +177,7 @@
|
||||
// ocmlink = '<a href="http://thunderforest.com/">Thunderforest</a>';
|
||||
var ocmLink = '<a href="https://www.mapbox.com/">Mapbox</a>';
|
||||
|
||||
L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token='.$mapbox_key, {
|
||||
L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=<?=$mapbox_key?>', {
|
||||
maxZoom: 18,
|
||||
minZoom:<?=$numZoom ?>,
|
||||
attribution: 'Map data © '+ mapLink +' contributors, ' +
|
||||
@@ -301,6 +315,7 @@
|
||||
$("#newobjectform").submit(function(event){
|
||||
$("#lat").val(lat);
|
||||
$("#lng").val(lng);
|
||||
$("#district").val("<?=$strDistrict?>");
|
||||
topic=$('input[name=topic]:checked').val();
|
||||
newMarker = getMarker(topic);
|
||||
event.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user