Bernd Wurst
Back-Button verwendet eine History
Bernd Wurst commited 63bc9de at 2024-09-20 07:40:29
<?php
//print_r($_SESSION);
$pages = array(
1 => 'index.php',
2 => 'address.php',
3 => 'notification.php',
4 => 'gitterbox.php',
5 => 'obstart.php',
6 => 'gebrauchte.php',
7 => 'auftrag.php',
8 => 'frischsaft.php',
9 => 'summary.php');
$previous = null;
$history_pos = 0;
if (!isset($_SESSION['page_history'])) {
$_SESSION['page_history'] = [];
}
if (isset($_REQUEST['history_pos']) && $_REQUEST['history_pos'] >= 0) {
if ($_REQUEST['history_pos'] > 0) {
$previous = $_SESSION['page_history'][$_REQUEST['history_pos']-1];
}
$history_pos = $_REQUEST['history_pos'];
// Das tötet einen eventuellen Forward-Button
// Wenn man zurück gedrückt hat, ist
array_pop($_SESSION['page_history']);
} else {
$previous = end($_SESSION['page_history']);
$_SESSION['page_history'][] = $_SERVER['PHP_SELF'];
// Index ist count()-1
$history_pos = count($_SESSION['page_history'])-1;
}
?><!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Mosterei Wurst - Auftrag erteilen</title>
<script src="assets/jquery.js"></script>
<script src="assets/jquery-ui/jquery-ui.min.js"></script>
<link href="assets/jquery-ui/jquery-ui.min.css" rel="stylesheet">
<script src="assets/fontawesome/svg-with-js/js/fontawesome-all.min.js"></script>
<link href="assets/fontawesome/svg-with-js/css/fa-svg-with-js.css" rel="stylesheet">
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
<link href="assets/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/style.css" rel="stylesheet">
<script src="assets/script.js"></script>
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX