This commit is contained in:
Robert
2023-12-22 19:07:54 +01:00
parent 561449690f
commit 40bdbf2c5a
15 changed files with 1589 additions and 1391 deletions

View File

@@ -0,0 +1,25 @@
<?php $_shouldextend[1]=1; ?>
<?php $this->startSection("main"); ?>
<form action="/anmeldung_verifizieren" method="post">
<label for="email">E-Mail</label>
<input id="email" name="email" type="email" placeholder="email" required maxlength="100">
<label for="passwort">Passwort</label>
<input id="passwort" name="passwort" type="password" placeholder="passwort" required maxlength="200">
<button type="submit" >Anmelden</button>
</form>
<?php if(!isset($anmeldung)): ?> Bitte anmelden!
<?php elseif($anmeldung == 1): ?>
<?php echo \htmlentities(session_start()??'', ENT_QUOTES, 'UTF-8', false); ?>
Anmeldung erlaubt!
<?php else: ?> Es ist ein Fehler aufgetretten!
<?php endif; ?>
<?php $this->stopSection(); ?>
<?php if (isset($_shouldextend[1])) { echo $this->runChild("m5_a1.layout_anmeldung"); } ?>

View File

@@ -0,0 +1,51 @@
<?php $_shouldextend[1]=1; ?>
<?php $this->startSection("main"); ?>
<?php if($anmeldung == 1): ?>
<meta http-equiv="refresh" content="/"/>
<form id="form_ok" action="/"></form>
<script type="text/javascript">
function formAutoSubmit() {
var frm = document.getElementById("form_ok");
frm.submit();
}
window.onload = formAutoSubmit;
</script>
<?php else: ?>
<form method="post" id="auto_form" action="/anmeldung_fehler">
<input type="hidden" name="email" value=<?php echo \htmlentities($email??'', ENT_QUOTES, 'UTF-8', false); ?>>
<input type="hidden" name="passwort" value=<?php echo \htmlentities($passwort??'', ENT_QUOTES, 'UTF-8', false); ?>>
<input type="hidden" name="anmeldung" value=<?php echo \htmlentities($anmeldung??'', ENT_QUOTES, 'UTF-8', false); ?>>
</form>
<script type="text/javascript">
function formAutoSubmit() {
var frm = document.getElementById("auto_form");
frm.submit();
}
window.onload = formAutoSubmit;
</script>
<?php endif; ?>
<img src="https://upload.wikimedia.org/wikipedia/commons/b/b1/Loading_icon.gif?20151024034921" alt="loading">
<br>
Bitte warten!
<?php $this->stopSection(); ?>
<?php if (isset($_shouldextend[1])) { echo $this->runChild("m5_a1.layout_anmeldung"); } ?>

View File

@@ -0,0 +1,21 @@
<!doctype html>
<html class="no-js" lang="DE">
<head>
<meta charset="utf-8">
<title>Layout-m5-a1</title>
</head>
<body>
<header class="header_7d">
<?php echo $this->yieldContent("header"); ?>
</header>
<main class="main">
<?php echo $this->yieldContent("main"); ?>
</main>
<footer class="footer">
<?php echo $this->yieldContent("footer"); ?>
</footer>
</body>
</html>

View File

@@ -17,7 +17,18 @@
<a href="#wichtig">Wichtig für uns</a>
</div>
<div>
<?php if(($_SESSION['login'] ?? NULL) == 0): ?>
<a href="/anmeldung">Anmelden</a>
<?php else: ?>
Angemeldet als:<br>
<div><?php echo \htmlentities($_SESSION['name']??'', ENT_QUOTES, 'UTF-8', false); ?></div>
<a href="/abmeldung">Abmelden</a>
<?php endif; ?>
</div>
</div>
<?php $this->stopSection(); ?>
<?php $this->startSection("text"); ?>