M5 A1 6)
This commit is contained in:
1
M3/.idea/sqldialects.xml
generated
1
M3/.idea/sqldialects.xml
generated
@@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="SqlDialectMappings">
|
||||
<file url="file://$PROJECT_DIR$/werbeseite_daten.sql" dialect="MariaDB" />
|
||||
<file url="PROJECT" dialect="MariaDB" />
|
||||
</component>
|
||||
</project>
|
||||
5
M4/.idea/M4.iml
generated
5
M4/.idea/M4.iml
generated
@@ -1,7 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/emensa/vendor/composer" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/emensa/vendor/eftec/bladeone" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
|
||||
8
M4/.idea/php.xml
generated
8
M4/.idea/php.xml
generated
@@ -10,7 +10,13 @@
|
||||
<option name="highlightLevel" value="WARNING" />
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PhpProjectSharedConfiguration" php_language_level="8.0" />
|
||||
<component name="PhpIncludePathManager">
|
||||
<include_path>
|
||||
<path value="$PROJECT_DIR$/emensa/vendor/composer" />
|
||||
<path value="$PROJECT_DIR$/emensa/vendor/eftec/bladeone" />
|
||||
</include_path>
|
||||
</component>
|
||||
<component name="PhpProjectSharedConfiguration" php_language_level="8.2" />
|
||||
<component name="PhpStanOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
|
||||
@@ -21,7 +21,7 @@ $newletterCount = 0;
|
||||
$link = mysqli_connect(
|
||||
"127.0.0.1", // Host der Datenbank
|
||||
"root", // Benutzername zur Anmeldung
|
||||
"admin", // Passwort
|
||||
"wm#32", // Passwort
|
||||
"emensawerbeseite" // Auswahl der Datenbanken (bzw. des Schemas)
|
||||
);
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
return [
|
||||
'host' => 'localhost', // 'localhost' or '127.0.0.1'
|
||||
'user' => 'root', // '<yourusername>'
|
||||
'password' => 'admin', // '<yourpassword>'
|
||||
'password' => 'wm#32', // '<yourpassword>'
|
||||
'database' => 'emensawerbeseite',
|
||||
// optionally: set port below if it differs from the default 3306
|
||||
// 'port' => 13306 // !! this is not your webserver port, but the mariadb port
|
||||
|
||||
34
M4/emensa/storage/cache/examples.m4_7c_gerichte_24dbedd391e1a47ee18b0686a8182fae7dda8164.bladec
vendored
Normal file
34
M4/emensa/storage/cache/examples.m4_7c_gerichte_24dbedd391e1a47ee18b0686a8182fae7dda8164.bladec
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Beispiel: Daten aus der Datenbank</title>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<?php if(isset($data['error'])): ?>
|
||||
<h1>Es gab ein Problem mit der Datenbankverbindung</h1>
|
||||
<p>Fehlermeldung</p>
|
||||
<pre> <?php echo \htmlentities($data['beschreibung']??'', ENT_QUOTES, 'UTF-8', false); ?></pre>
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<article>
|
||||
<h1>Daten aus der Datenbank der Tabelle: Kategorien</h1>
|
||||
|
||||
<ul>
|
||||
<?php $__empty_1 = true; foreach($data as $a): $__empty_1 = false; ?>
|
||||
<?php if(!empty($a['name'])): ?>
|
||||
<li><?php echo \htmlentities($a['name']??'', ENT_QUOTES, 'UTF-8', false); ?></li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endforeach; if ($__empty_1): ?>
|
||||
<li>Es sind keine Gerichte vorhanden</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</article>
|
||||
<?php endif; ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
30
M4/emensa/storage/cache/layouts.main_layout_9f099eee303f11c8c3f1b61e05a54e7376df8add.bladec
vendored
Normal file
30
M4/emensa/storage/cache/layouts.main_layout_9f099eee303f11c8c3f1b61e05a54e7376df8add.bladec
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="DE">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title><?php echo \htmlentities($title??'', ENT_QUOTES, 'UTF-8', false); ?></title>
|
||||
|
||||
<?php echo $this->yieldContent("header"); ?>
|
||||
|
||||
<!-- good developers check the markup ;) -->
|
||||
</head>
|
||||
<body>
|
||||
<?php echo $this->yieldContent("nav"); ?>
|
||||
<hr>
|
||||
<div class="grid">
|
||||
<div></div>
|
||||
<div>
|
||||
<?php echo $this->yieldContent("text"); ?>
|
||||
|
||||
<?php echo $this->yieldContent("gerichte"); ?>
|
||||
</div>
|
||||
<div></div>
|
||||
</div>
|
||||
<footer>
|
||||
<table class="fusszeile">
|
||||
<?php echo $this->yieldContent("footer"); ?>
|
||||
</table>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
62
M4/emensa/storage/cache/main.index_1dae39c16001572743356f32c7852146f9bbc1ec.bladec
vendored
Normal file
62
M4/emensa/storage/cache/main.index_1dae39c16001572743356f32c7852146f9bbc1ec.bladec
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
<?php $_shouldextend[1]=1; ?>
|
||||
|
||||
<?php $this->startSection("header"); ?>
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
<?php $this->stopSection(); ?>
|
||||
|
||||
<?php $this->startSection("nav"); ?>
|
||||
<div class="grid">
|
||||
<div>
|
||||
<img src="/img/fh-logo.jpg" alt="FH-Logo">
|
||||
</div>
|
||||
<div>
|
||||
<a href="#ankündigung">Ankündigung</a>
|
||||
<a href="#speisen">Speisen</a>
|
||||
<a href="#zahlen">Zahlen</a>
|
||||
<a href="#kontakt">Kontakt</a>
|
||||
<a href="#wichtig">Wichtig für uns</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php $this->stopSection(); ?>
|
||||
|
||||
<?php $this->startSection("text"); ?>
|
||||
|
||||
<img src="/img/mensa21.jpg" alt="Essen">
|
||||
<h1 id="ankündigung">Bald gibt es auch Essen online ;)</h1>
|
||||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
|
||||
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
|
||||
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
|
||||
consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
|
||||
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no
|
||||
sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
|
||||
<h1 id="speisen">Köstlichkeiten die Sie erwarten</h1>
|
||||
|
||||
<?php $this->stopSection(); ?>
|
||||
|
||||
<?php $this->startSection("gerichte"); ?>
|
||||
|
||||
<?php if(isset($data['error'])): ?>
|
||||
<h1>Es gab ein Problem mit der Datenbankverbindung</h1>
|
||||
<p>Fehlermeldung</p>
|
||||
<pre> <?php echo \htmlentities($data['beschreibung']??'', ENT_QUOTES, 'UTF-8', false); ?></pre>
|
||||
|
||||
<?php else: ?>
|
||||
<?php
|
||||
echo $data["gericht"];
|
||||
echo $data["allergene"];
|
||||
?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $this->stopSection(); ?>
|
||||
|
||||
<?php $this->startSection("footer"); ?>
|
||||
|
||||
<tr>
|
||||
<td>(c) E-Mensa GmbH</td>
|
||||
<td>Şafak Hazinedar & Robert Joel</td>
|
||||
<td><a href="">Impressum</a></td>
|
||||
</tr>
|
||||
|
||||
<?php $this->stopSection(); ?>
|
||||
<?php if (isset($_shouldextend[1])) { echo $this->runChild("layouts.main_layout", ['title' => "E-Mensa"]); } ?>
|
||||
11
M5/.idea/M5.iml
generated
Normal file
11
M5/.idea/M5.iml
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/emensa/vendor/composer" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/emensa/vendor/eftec/bladeone" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
7
M5/beispiele/passwort.php
Normal file
7
M5/beispiele/passwort.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
$passwort = 'passwort';
|
||||
|
||||
$sql_pass = sha1($passwort);
|
||||
|
||||
echo $sql_pass;
|
||||
70
M5/emensa/controllers/AnmeldungController.php
Normal file
70
M5/emensa/controllers/AnmeldungController.php
Normal file
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
require_once($_SERVER['DOCUMENT_ROOT'].'/../models/benutzer.php');
|
||||
|
||||
|
||||
class AnmeldungController
|
||||
{
|
||||
|
||||
public function start(){
|
||||
return view(
|
||||
'm5_a1.anmeldung',
|
||||
[]
|
||||
);
|
||||
}
|
||||
|
||||
public function anmeldung_verifizieren(RequestData $rd){
|
||||
|
||||
$data = $rd->getPostData();
|
||||
|
||||
$email = $data["email"] ?? NULL;
|
||||
$passwort = $data["passwort"] ?? NULL;
|
||||
|
||||
$anmeldung = anmelden($email, sha1($passwort));
|
||||
|
||||
return view(
|
||||
|
||||
'm5_a1.anmeldung_verifizieren',
|
||||
|
||||
[
|
||||
'email' => $email,
|
||||
'passwort' => $passwort,
|
||||
'anmeldung' => $anmeldung
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
public function check(RequestData $rd){
|
||||
|
||||
$data = $rd->getPostData();
|
||||
|
||||
$email = $data["email"] ?? NULL;
|
||||
$passwort = $data["passwort"] ?? NULL;
|
||||
$anmeldung = $data["anmeldung"] ?? NULL;
|
||||
|
||||
return view(
|
||||
'm5_a1.anmeldung',
|
||||
[
|
||||
'email' => $email,
|
||||
'passwort' => $passwort,
|
||||
'anmeldung' => $anmeldung,
|
||||
'data' => $data
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
function abmelden(){
|
||||
|
||||
session_unset();
|
||||
session_destroy();
|
||||
|
||||
return view(
|
||||
|
||||
'm5_a1.abmeldung',
|
||||
|
||||
[
|
||||
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
46
M5/emensa/models/benutzer.php
Normal file
46
M5/emensa/models/benutzer.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* Diese Datei enthält alle SQL Statements für die Tabelle "benutzer"
|
||||
*/
|
||||
|
||||
function anmelden(string $email, string $passwort)
|
||||
{
|
||||
$link = connectdb();
|
||||
|
||||
$sql = "SELECT * FROM benutzer WHERE (`email` = '$email')";
|
||||
$result = $link->query($sql);
|
||||
$row = $result->fetch_assoc();
|
||||
|
||||
if ($row['passwort'] == NULL) {
|
||||
$row = 0;
|
||||
}
|
||||
elseif ($row['passwort'] == $passwort) {
|
||||
session_start();
|
||||
|
||||
mysqli_begin_transaction($link);
|
||||
$sql = "UPDATE benutzer SET letzteanmeldung = current_time, anzahlfehler = 0 WHERE email = '$email'";
|
||||
$link->query($sql);
|
||||
|
||||
$sql = "UPDATE benutzer SET anzahlanmeldungen = anzahlanmeldungen + 1 WHERE id = ".$row['id'];
|
||||
$link->query($sql);
|
||||
|
||||
mysqli_commit($link);
|
||||
|
||||
$_SESSION['uid'] = session_id();
|
||||
$_SESSION['login'] = 1;
|
||||
$_SESSION['name'] = $row['name'];
|
||||
$_SESSION['email'] = $row['email'];
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
|
||||
mysqli_begin_transaction($link);
|
||||
|
||||
$sql = "UPDATE benutzer SET anzahlfehler = anzahlfehler+1, letzterfehler = current_time WHERE email = '$email'";
|
||||
$link->query($sql);
|
||||
|
||||
mysqli_commit($link);
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
23
M5/emensa/storage/cache/.layouts.layout_933596b3f8bdab5243334e13bf36856f2a87605f.bladec
vendored
Normal file
23
M5/emensa/storage/cache/.layouts.layout_933596b3f8bdab5243334e13bf36856f2a87605f.bladec
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="DE">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>E-Mensa Routing Script</title>
|
||||
<meta name="description" content="unused">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="css/default.min.css">
|
||||
<?php echo $this->yieldContent("cssextra"); ?>
|
||||
<meta name="theme-color" content="#dadada">
|
||||
<!-- good developers check the markup ;) -->
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<?php echo $this->yieldContent("content"); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php echo $this->yieldContent("jsextra"); ?>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
94
M5/emensa/storage/cache/demo.demo_fc1036c569380dbc95c820cc4f5096087e39b268.bladec
vendored
Normal file
94
M5/emensa/storage/cache/demo.demo_fc1036c569380dbc95c820cc4f5096087e39b268.bladec
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
<?php $_shouldextend[1]=1; ?>
|
||||
|
||||
<?php $this->startSection("content"); ?>
|
||||
<div>
|
||||
<h1>Demo für <?php echo \htmlentities($name??'', ENT_QUOTES, 'UTF-8', false); ?></h1>
|
||||
<p>Kurze Übersicht, wie die Arbeit mit dem Router und der Blade View-Engine funktioniert.</p>
|
||||
|
||||
<h2>Router</h2>
|
||||
<p>Der Router nimmt den Request entgegen und zerlegt ihn in die einzelnen Teile der URI. Wichtig ist hier vor
|
||||
allem der Pfad und der Querystring.</p>
|
||||
<p>Wenn der Pfad in der Routenkonfiguration (<code>\$config</code> Array aus der Datei
|
||||
<code>routes/web.php</code>) gefunden wird, lädt der Router die angegebene Klasse.</p>
|
||||
|
||||
<h3>Funktionsweise</h3>
|
||||
<p>Im vorliegenden Beispiel sehen Sie diese Seite ... </p>
|
||||
<ol>
|
||||
<li>weil der Pfad in der Routenkonfiguration gefunden wurde</li>
|
||||
<li>und dort <span class="code">'DemoController@howto'</span> hinterlegt ist</li>
|
||||
<li>und im Ordner <span class="code">controllers/</span> die Datei <code class="language-php">DemoController.php</code> gefunden werden konnte
|
||||
</li>
|
||||
<li>und mit ihr ein Objekt des Typs <span class="code">DemoController</span> instanziiert werden konnte</li>
|
||||
<li>und dieses Objekt die Funktion (Action) <span class="code">howto()</span> ausgeführt hat</li>
|
||||
</ol>
|
||||
<p>Sie sehen: da muss einiges stimmen und vieles davon ist Konvention.</p>
|
||||
<h3>Querystrings und Pfadsegmente</h3>
|
||||
<p>Die Actions in den Controller-Klassen sollen per Konvention immer ein <span class="code">RequestData</span> Objekt
|
||||
entgegennehmen. Beispiel: <code class="language-php">howto(RequestData \$rd)</code></p>
|
||||
<p>Dieses RequestData Objekt wird durch den Router befüllt, wenn Daten in der URL extrahiert werden konnten.</p>
|
||||
<p>Daten finden sich URLs...</p>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<p>
|
||||
<strong>im Querystring</strong><br>Beispiel: rufen Sie diese mit
|
||||
<code class="language-http"><?php echo \htmlentities(strtolower(explode('/',$_SERVER["SERVER_PROTOCOL"])[0])??'', ENT_QUOTES, 'UTF-8', false); ?>://<?php echo \htmlentities($_SERVER["HTTP_HOST"]??'', ENT_QUOTES, 'UTF-8', false); ?>/demo?<strong>bgcolor=fefbd8&name=Remmy</strong></code>
|
||||
auf, werden <span class="language-php">bgcolor</span> und <code class="language-php">name</code> mitsamt Werten als Query Array
|
||||
<code class="language-php">$rd->query</code>) übergeben
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>Probieren Sie es aus ;)</p>
|
||||
<?php if(count($rd->args)): ?>
|
||||
<p><strong>Argumente dieses Aufrufs:</strong></p>
|
||||
|
||||
<?php $__empty_1 = true; foreach($rd->args as $a): $__empty_1 = false; ?>
|
||||
<div><span class="code"><?php echo \htmlentities($a??'', ENT_QUOTES, 'UTF-8', false); ?></span></div>
|
||||
<?php endforeach; if ($__empty_1): ?>
|
||||
<p>Keine weiteren Argumente im Request</p>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if(count($rd->query)): ?>
|
||||
<p><strong>Daten aus der Query dieses Aufrufs:</strong></p>
|
||||
<pre><code class="language-php">
|
||||
<?php $__empty_1 = true; foreach($rd->query as $k => $v): $__empty_1 = false; ?>
|
||||
$rd->query['<?php echo \htmlentities($k??'', ENT_QUOTES, 'UTF-8', false); ?>']=<?php echo \htmlentities($v??'', ENT_QUOTES, 'UTF-8', false); ?>
|
||||
|
||||
<?php endforeach; if ($__empty_1): ?>
|
||||
<p>Keine Querydaten</p>
|
||||
<?php endif; ?>
|
||||
</code></pre>
|
||||
<?php endif; ?>
|
||||
<h2>Blade</h2>
|
||||
<p>Blade <a href="https://github.com/EFTEC/BladeOne#install-pick-one-of-the-next-one">muss installiert</a> sein.
|
||||
Die Installation ist bereits geschehen und die Bibliothek liegt unter /vendor.
|
||||
</p>
|
||||
<h3>Daten übergeben und View rendern</h3>
|
||||
<p>Bei der Verwendung der View-Engine gelten einige Konventionen:
|
||||
Die Dateien müssen <code class="language-php"><viewname>.blade.php</code> heißen und im Ordner <code class="language-php">views</code> liegen.
|
||||
</p>
|
||||
<p>Sie können der View dann Daten mitgeben, indem Sie alle Daten in ein Array schreiben und dieses dann
|
||||
übergeben.</p>
|
||||
<p>Beispiel:</p>
|
||||
<pre><code class="language-php">
|
||||
view("viewtest",
|
||||
array(
|
||||
"texts"=>$textArray,
|
||||
"persona"=>$persona,
|
||||
"rd"=>$rd
|
||||
)); // öffnet ../views/viewtest.blade.php
|
||||
</code></pre>
|
||||
</div>
|
||||
<?php $this->stopSection(); ?>
|
||||
|
||||
<?php $this->startSection("cssextra"); ?>
|
||||
<style>
|
||||
body > div {background-color: <?php echo \htmlentities('#' . $bgcolor??'', ENT_QUOTES, 'UTF-8', false); ?>; }
|
||||
</style>
|
||||
<?php $this->stopSection(); ?>
|
||||
|
||||
<?php $this->startSection("jsextra"); ?>
|
||||
<script src="/js/highlight.min.js"></script><script>hljs.highlightAll();</script>
|
||||
<?php $this->stopSection(); ?>
|
||||
<?php if (isset($_shouldextend[1])) { echo $this->runChild(".layouts.layout"); } ?>
|
||||
34
M5/emensa/storage/cache/examples.m4_7c_gerichte_24dbedd391e1a47ee18b0686a8182fae7dda8164.bladec
vendored
Normal file
34
M5/emensa/storage/cache/examples.m4_7c_gerichte_24dbedd391e1a47ee18b0686a8182fae7dda8164.bladec
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Beispiel: Daten aus der Datenbank</title>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<?php if(isset($data['error'])): ?>
|
||||
<h1>Es gab ein Problem mit der Datenbankverbindung</h1>
|
||||
<p>Fehlermeldung</p>
|
||||
<pre> <?php echo \htmlentities($data['beschreibung']??'', ENT_QUOTES, 'UTF-8', false); ?></pre>
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<article>
|
||||
<h1>Daten aus der Datenbank der Tabelle: Kategorien</h1>
|
||||
|
||||
<ul>
|
||||
<?php $__empty_1 = true; foreach($data as $a): $__empty_1 = false; ?>
|
||||
<?php if(!empty($a['name'])): ?>
|
||||
<li><?php echo \htmlentities($a['name']??'', ENT_QUOTES, 'UTF-8', false); ?></li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endforeach; if ($__empty_1): ?>
|
||||
<li>Es sind keine Gerichte vorhanden</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</article>
|
||||
<?php endif; ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
30
M5/emensa/storage/cache/layouts.main_layout_3661f571e5a2129da3ca081fa828422117d3b345.bladec
vendored
Normal file
30
M5/emensa/storage/cache/layouts.main_layout_3661f571e5a2129da3ca081fa828422117d3b345.bladec
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="DE">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title><?php echo \htmlentities($title??'', ENT_QUOTES, 'UTF-8', false); ?></title>
|
||||
|
||||
<?php echo $this->yieldContent("header"); ?>
|
||||
|
||||
<!-- good developers check the markup ;) -->
|
||||
</head>
|
||||
<body>
|
||||
<?php echo $this->yieldContent("nav"); ?>
|
||||
<hr>
|
||||
<div class="grid">
|
||||
<div></div>
|
||||
<div>
|
||||
<?php echo $this->yieldContent("text"); ?>
|
||||
|
||||
<?php echo $this->yieldContent("gerichte"); ?>
|
||||
</div>
|
||||
<div></div>
|
||||
</div>
|
||||
<footer>
|
||||
<table class="fusszeile">
|
||||
<?php echo $this->yieldContent("footer"); ?>
|
||||
</table>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
30
M5/emensa/storage/cache/layouts.main_layout_9f099eee303f11c8c3f1b61e05a54e7376df8add.bladec
vendored
Normal file
30
M5/emensa/storage/cache/layouts.main_layout_9f099eee303f11c8c3f1b61e05a54e7376df8add.bladec
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="DE">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title><?php echo \htmlentities($title??'', ENT_QUOTES, 'UTF-8', false); ?></title>
|
||||
|
||||
<?php echo $this->yieldContent("header"); ?>
|
||||
|
||||
<!-- good developers check the markup ;) -->
|
||||
</head>
|
||||
<body>
|
||||
<?php echo $this->yieldContent("nav"); ?>
|
||||
<hr>
|
||||
<div class="grid">
|
||||
<div></div>
|
||||
<div>
|
||||
<?php echo $this->yieldContent("text"); ?>
|
||||
|
||||
<?php echo $this->yieldContent("gerichte"); ?>
|
||||
</div>
|
||||
<div></div>
|
||||
</div>
|
||||
<footer>
|
||||
<table class="fusszeile">
|
||||
<?php echo $this->yieldContent("footer"); ?>
|
||||
</table>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
25
M5/emensa/storage/cache/m5_a1.anmeldung_c24d33e917eb7ef9d14d646f11f37749504ff5c8.bladec
vendored
Normal file
25
M5/emensa/storage/cache/m5_a1.anmeldung_c24d33e917eb7ef9d14d646f11f37749504ff5c8.bladec
vendored
Normal 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: ?> Anmeldung nicht erlaubt!
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $this->stopSection(); ?>
|
||||
<?php if (isset($_shouldextend[1])) { echo $this->runChild("m5_a1.layout_anmeldung"); } ?>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php $_shouldextend[1]=1; ?>
|
||||
|
||||
<?php $this->startSection("main"); ?>
|
||||
|
||||
<?php if($anmeldung == 1): ?>
|
||||
<meta http-equiv="refresh" content="/main"/>
|
||||
<form id="form_ok" action="/main"></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_nichtkorrekt">
|
||||
<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"); } ?>
|
||||
21
M5/emensa/storage/cache/m5_a1.layout_anmeldung_0bf7f1c53d4cd4970b2790535eaffcc9dddc4266.bladec
vendored
Normal file
21
M5/emensa/storage/cache/m5_a1.layout_anmeldung_0bf7f1c53d4cd4970b2790535eaffcc9dddc4266.bladec
vendored
Normal 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>
|
||||
62
M5/emensa/storage/cache/main.index_1dae39c16001572743356f32c7852146f9bbc1ec.bladec
vendored
Normal file
62
M5/emensa/storage/cache/main.index_1dae39c16001572743356f32c7852146f9bbc1ec.bladec
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
<?php $_shouldextend[1]=1; ?>
|
||||
|
||||
<?php $this->startSection("header"); ?>
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
<?php $this->stopSection(); ?>
|
||||
|
||||
<?php $this->startSection("nav"); ?>
|
||||
<div class="grid">
|
||||
<div>
|
||||
<img src="/img/fh-logo.jpg" alt="FH-Logo">
|
||||
</div>
|
||||
<div>
|
||||
<a href="#ankündigung">Ankündigung</a>
|
||||
<a href="#speisen">Speisen</a>
|
||||
<a href="#zahlen">Zahlen</a>
|
||||
<a href="#kontakt">Kontakt</a>
|
||||
<a href="#wichtig">Wichtig für uns</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php $this->stopSection(); ?>
|
||||
|
||||
<?php $this->startSection("text"); ?>
|
||||
|
||||
<img src="/img/mensa21.jpg" alt="Essen">
|
||||
<h1 id="ankündigung">Bald gibt es auch Essen online ;)</h1>
|
||||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
|
||||
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
|
||||
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
|
||||
consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
|
||||
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no
|
||||
sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
|
||||
<h1 id="speisen">Köstlichkeiten die Sie erwarten</h1>
|
||||
|
||||
<?php $this->stopSection(); ?>
|
||||
|
||||
<?php $this->startSection("gerichte"); ?>
|
||||
|
||||
<?php if(isset($data['error'])): ?>
|
||||
<h1>Es gab ein Problem mit der Datenbankverbindung</h1>
|
||||
<p>Fehlermeldung</p>
|
||||
<pre> <?php echo \htmlentities($data['beschreibung']??'', ENT_QUOTES, 'UTF-8', false); ?></pre>
|
||||
|
||||
<?php else: ?>
|
||||
<?php
|
||||
echo $data["gericht"];
|
||||
echo $data["allergene"];
|
||||
?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $this->stopSection(); ?>
|
||||
|
||||
<?php $this->startSection("footer"); ?>
|
||||
|
||||
<tr>
|
||||
<td>(c) E-Mensa GmbH</td>
|
||||
<td>Şafak Hazinedar & Robert Joel</td>
|
||||
<td><a href="">Impressum</a></td>
|
||||
</tr>
|
||||
|
||||
<?php $this->stopSection(); ?>
|
||||
<?php if (isset($_shouldextend[1])) { echo $this->runChild("layouts.main_layout", ['title' => "E-Mensa"]); } ?>
|
||||
62
M5/emensa/storage/cache/main.index_9109369b5cbb1a20226820e2c52ae9625c829d43.bladec
vendored
Normal file
62
M5/emensa/storage/cache/main.index_9109369b5cbb1a20226820e2c52ae9625c829d43.bladec
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
<?php $_shouldextend[1]=1; ?>
|
||||
|
||||
<?php $this->startSection("header"); ?>
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
<?php $this->stopSection(); ?>
|
||||
|
||||
<?php $this->startSection("nav"); ?>
|
||||
<div class="grid">
|
||||
<div>
|
||||
<img src="/img/fh-logo.jpg" alt="FH-Logo">
|
||||
</div>
|
||||
<div>
|
||||
<a href="#ankündigung">Ankündigung</a>
|
||||
<a href="#speisen">Speisen</a>
|
||||
<a href="#zahlen">Zahlen</a>
|
||||
<a href="#kontakt">Kontakt</a>
|
||||
<a href="#wichtig">Wichtig für uns</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php $this->stopSection(); ?>
|
||||
|
||||
<?php $this->startSection("text"); ?>
|
||||
|
||||
<img src="/img/mensa21.jpg" alt="Essen">
|
||||
<h1 id="ankündigung">Bald gibt es auch Essen online ;)</h1>
|
||||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
|
||||
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
|
||||
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
|
||||
consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
|
||||
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no
|
||||
sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
|
||||
<h1 id="speisen">Köstlichkeiten die Sie erwarten</h1>
|
||||
|
||||
<?php $this->stopSection(); ?>
|
||||
|
||||
<?php $this->startSection("gerichte"); ?>
|
||||
|
||||
<?php if(isset($data['error'])): ?>
|
||||
<h1>Es gab ein Problem mit der Datenbankverbindung</h1>
|
||||
<p>Fehlermeldung</p>
|
||||
<pre> <?php echo \htmlentities($data['beschreibung']??'', ENT_QUOTES, 'UTF-8', false); ?></pre>
|
||||
|
||||
<?php else: ?>
|
||||
<?php
|
||||
echo $data["gericht"];
|
||||
echo $data["allergene"];
|
||||
?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $this->stopSection(); ?>
|
||||
|
||||
<?php $this->startSection("footer"); ?>
|
||||
|
||||
<tr>
|
||||
<td>(c) E-Mensa GmbH</td>
|
||||
<td>Şafak Hazinedar & Robert Joel</td>
|
||||
<td><a href="">Impressum</a></td>
|
||||
</tr>
|
||||
|
||||
<?php $this->stopSection(); ?>
|
||||
<?php if (isset($_shouldextend[1])) { echo $this->runChild("layouts.main_layout", ['title' => "E-Mensa"]); } ?>
|
||||
31
M5/emensa/views/anmeldung/anmeldung.blade.php
Normal file
31
M5/emensa/views/anmeldung/anmeldung.blade.php
Normal file
@@ -0,0 +1,31 @@
|
||||
@extends("layouts.main_layout", ['title' => "E-Mensa"])
|
||||
|
||||
@section("header")
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
@endsection
|
||||
|
||||
@section("nav")
|
||||
<div class="grid">
|
||||
<div>
|
||||
<img src="/img/fh-logo.jpg" alt="FH-Logo">
|
||||
</div>
|
||||
<div>
|
||||
<a href="#ankündigung">Ankündigung</a>
|
||||
<a href="#speisen">Speisen</a>
|
||||
<a href="#zahlen">Zahlen</a>
|
||||
<a href="#kontakt">Kontakt</a>
|
||||
<a href="#wichtig">Wichtig für uns</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section("footer")
|
||||
|
||||
<tr>
|
||||
<td>(c) E-Mensa GmbH</td>
|
||||
<td>Şafak Hazinedar & Robert Joel</td>
|
||||
<td><a href="">Impressum</a></td>
|
||||
</tr>
|
||||
|
||||
@endsection
|
||||
11
M5/emensa/views/m5_a1/abmeldung.blade.php
Normal file
11
M5/emensa/views/m5_a1/abmeldung.blade.php
Normal file
@@ -0,0 +1,11 @@
|
||||
@extends("m5_a1.layout_anmeldung")
|
||||
|
||||
@section("main")
|
||||
|
||||
@if(!isset($_SESSION['name']))
|
||||
|
||||
<meta http-equiv="refresh" content="0;url=/werbeseite" />
|
||||
|
||||
@endif
|
||||
|
||||
@endsection
|
||||
23
M5/emensa/views/m5_a1/anmeldung.blade.php
Normal file
23
M5/emensa/views/m5_a1/anmeldung.blade.php
Normal file
@@ -0,0 +1,23 @@
|
||||
@extends("m5_a1.layout_anmeldung")
|
||||
|
||||
@section("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>
|
||||
|
||||
@if(!isset($anmeldung)) Bitte anmelden!
|
||||
@elseif ($anmeldung == 1)
|
||||
{{ session_start() }}
|
||||
Anmeldung erlaubt!
|
||||
@else Anmeldung nicht erlaubt!
|
||||
@endif
|
||||
|
||||
@endsection
|
||||
50
M5/emensa/views/m5_a1/anmeldung_verifizieren.blade.php
Normal file
50
M5/emensa/views/m5_a1/anmeldung_verifizieren.blade.php
Normal file
@@ -0,0 +1,50 @@
|
||||
@extends("m5_a1.layout_anmeldung")
|
||||
|
||||
@section("main")
|
||||
|
||||
@if($anmeldung == 1)
|
||||
<meta http-equiv="refresh" content="/main"/>
|
||||
<form id="form_ok" action="/main"></form>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function formAutoSubmit() {
|
||||
|
||||
var frm = document.getElementById("form_ok");
|
||||
|
||||
frm.submit();
|
||||
|
||||
}
|
||||
|
||||
|
||||
window.onload = formAutoSubmit;
|
||||
|
||||
</script>
|
||||
@else
|
||||
|
||||
<form method="post" id="auto_form" action="/anmeldung_nichtkorrekt">
|
||||
<input type="hidden" name="email" value={{ $email}}>
|
||||
<input type="hidden" name="passwort" value={{$passwort}}>
|
||||
<input type="hidden" name="anmeldung" value={{$anmeldung }}>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function formAutoSubmit() {
|
||||
|
||||
var frm = document.getElementById("auto_form");
|
||||
|
||||
frm.submit();
|
||||
|
||||
}
|
||||
|
||||
window.onload = formAutoSubmit;
|
||||
|
||||
</script>
|
||||
@endif
|
||||
|
||||
<img src="https://upload.wikimedia.org/wikipedia/commons/b/b1/Loading_icon.gif?20151024034921" alt="loading">
|
||||
<br>
|
||||
Bitte warten!
|
||||
|
||||
@endsection
|
||||
21
M5/emensa/views/m5_a1/layout_anmeldung.blade.php
Normal file
21
M5/emensa/views/m5_a1/layout_anmeldung.blade.php
Normal 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">
|
||||
@yield("header")
|
||||
</header>
|
||||
|
||||
<main class="main">
|
||||
@yield("main")
|
||||
</main>
|
||||
|
||||
<footer class="footer">
|
||||
@yield("footer")
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
BIN
M5/gerichte.zip
Normal file
BIN
M5/gerichte.zip
Normal file
Binary file not shown.
Reference in New Issue
Block a user