session
This commit is contained in:
parent
b8671a54a8
commit
1fec7c7710
@ -74,7 +74,10 @@ $result= $db->prepare("SELECT count(*) FROM district WHERE district=:district");
|
|||||||
$result->bindParam(":district",$strDistrict);
|
$result->bindParam(":district",$strDistrict);
|
||||||
$result->execute();
|
$result->execute();
|
||||||
if ($row=$result->fetch(PDO::FETCH_NUM)) {
|
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
|
// Spezifische Konfiguration für Districtt
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
session_start();
|
|
||||||
if (isset($_SESSION['district']))
|
if (isset($_SESSION['district']))
|
||||||
{
|
{
|
||||||
$strDistrict=$_SESSION['district'];
|
$strDistrict=$_SESSION['district'];
|
||||||
@ -8,7 +7,6 @@
|
|||||||
else {
|
else {
|
||||||
header("Location: start.php");
|
header("Location: start.php");
|
||||||
}
|
}
|
||||||
echo $strDistrict;
|
|
||||||
require("config.php");
|
require("config.php");
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
10
index.php
10
index.php
@ -8,11 +8,6 @@
|
|||||||
* Datum: 16.02.2024
|
* Datum: 16.02.2024
|
||||||
******************************** */
|
******************************** */
|
||||||
|
|
||||||
/*
|
|
||||||
if (!file_exists("db/locations.db")) {
|
|
||||||
header("Location: setup.php");
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
// Starte die Session
|
// Starte die Session
|
||||||
session_start();
|
session_start();
|
||||||
if (isset($_GET['d'])) {
|
if (isset($_GET['d'])) {
|
||||||
@ -24,7 +19,7 @@
|
|||||||
else {
|
else {
|
||||||
header("Location: start.php");
|
header("Location: start.php");
|
||||||
}
|
}
|
||||||
|
session_write_close();
|
||||||
require("config.php");
|
require("config.php");
|
||||||
require_once("lib/functions.php");
|
require_once("lib/functions.php");
|
||||||
|
|
||||||
@ -134,7 +129,7 @@
|
|||||||
<a class="nav-link" href="datenschutz.php">Datenschutzerklärung</a>
|
<a class="nav-link" href="datenschutz.php">Datenschutzerklärung</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<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>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -148,6 +143,7 @@
|
|||||||
<nav class="col-md-2 d-none d-md-block bg-light sidebar">
|
<nav class="col-md-2 d-none d-md-block bg-light sidebar">
|
||||||
<div class="sidebar-sticky">
|
<div class="sidebar-sticky">
|
||||||
<img class="logo" src="<?=$strLogo?>" alt="Logo" >
|
<img class="logo" src="<?=$strLogo?>" alt="Logo" >
|
||||||
|
<?php print_r($_SESSION);?>
|
||||||
<ul class="nav flex-column">
|
<ul class="nav flex-column">
|
||||||
<?php
|
<?php
|
||||||
foreach ($arrTopic as $key=>$topic) {
|
foreach ($arrTopic as $key=>$topic) {
|
||||||
|
@ -14,17 +14,11 @@
|
|||||||
|
|
||||||
<link rel="stylesheet" href="css/bootstrap.min.css" />
|
<link rel="stylesheet" href="css/bootstrap.min.css" />
|
||||||
<link rel="stylesheet" href="css/style.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>
|
<title><?=$strTitle?></title>
|
||||||
<script src="js/jquery.min.js"></script>
|
<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>
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user