git.schokokeks.org
Repositories
Help
Report an Issue
bibweb.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
63bc9de
Branches
Tags
master
bibweb.git
template.php
Back-Button verwendet eine History
Bernd Wurst
commited
63bc9de
at 2024-09-20 07:40:29
template.php
Blame
History
Raw
<?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> <?php $f = 'assets/'.str_replace('.php','.js', $_SERVER['PHP_SELF']); if (file_exists($f)) { echo '<script src="'.$f.'"></script>'; } ?> </head> <body style="display: none;"> <div id="banner" class="mb-3"> <div id="banner-back"> <?php if ($previous) { ?> <a href="<?= $previous.'?history_pos='.($history_pos-1) ?>"><img src="assets/images/back.svg" width="65" height="65" alt="<"></a> <?php } ?> </div> <div id="banner-logo"><img src="assets/images/banner.svg" width="244" height="65" alt="Mosterei Wurst - Murrhardt-Köchersberg - 07192-936436"></div> <div id="banner-headline"><h1><?= $headline ?></h1></div> <div id="banner-clear"></div> </div> <div class="container text-center"> <?php if (isset($_SESSION['warnings'])) { foreach($_SESSION['warnings'] as $warning) { echo '<div class="card text-white bg-danger mb-3"> <div class="card-header">Fehler</div>'; echo '<div class="card-body">'.$warning.'</div>'; echo ' </div>'; } }?> <?= $content ?> <?php if (basename($_SERVER['PHP_SELF']) != 'finish.php') { ?> <nav aria-label="Zu anderen Schritten springen"> <ul class="pagination pagination-sm justify-content-center"> <?php foreach ($pages as $index => $file) { echo '<li class="page-item'.($file === basename($_SERVER['PHP_SELF']) ? ' active' : '').'"><a class="page-link" href="'.$file.'">'.$index.'</a></li>'; } ?> </ul></nav> <a id="allesloeschen" data-toggle="modal" data-target="#allesloeschen-dialog"class="btn btn-sm btn-block btn-outline-danger" href="clear.php">Alle Eingaben löschen und von vorne beginnen</a> <div class="modal fade" id="allesloeschen-dialog" tabindex="-1" role="dialog" aria-labelledby="Bestaetigung" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title">Alle Eingaben löschen?</h4> </div> <div class="modal-body"> <p>Alles was Sie bisher eingegeben haben wird gelöscht und Sie möchten von vorne beginnen?</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-outline-secondary" data-dismiss="modal">Abbrechen</button> <a class="btn btn-danger btn-ok">Eingaben löschen</a> </div> </div> </div> </div> <div class="card" id="footer"> <div class="card-header">Hilfe?</div> <div class="card-body"><p class="card-text">Für Unterstützung bei der Nutzung dieses Formulars können Sie uns unter der Telefonnummer <?php if (!isset($_SESSION['mode']) || $_SESSION['mode'] != 'local') { echo '<a href="tel:+497192936434">07192-936434</a>'; } else { echo '07192-936434'; }?> erreichen.</p></div> <?php if (!isset($_SESSION['mode']) || $_SESSION['mode'] != 'local') { ?> <div class="card-footer"><a target="_blank" href="https://mosterei-wurst.de/impressum/">Impressum</a> · <a target="_blank" href="https://mosterei-wurst.de/">Website besuchen</a></div> <?php } /* if ($_SESSION['mode'] != 'local') */ ?> </div> <?php } /* if (basename($_SERVER['PHP_SELF']) != 'finish.php') */ ?> </div> <div class="modal fade" id="idle-dialog" tabindex="-1" role="dialog" aria-labelledby="Bestaetigung" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title">Weitermachen?</h4> </div> <div class="modal-body"> <p>An diesem Gerät wurde lange nichts eingegeben. Möchten Sie am laufenden Auftrag weiter machen oder neu beginnen?</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-primary" data-dismiss="modal" id="dismiss-idle">Weiter machen!</button> <a class="btn btn-danger btn-ok" href="clear.php<?= (isset($_SESSION['mode']) ? '?mode='.$_SESSION['mode'] : '') ?>">Neu beginnen</a> </div> </div> </div> </div> <div id="loading-spinner-overlay"> <svg id="loading-spinner" xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M304 48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zm0 416a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM48 304a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm464-48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM142.9 437A48 48 0 1 0 75 369.1 48 48 0 1 0 142.9 437zm0-294.2A48 48 0 1 0 75 75a48 48 0 1 0 67.9 67.9zM369.1 437A48 48 0 1 0 437 369.1 48 48 0 1 0 369.1 437z"/></svg> </div> </body> </html>