This commit is contained in:
S170H
2023-12-17 22:17:05 +01:00
committed by Robert
parent b6100b2ab6
commit 94f7100138
29 changed files with 841 additions and 5 deletions

5
M4/.idea/M4.iml generated
View File

@@ -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
View File

@@ -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>

View File

@@ -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)
);

View File

@@ -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

View 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>

View 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>

View 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"]); } ?>