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->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
|
||||
|
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
session_start();
|
||||
session_start();
|
||||
if (isset($_SESSION['district']))
|
||||
{
|
||||
@ -8,7 +7,6 @@
|
||||
else {
|
||||
header("Location: start.php");
|
||||
}
|
||||
echo $strDistrict;
|
||||
require("config.php");
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
|
10
index.php
10
index.php
@ -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) {
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user