This commit is contained in:
Walter Hupfeld 2024-02-21 11:35:21 +01:00
parent b8671a54a8
commit 1fec7c7710
4 changed files with 8 additions and 17 deletions

View File

@ -74,7 +74,10 @@ $result= $db->prepare("SELECT count(*) FROM district WHERE district=:district");
$result->bindParam(":district",$strDistrict);
$result->execute();
if ($row=$result->fetch(PDO::FETCH_NUM)) {
if ($row[0]==0) $strDistrict=""; //default setzten
if ($row[0]==0) {
$strDistrict=""; //default setzten
$strDistrictTitle="Unbekannt";
}
}
// Spezifische Konfiguration für Districtt

View File

@ -1,6 +1,5 @@
<?php
session_start();
session_start();
if (isset($_SESSION['district']))
{
$strDistrict=$_SESSION['district'];
@ -8,7 +7,6 @@
else {
header("Location: start.php");
}
echo $strDistrict;
require("config.php");
?>
<!DOCTYPE html>

View File

@ -8,11 +8,6 @@
* Datum: 16.02.2024
******************************** */
/*
if (!file_exists("db/locations.db")) {
header("Location: setup.php");
}
*/
// Starte die Session
session_start();
if (isset($_GET['d'])) {
@ -24,7 +19,7 @@
else {
header("Location: start.php");
}
session_write_close();
require("config.php");
require_once("lib/functions.php");
@ -134,7 +129,7 @@
<a class="nav-link" href="datenschutz.php">Datenschutzerklärung</a>
</li>
<li class="nav-item">
<a class="nav-link" href="admin/login.php?d=".$strDistrict>Login</a>
<a class="nav-link" href="admin/login.php">Login</a>
</li>
</ul>
</div>
@ -148,6 +143,7 @@
<nav class="col-md-2 d-none d-md-block bg-light sidebar">
<div class="sidebar-sticky">
<img class="logo" src="<?=$strLogo?>" alt="Logo" >
<?php print_r($_SESSION);?>
<ul class="nav flex-column">
<?php
foreach ($arrTopic as $key=>$topic) {

View File

@ -14,17 +14,11 @@
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="vendor/DataTables/datatable.min.css">
<link rel="stylesheet" href="vendor/DataTables/DataTables-1.10.21/css/dataTables.bootstrap4.min.css">
<title><?=$strTitle?></title>
<script src="js/jquery.min.js"></script>
<script src="vendor/DataTables/datatables.js"></script>
<script src="vendor/DataTables/DataTables-1.10.21/js/dataTables.bootstrap4.min.js"></script>
<style>
</style>