unkown district

This commit is contained in:
Walter Hupfeld 2024-02-22 10:33:50 +01:00
parent c1c4151300
commit 0a7db03af1
5 changed files with 18 additions and 54 deletions

View File

@ -15,23 +15,7 @@
include("../config.php");
$sqlDistrict = ($boolSuperAdmin) ? "1" : "l.district='$strDistrict'";
/*
$arrTopic = array (
1 => "Fußverkehr",
2 => "Radverkehr",
3 => "Bus und Bahn",
4 => "Pkw-Verkehr",
5 => "Lkw-Verkehr"
);
$arrIcon = array (
1 => "<i class='fa fa-male'></i>",
2 => "<i class='fa fa-bicycle'></i>",
3 => "<i class='fa fa-train'></i>",
4 => "<i class='fa fa-car'></i>",
5 => "<i class='fa fa-truck'></i>"
);
*/
?>
<!DOCTYPE html>
<html lang="de">
@ -55,12 +39,11 @@
<body>
<div class="container-fluid">
<table class="table table-bordered table-striped">
<thead>
<tr><th>id</th><th>Username</th>
<tr><th>id</th>
<th>Username</th>
<?= ($boolUserinfo) ? "<th>Alter</th><th>Transport</th>" : ""; ?>
<th>Topic</th>
<th>Beschreibung</th>
@ -122,7 +105,6 @@
$strScript.="var mymap_".$id." = L.map(map_".$id.").setView([".$row['lat'].", ".$row['lng']."], 16);\n";
$strScript.="L.tileLayer(url, {maxZoom: 18,minZoom:12,attribution: attribution,id: 'mapbox/streets-v11',tileSize: 512,zoomOffset: -1}).addTo(mymap_".$id.")\n";
$strScript.="L.marker([".$row['lat'].", ".$row['lng']."], { icon: infoMarker } ).addTo(mymap_".$id.")\n\n";
}
?>
</tbody>
@ -130,10 +112,9 @@
<a class="btn btn-primary" href="../index.php?ref=1">zurück</a>
</div>
</body>
<script>
$( document ).ready(function() {
var url = 'https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=<?=$mapbox_key?>';
var attribution = 'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, ' +
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +

View File

@ -73,7 +73,7 @@ $result->bindParam(":district",$strDistrict);
$result->execute();
if ($row=$result->fetch(PDO::FETCH_NUM)) {
if ($row[0]==0) {
$strDistrict=""; //default setzten
$strDistrict="unkown"; //default setzten
$strDistrictTitle="Unbekannt";
}
}

View File

@ -1,15 +1,9 @@
<?php
session_start();
if (isset($_SESSION['district']))
{
$strDistrict=$_SESSION['district'];
}
else {
header("Location: start.php");
}
echo $strDistrict;
if (!isset($_SESSION['district'])) { header("Location: start.php");}
$strDistrict=$_SESSION['district'];
require("config.php");
if ($strDistict=="unkown") { header("Location: start.php");}
?>
<!DOCTYPE html>
<html lang="de">

View File

@ -1,13 +1,9 @@
<?php
session_start();
if (isset($_SESSION['district']))
{
$strDistrict=$_SESSION['district'];
}
else {
header("Location: start.php");
}
if (!isset($_SESSION['district'])) { header("Location: start.php");}
$strDistrict=$_SESSION['district'];
require("config.php");
if ($strDistict=="unkown") { header("Location: start.php");}
?>
<!DOCTYPE html>
<html lang="de">

View File

@ -8,19 +8,12 @@
* Datum: 18.05.2021
******************************** */
session_start();
if (isset($_GET['d'])) {
$strDistrict=$_GET['d'];
$_SESSION['district'] = $strDistrict;
} else if (isset($_SESSION['district']))
{
$strDistrict=$_SESSION['district'];
}
else {
header("Location: start.php");
}
echo $strDistrict;
require("config.php");
session_start();
if (!isset($_SESSION['district'])) { header("Location: start.php");}
$strDistrict=$_SESSION['district'];
require("config.php");
if ($strDistict=="unkown") { header("Location: start.php");}
?>
?>
<!DOCTYPE html>
<html lang="de">