session cookie
This commit is contained in:
parent
85ee0fe91b
commit
527308b201
15
index.php
15
index.php
@ -13,15 +13,18 @@
|
||||
header("Location: setup.php");
|
||||
}
|
||||
*/
|
||||
|
||||
// Starte die Session
|
||||
session_start();
|
||||
if (isset($_GET['d'])) {
|
||||
$strDistrict=$_GET['d'];
|
||||
} else {
|
||||
$_SESSION['district'] = $_GET['d'];
|
||||
} else if (isset($_SESSION['district'])) {
|
||||
$strDistrict=$_SESSION['district'];
|
||||
}
|
||||
else {
|
||||
header("Location: start.php");
|
||||
}
|
||||
|
||||
|
||||
require("config.db.php");
|
||||
require("config.php");
|
||||
require_once("lib/functions.php");
|
||||
|
||||
@ -103,10 +106,10 @@
|
||||
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="index.php?ref=1?d=<?=$strDistrict?>">Karte <span class="sr-only">(current)</span></a>
|
||||
<a class="nav-link" href="index.php?ref=1">Karte <span class="sr-only">(current)</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="liste.php?d=<?=$strDistrict?>">Liste</a>
|
||||
<a class="nav-link" href="liste.php">Liste</a>
|
||||
</li>
|
||||
<!-- District -->
|
||||
<form method="GET" action="index.php">
|
||||
|
17
liste.php
17
liste.php
@ -9,11 +9,16 @@
|
||||
******************************** */
|
||||
|
||||
|
||||
if (!file_exists("config.db.php")) {
|
||||
header("Location: setup.php");
|
||||
session_start();
|
||||
if (isset($_GET['d'])) {
|
||||
$strDistrict=$_GET['d'];
|
||||
$_SESSION['district'] = $_GET['d'];
|
||||
} else if (isset($_SESSION['district'])) {
|
||||
$strDistrict=$_SESSION['district'];
|
||||
}
|
||||
else {
|
||||
header("Location: start.php");
|
||||
}
|
||||
|
||||
$strDistrict = (isset($_GET['d'])) ? $_GET['d'] : "hamm";
|
||||
require("config.php");
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
@ -61,10 +66,10 @@
|
||||
<div class="collapse navbar-collapse" id="navbars">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="index.php?ref=1&d=<?=$strDistrict?>">Karte</a>
|
||||
<a class="nav-link" href="index.php?ref=1">Karte</a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="liste.php?d=<?=$strDistrict?>">Liste <span class="sr-only">(current)</span></a>
|
||||
<a class="nav-link" href="liste.php">Liste <span class="s"r-only">(current)</span></a>
|
||||
</li>
|
||||
<!-- District -->
|
||||
<form method="GET" action="index.php">
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
require_once("config.db.php");
|
||||
|
||||
require("config.php");
|
||||
|
||||
$directory = $_SERVER['REQUEST_URI'];
|
||||
@ -30,8 +30,13 @@
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1><?=$strTitle?></h1>
|
||||
|
||||
<div class="container">
|
||||
<h1><?=$strTitle?></h1>
|
||||
<div class="jumbotron">
|
||||
<img src="<?=$strLogo?>" />
|
||||
<?=$strIntroText?>
|
||||
</div>
|
||||
<div>
|
||||
<form method="GET" action="index.php">
|
||||
<select name="d" style="float:left;margin-top:0.5em;margin-right:0.5em;" onchange="this.form.submit()">
|
||||
|
Loading…
Reference in New Issue
Block a user