Compare commits
27 Commits
final/m1
...
dev/m2_saf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1b5faa0d69 | ||
|
|
daa8f95cb7 | ||
|
|
59d1540de6 | ||
|
|
217a13bd52 | ||
|
|
0c360ccb99 | ||
|
|
d1ee9c1fb9 | ||
|
|
8b4c4c1c7f | ||
|
|
f1831cc58d | ||
|
|
b8c27e90ea | ||
|
|
2539383e67 | ||
|
|
fddeba1ce8 | ||
|
|
7d4ec262a5 | ||
|
|
fc22cd51df | ||
|
|
c7e17faeaf | ||
|
|
48cca528a8 | ||
|
|
8f740feb3c | ||
|
|
e4fdfbaff5 | ||
|
|
f31f62bc7c | ||
|
|
8cb89a929c | ||
|
|
4b85661745 | ||
|
|
826fb3ae54 | ||
|
|
495b05491f | ||
|
|
5f96533f1f | ||
|
|
3e697d1be6 | ||
|
|
783d211254 | ||
|
|
79f0d28cd3 | ||
|
|
357ac646f3 |
8
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
8
.idea/DBWT-Praktika.iml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
8
.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/DBWT-Praktika.iml" filepath="$PROJECT_DIR$/.idea/DBWT-Praktika.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
20
.idea/php.xml
generated
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="MessDetectorOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PHPCSFixerOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PHPCodeSnifferOptionsConfiguration">
|
||||
<option name="highlightLevel" value="WARNING" />
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PhpProjectSharedConfiguration" php_language_level="8.2" />
|
||||
<component name="PhpStanOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PsalmOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
BIN
Buch1.xlsx
Normal file
BIN
M1/Werbeseite/fh-logo.jpg
Normal file
|
After Width: | Height: | Size: 64 KiB |
203
M1/Werbeseite/index.html
Normal file
@@ -0,0 +1,203 @@
|
||||
<!--
|
||||
- Praktikum DBWT. Autoren:
|
||||
- Robert, Joel, 3672729
|
||||
- Şafak, Hazinedar, 3108590
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns="http://www.w3.org/1999/html">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Ihre E-Mensa</title>
|
||||
<style>
|
||||
* {
|
||||
font-family: Arial;
|
||||
}
|
||||
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: 200px auto 200px;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.speisen {
|
||||
border: solid;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.speisen td {
|
||||
border: solid;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.speisen td:not(:first-of-type) {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
p {
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
.zahlen {
|
||||
list-style-type: none;
|
||||
display: grid;
|
||||
grid-template-columns: auto auto auto;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.zahlen p {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.formular {
|
||||
display: grid;
|
||||
grid-template-columns: auto auto auto;
|
||||
justify-content: start;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.wichtig {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wichtigListe {
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.freude {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
footer {
|
||||
border-top: 1px solid;
|
||||
}
|
||||
|
||||
.fusszeile {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.fusszeile td:first-child {
|
||||
border-left: none;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.fusszeile td {
|
||||
border-left: 3px solid;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="grid">
|
||||
<div>
|
||||
<img src="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>
|
||||
<hr>
|
||||
<div class="grid">
|
||||
<div></div>
|
||||
<div>
|
||||
<img src="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>
|
||||
<table class="speisen">
|
||||
<tr class="speisen">
|
||||
<td></td>
|
||||
<td>Preis intern</td>
|
||||
<td>Preis extern</td>
|
||||
</tr>
|
||||
<tr class="speisen">
|
||||
<td>Rindfleich mit Bambus, Kaiserschoten und roter Paprika, dazu Mie Nudeln</td>
|
||||
<td>3,50</td>
|
||||
<td>6,20</td>
|
||||
</tr>
|
||||
<tr class="speisen">
|
||||
<td>Spinatrisotto mit kleinen Samosateigecken und gemischter Salat</td>
|
||||
<td>2,90</td>
|
||||
<td>5,30</td>
|
||||
</tr>
|
||||
<tr class="speisen">
|
||||
<td>...</td>
|
||||
<td>...</td>
|
||||
<td>...</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 id="zahlen">E-Mensa in Zahlen</h1>
|
||||
<div class="zahlen">
|
||||
<p>X Besuche</p>
|
||||
<p>Y Anmeldungen zum Newsletter</p>
|
||||
<p>Z Speisen</p>
|
||||
</div>
|
||||
<h1 id="kontakt">Interesse geweckt? Wir informieren</h1>
|
||||
<div class="formular">
|
||||
<div>
|
||||
<label for="name">Name</label> <br>
|
||||
<input type="text" name="name" id="name" placeholder="Bitte geben Sie Ihren Namen ein">
|
||||
</div>
|
||||
<div>
|
||||
<label for="mail">E-Mail</label> <br>
|
||||
<input type="text" name="name" id="mail" placeholder="Bitte geben Sie Ihren Namen ein">
|
||||
</div>
|
||||
<div>
|
||||
<label for="sprache">Newsletter bitte in</label> <br>
|
||||
<select name="sprache" id="sprache">
|
||||
<option value="deutsch">Deutsch</option>
|
||||
<option value="englisch">Englisch</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<input required type="checkbox" name="datenschutz" id="datenschutz"
|
||||
placeholder="Bitte geben Sie Ihren Namen ein">
|
||||
<label for="datenschutz">Den Datenschutzbestimmungen stimme ich zu</label>
|
||||
<button type="submit">Zum Newsletter anmelden</button>
|
||||
<h1 id="wichtig">Das ist uns wichtig</h1>
|
||||
<div class="wichtig">
|
||||
<ul class="wichtigListe">
|
||||
<li>Beste frische saisonale Zutaten</li>
|
||||
<li>Ausgewogen abwechslungsreiche Gerichte</li>
|
||||
<li>Sauberkeit</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h1 class="freude">Wir freuen uns auf Ihren Besuch!</h1>
|
||||
</div>
|
||||
</div>
|
||||
<footer>
|
||||
<table class="fusszeile">
|
||||
<tr>
|
||||
<td>(c) E-Mensa GmbH</td>
|
||||
<td>Şafak Hazinedar & Robert Joel</td>
|
||||
<td><a href="">Impressum</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
BIN
M1/Werbeseite/mensa21.jpg
Normal file
|
After Width: | Height: | Size: 153 KiB |
132
M1/beispiele/css_table.html
Normal file
@@ -0,0 +1,132 @@
|
||||
<!--
|
||||
- Praktikum DBWT. Autoren:
|
||||
- Robert, Joel, 3672729
|
||||
- Şafak, Hazinedar, 3108590
|
||||
-->
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>CSS Übung</title>
|
||||
<style>
|
||||
* {
|
||||
font-family: Arial;
|
||||
}
|
||||
|
||||
a {
|
||||
color: darkorange;
|
||||
font-weight: bold;
|
||||
text-decoration-line: none;
|
||||
}
|
||||
|
||||
p.center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
table {
|
||||
border: 3px solid #ecc3a4;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
td {
|
||||
border: 1px solid white;
|
||||
}
|
||||
|
||||
thead tr th {
|
||||
background: #faebd7;
|
||||
}
|
||||
|
||||
tbody tr:nth-child(even) {
|
||||
background: #faebd7;
|
||||
}
|
||||
|
||||
ol {
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
footer {
|
||||
border-top: 3px solid #ecc3a4;
|
||||
}
|
||||
|
||||
ul {
|
||||
float: right;
|
||||
}
|
||||
|
||||
ul li {
|
||||
display: inline;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
ul li:not(:first-child) {
|
||||
border-left: 3px solid #ecc3a4;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<div class="elektro zeile">
|
||||
<h1 id="elektro">Wofür steht das E in E-Mensa?</h1>
|
||||
<p>Am besten zeigt man das in einer <a href="#etabelle">Tabelle</a>.</p>
|
||||
<table id="etabelle">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Bedeutung</th>
|
||||
<th>Philosophie</th>
|
||||
<th>Beispiele</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Elektro</td>
|
||||
<td>Alles geht elektronisch</td>
|
||||
<td>
|
||||
<ol>
|
||||
<li class="pflicht">Bestellung digital</li>
|
||||
<li class="pflicht">Bezahlen digital</li>
|
||||
<li>Essen digital</li>
|
||||
<li>Spülen digital</li>
|
||||
</ol>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Extravagant</td>
|
||||
<td>Es gibt auch Ausgefallenes</td>
|
||||
<td><p>Wir sind die einzige Mensa weit und breit mit </p>
|
||||
<ol>
|
||||
<li class="pflicht">Vanillesauerkraut</li>
|
||||
<li class="pflicht">Bohnensenfbrot</li>
|
||||
<li>Habaneroeiscreme</li>
|
||||
<li>Bananengulasch</li>
|
||||
</ol>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Effizient</td>
|
||||
<td>Schnell, lecker und qualitativ</td>
|
||||
<td>
|
||||
<ol>
|
||||
<li class="pflicht">Frisch für Sie zubereitet, wann Sie es wollen</li>
|
||||
<li class="pflicht">Die Zutaten sind nachverfolgbar und immer tiefgekühlt</li>
|
||||
<li>Wir haben auch Samstags geöffnet. Sie sehen, wie effizient wir sind.</li>
|
||||
</ol>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="center">Da geht natürlich noch viel mehr, siehe nur <abbr title="Extra">E</abbr>.<br>Die Tabelle ist
|
||||
aber schon ganz schön imposant so oder?</p>
|
||||
</div>
|
||||
</main>
|
||||
<footer>
|
||||
<ul>
|
||||
<li>(c) DBWT</li>
|
||||
<li>Hilfe</li>
|
||||
<li>Datenschutz</li>
|
||||
<li>Impressum</li>
|
||||
</ul>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
BIN
M1/beispiele/img.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
M1/beispiele/logo-FH.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
50
M1/beispiele/m1_4a_textauszeichnung.html
Normal file
@@ -0,0 +1,50 @@
|
||||
<!--
|
||||
- Praktikum DBWT. Autoren:
|
||||
- Robert, Joel, 3672729
|
||||
- Şafak, Hazinedar, 3108590
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
Listen
|
||||
<ol>
|
||||
<li>a</li>
|
||||
<li>b</li>
|
||||
<li>c</li>
|
||||
</ol>
|
||||
<ul>
|
||||
<li>a</li>
|
||||
<li>b</li>
|
||||
<li>c</li>
|
||||
</ul>
|
||||
Schriften
|
||||
<br>
|
||||
<b>Fett</b>
|
||||
<i>Kursiv</i>
|
||||
<s>durchgestriche</s>
|
||||
<br>
|
||||
Linie
|
||||
<hr>
|
||||
<br>
|
||||
Überschriften
|
||||
<h1>H1</h1>
|
||||
<h2>H2</h2>
|
||||
<h3>H3</h3>
|
||||
<h4>H4</h4>
|
||||
<br>
|
||||
Exponent & Indizes
|
||||
<br>
|
||||
x<sup>2</sup> x<sub>2</sub>
|
||||
<br>
|
||||
Sonderzeichen
|
||||
<br>
|
||||
& < > "
|
||||
<br>
|
||||
Paragraph
|
||||
<p>Lorem Ipsum</p>
|
||||
</body>
|
||||
</html>
|
||||
44
M1/beispiele/m1_4b_tabelle.html
Normal file
@@ -0,0 +1,44 @@
|
||||
<!--
|
||||
- Praktikum DBWT. Autoren:
|
||||
- Robert, Joel, 3672729
|
||||
- Şafak, Hazinedar, 3108590
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Tabelle</title>
|
||||
</head>
|
||||
<body>
|
||||
<table border="solid">
|
||||
<tr>
|
||||
<th>Art</th>
|
||||
<th>Gericht</th>
|
||||
<th>Preis</th>
|
||||
<th>Werktag</th>
|
||||
<th>Wochenende</th>
|
||||
<th>Inhaltsstoffe</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Vegetarisch</td>
|
||||
<td>Kürbis-Chai-Teller</td>
|
||||
<td>2,10€</td>
|
||||
<td rowspan="2" colspan="2">Ganze Woche</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">Pasta</td>
|
||||
<td>Spaghetti Carciofo</td>
|
||||
<td>3,50€</td>
|
||||
<td>A,A1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bandnudeln</td>
|
||||
<td>3,50€</td>
|
||||
<td></td>
|
||||
<td>x</td>
|
||||
<td>A, D, A1</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
15
M1/beispiele/m1_4c_bild.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<!--
|
||||
- Praktikum DBWT. Autoren:
|
||||
- Robert, Joel, 3672729
|
||||
- Şafak, Hazinedar, 3108590
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Bild</title>
|
||||
</head>
|
||||
<body>
|
||||
<img src="logo-FH.png" alt="FH-Logo">
|
||||
</body>
|
||||
</html>
|
||||
19
M1/beispiele/m1_4d_links.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<!--
|
||||
- Praktikum DBWT. Autoren:
|
||||
- Robert, Joel, 3672729
|
||||
- Şafak, Hazinedar, 3108590
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Links</title>
|
||||
</head>
|
||||
<body>
|
||||
<a href="https://www.fh-aachen.de/">FH Aachen</a>
|
||||
<br>
|
||||
<a href="https://www.fh-aachen.de/" target="_blank">FH Aachen</a>
|
||||
<br>
|
||||
<a href="mailto:safak.hazinedar@alumni.fh-aachen.de">E-Mail</a>
|
||||
</body>
|
||||
</html>
|
||||
38
M1/beispiele/m1_4e_spandiv.html
Normal file
@@ -0,0 +1,38 @@
|
||||
<!--
|
||||
- Praktikum DBWT. Autoren:
|
||||
- Robert, Joel, 3672729
|
||||
- Şafak, Hazinedar, 3108590
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Span Div</title>
|
||||
</head>
|
||||
<body>
|
||||
<!-- <span style="background: beige"> -->
|
||||
<div style="color: darkorange">
|
||||
<p>
|
||||
<span style="background: aqua">Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
|
||||
sed diam nonumy eirmod tempor invidunt ut labore et dolore
|
||||
magna aliquyam erat, sed diam voluptua. </span> 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>
|
||||
<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.
|
||||
</p>
|
||||
<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.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
40
M1/beispiele/m1_8a_text.html
Normal file
@@ -0,0 +1,40 @@
|
||||
<!--
|
||||
- Praktikum DBWT. Autoren:
|
||||
- Robert, Joel, 3672729
|
||||
- Şafak, Hazinedar, 3108590
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial;
|
||||
|
||||
}
|
||||
h1 {
|
||||
text-decoration-line: underline;
|
||||
}
|
||||
.untertitel {
|
||||
font-style: italic;
|
||||
}
|
||||
.haupt {
|
||||
font-weight: bold;
|
||||
}
|
||||
.beilage {
|
||||
font-weight: normal;
|
||||
color: green;
|
||||
}
|
||||
</style>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Currywurst mit Pommes</h1>
|
||||
<h3 class="untertitel">Der Klassiker</h3>
|
||||
<ul class="haupt">
|
||||
<li>Bratwurst</li>
|
||||
<li class="beilage">Fritten</li>
|
||||
<li>Currysauce</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
45
M1/beispiele/m1_8b_layout.html
Normal file
@@ -0,0 +1,45 @@
|
||||
<!--
|
||||
- Praktikum DBWT. Autoren:
|
||||
- Robert, Joel, 3672729
|
||||
- Şafak, Hazinedar, 3108590
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<style>
|
||||
.grid-container1 {
|
||||
display: grid;
|
||||
grid-template-columns: 100px 100px 100px;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.grid-container2 {
|
||||
display: grid;
|
||||
grid-template-rows: 50px 50px 50px;
|
||||
}
|
||||
.grid-container3 {
|
||||
display: grid;
|
||||
justify-content: center;
|
||||
}
|
||||
.grid-item {
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<meta charset="UTF-8">
|
||||
<title>Grid</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="grid-container1">
|
||||
<p class="grid-item">Test</p>
|
||||
<p class="grid-item">Test</p>
|
||||
<p class="grid-item">Test</p>
|
||||
</div>
|
||||
<div class="grid-container2">
|
||||
<p class="grid-item">Test</p>
|
||||
<p class="grid-item">Test</p>
|
||||
<p class="grid-item">Test</p>
|
||||
</div>
|
||||
<div class="grid-container3">
|
||||
<p class="grid-item">Test</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
15
M1/beispiele/m1_ersteSeite.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<!--
|
||||
- Praktikum DBWT. Autoren:
|
||||
- Robert, Joel, 3672729
|
||||
- Şafak, Hazinedar, 3108590
|
||||
-->
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<title>Werbeseite</title>
|
||||
</head>
|
||||
<body>
|
||||
Inhalt der Werbeseite für die E-Mensa
|
||||
</body>
|
||||
</html>
|
||||
110
M1/beispiele/newsletteranmeldung.html
Normal file
@@ -0,0 +1,110 @@
|
||||
<!--
|
||||
- Praktikum DBWT. Autoren:
|
||||
- Robert, Joel, 3672729
|
||||
- Şafak, Hazinedar, 3108590
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Newsletteranmeldung</title>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" action="formadata.html">
|
||||
<fieldset>
|
||||
<legend>
|
||||
<h1>Anmeldung</h1>
|
||||
</legend>
|
||||
|
||||
<b>Anrede</b><br>
|
||||
|
||||
<input type="radio" name="anrede" value="frau">Frau <br>
|
||||
<input type="radio" name="anrede" value="herr">Herr<br>
|
||||
<br>
|
||||
<label for="vorname"><b>Vorname<sup>*</sup></b></label><br>
|
||||
<input type="text" name="vorname" id="vorname" placeholder="Vorname" required>
|
||||
<br><br>
|
||||
<label for="nachname"><b>Nachname<sup>*</sup></b></label><br>
|
||||
<input type="text" name="nachname" id="nachname" placeholder="Nachname" required>
|
||||
<br>
|
||||
<label for="email"><b>Email<sup>*</sup></b></label><br>
|
||||
<input type="email" name="email" id="email" placeholder="user@email.com" required>
|
||||
|
||||
<br><br>
|
||||
|
||||
<b>Benachrichtigungsinterval</b><br>
|
||||
<select name="interval">
|
||||
<option value="1">Täglich</option>
|
||||
<option value="2" selected>Wöchentlich</option>
|
||||
<option value="3">Monatlich</option>
|
||||
</select>
|
||||
|
||||
<br><br>
|
||||
|
||||
<input type="checkbox" required>Ich habe die Datenschutzhinweise gelesen<sup>*</sup>
|
||||
|
||||
<br><br>
|
||||
|
||||
<input type="submit" value="Zum Newsletter anmelden!">
|
||||
|
||||
<br><br>
|
||||
|
||||
Felder mit * sind Pflicht
|
||||
</fieldset>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!--
|
||||
Aufgabe 6
|
||||
Bib
|
||||
Request URL: https://www.fh-aachen.de/fh-aachen/hochschulstruktur/zentrale-betriebseinheiten/bibliothek
|
||||
Request Method: GET
|
||||
Status Code: 200 OK
|
||||
Remote Address: 149.201.122.100:443
|
||||
Referrer Policy: strict-origin-when-cross-origin
|
||||
Cache-Control: max-age=78453
|
||||
Connection: keep-alive
|
||||
Content-Encoding: gzip
|
||||
Content-Language: de Sprache
|
||||
Content-Length: 17579
|
||||
Content-Type: text/html; charset=utf-8
|
||||
Date: Wed, 18 Oct 2023 13:22:53 GMT Zeitpunkt der Anfrage
|
||||
Etag: "34fe7c7dd23fa1091245f8693488dc18"
|
||||
Expires: Thu, 19 Oct 2023 11:10:26 GMT
|
||||
Pragma: public
|
||||
Server: nginx/1.18.0 (Ubuntu)
|
||||
Strict-Transport-Security: max-age=31536000
|
||||
Vary: Accept-Encoding
|
||||
|
||||
Formular
|
||||
|
||||
Request URL: http://localhost:63342/M1/M1/beispiele/formadata.html
|
||||
Request Method: POST
|
||||
Status Code: 404 Not Found
|
||||
Remote Address: 127.0.0.1:63342
|
||||
Referrer Policy: strict-origin-when-cross-origin
|
||||
Access-Control-Allow-Credentials: true
|
||||
Access-Control-Allow-Origin: http://localhost:63342
|
||||
Content-Length: 92
|
||||
Content-Type: text/html
|
||||
Date: Wed, 18 Oct 2023 13:30:14 GMT
|
||||
Server: PhpStorm 2023.2.2
|
||||
Vary: origin
|
||||
X-Content-Type-Options: nosniff
|
||||
X-Frame-Options: SameOrigin
|
||||
X-Xss-Protection: 1; mode=block
|
||||
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8
|
||||
Accept-Encoding: gzip, deflate, br
|
||||
Accept-Language: de-DE,de
|
||||
Cache-Control: max-age=0
|
||||
Connection: keep-alive
|
||||
Content-Length: 67
|
||||
Content-Type: application/x-www-form-urlencoded
|
||||
Cookie: Phpstorm-dabb33c1=6794e646-30f2-42e3-ac04-b05acb4f79a9
|
||||
Dnt: 1
|
||||
Host: localhost:63342
|
||||
Origin: http://localhost:63342
|
||||
Referer: http://localhost:63342/M1/M1/beispiele/newsletteranmeldung.html?_ijt=dk0nu23t2f8uk826fkcqu2n7fn&_ij_reload=RELOAD_ON_SAVE
|
||||
|
||||
-->
|
||||
BIN
M1/dossier.xlsx
Normal file
@@ -1,10 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
Hello World
|
||||
</body>
|
||||
</html>
|
||||
1
M2/.idea/php.xml
generated
@@ -10,6 +10,7 @@
|
||||
<option name="highlightLevel" value="WARNING" />
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PhpProjectSharedConfiguration" php_language_level="8.0" />
|
||||
<component name="PhpStanOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
|
||||
21
M2/Beispiele/Test.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<?php
|
||||
$anweisung = 3;
|
||||
switch ($anweisung) {
|
||||
case 1:
|
||||
echo "catch _1_ !";
|
||||
break;
|
||||
case 2:
|
||||
echo "catch _2_ !";
|
||||
break;
|
||||
case 3:
|
||||
echo "catch _3_ !";
|
||||
default:
|
||||
echo "nothing to catch!";
|
||||
break;
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
1
M2/Beispiele/accesslog.txt
Normal file
@@ -0,0 +1 @@
|
||||
07.11.2023 - 13:02 | 127.0.0.1 | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0
|
||||
4
M2/Beispiele/en.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
Bewertung;Rating
|
||||
Name;Name
|
||||
Begründung;Reason
|
||||
Senden;Send
|
||||
3
M2/Beispiele/erstesphp.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
echo "Erstes PHP-Skript <br>";
|
||||
phpinfo();
|
||||
12
M2/Beispiele/m2_5a_standardparameter.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* Praktikum DBWT. Autoren:
|
||||
* Şafak, Hazinedar, 3108590
|
||||
* Robert, Joel, 3672729
|
||||
*/
|
||||
|
||||
function addieren(int $number1,int $number2=0){
|
||||
return $number1+$number2;
|
||||
}
|
||||
|
||||
?>
|
||||
13
M2/Beispiele/m2_5b_include.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
/**
|
||||
* Praktikum DBWT. Autoren:
|
||||
* Şafak, Hazinedar, 3108590
|
||||
* Robert, Joel, 3672729
|
||||
*/
|
||||
|
||||
include "m2_5a_standardparameter.php";
|
||||
|
||||
echo addieren(2,3)."<br>";
|
||||
echo addieren(50,10)."<br>";
|
||||
echo addieren(-2,3);
|
||||
?>
|
||||
53
M2/Beispiele/m2_5c_addform.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/**
|
||||
* Praktikum DBWT. Autoren:
|
||||
* Şafak, Hazinedar, 3108590
|
||||
* Robert, Joel, 3672729
|
||||
*/
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
if ($_POST['rechnen'] == 'Addieren') {
|
||||
|
||||
$number1 = $_POST['number1'];
|
||||
$number2 = $_POST['number2'];
|
||||
$ergebnis = $number1 + $number2;
|
||||
|
||||
} elseif ($_POST['rechnen'] == "Multiplizieren") {
|
||||
$number1 = $_POST['number1'];
|
||||
$number2 = $_POST['number2'];
|
||||
$ergebnis = $number1 * $number2;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<title>Addform</title>
|
||||
<style>
|
||||
* {
|
||||
font-family: Arial, serif;
|
||||
}
|
||||
.rating {
|
||||
color: darkgray;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form action="m2_5c_addform.php" method="post">
|
||||
<label for="number1">Erste Zahl:</label>
|
||||
<input id="number1" type="text" name="number1"/>
|
||||
<label for="number2">Zweite Zahl:</label>
|
||||
<input id="number2" type="text" name="number2"/>
|
||||
|
||||
<input type="Submit" name="rechnen" value="Addieren" />
|
||||
<input type="Submit" name="rechnen" value="Multiplizieren" />
|
||||
|
||||
<?php
|
||||
if(!empty($ergebnis))
|
||||
{
|
||||
echo "<br><br>Ergebnis: ".$ergebnis;
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
67
M2/Beispiele/m2_5d_array.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/**
|
||||
* Praktikum DBWT. Autoren:
|
||||
* Şafak, Hazinedar, 3108590
|
||||
* Robert, Joel, 3672729
|
||||
*/
|
||||
|
||||
function missingYear($famousMeals){
|
||||
$years = [];
|
||||
$winneryears = [];
|
||||
$ergebniss = [];
|
||||
for ($i = 0;$i <= 23; $i++){
|
||||
$years[] = 2000+$i;
|
||||
}
|
||||
|
||||
foreach ($famousMeals as $meal){
|
||||
if(gettype($meal["winner"])== "array"){
|
||||
foreach ($meal["winner"]as $year){
|
||||
$winneryears[] = $year;
|
||||
}
|
||||
}else{
|
||||
$winneryears[] = $year;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($years as $year){
|
||||
$a=0;
|
||||
foreach ($winneryears as $winners){
|
||||
if ($year == $winners){
|
||||
$a = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if($a==0){
|
||||
$ergebniss[]=$year;
|
||||
}
|
||||
}
|
||||
echo var_dump($ergebniss);
|
||||
}
|
||||
|
||||
$famousMeals = [
|
||||
1 => ['name' => 'Currywurst mit Pommes',
|
||||
'winner' => [2001, 2003, 2007, 2010, 2020]],
|
||||
2 => ['name' => 'Hähnchencrossies mit Paprikareis',
|
||||
'winner' => [2002, 2004, 2008]],
|
||||
3 => ['name' => 'Spaghetti Bolognese',
|
||||
'winner' => [2011, 2012, 2017]],
|
||||
4 => ['name' => 'Jägerschnitzel mit Pommes',
|
||||
'winner' => 2019]
|
||||
];
|
||||
echo "<ol>";
|
||||
foreach ($famousMeals as $meal){
|
||||
echo "<li>". $meal['name']."<br>";
|
||||
if(gettype($meal["winner"])== "array"){
|
||||
foreach ($meal["winner"]as $year){
|
||||
$dump[] = $year;
|
||||
}
|
||||
}else{
|
||||
$dump[] = $year;
|
||||
}
|
||||
echo implode( ', ', $dump);
|
||||
$dump = null;
|
||||
echo "</li><br>";
|
||||
}
|
||||
echo "</ol>";
|
||||
missingYear($famousMeals);
|
||||
?>
|
||||
16
M2/Beispiele/m2_7a_accesslog.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* Praktikum DBWT. Autoren:
|
||||
* Şafak, Hazinedar, 3108590
|
||||
* Robert, Joel, 3672729
|
||||
*/
|
||||
|
||||
$ip = $_SERVER['REMOTE_ADDR'];
|
||||
$agent = $_SERVER['HTTP_USER_AGENT'];
|
||||
|
||||
$logFile = fopen("accesslog.txt", "a");
|
||||
$time = time();
|
||||
$datum = date("d.m.Y - H:i", $time);
|
||||
$write = $datum." | ".$ip." | ".$agent."\n";
|
||||
fwrite($logFile, $write);
|
||||
?>
|
||||
41
M2/Beispiele/m2_7b_showtext.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* Praktikum DBWT. Autoren:
|
||||
* Şafak, Hazinedar, 3108590
|
||||
* Robert, Joel, 3672729
|
||||
*/
|
||||
|
||||
const GET_PARAM_SEARCH_TEXT = 'search_text';
|
||||
|
||||
$searchTerm = "";
|
||||
|
||||
if (!empty($_GET[GET_PARAM_SEARCH_TEXT])) {
|
||||
$searchTerm = $_GET[GET_PARAM_SEARCH_TEXT];
|
||||
|
||||
}
|
||||
|
||||
$enFile = fopen("en.txt", "r");
|
||||
$fileLines = [];
|
||||
while ($line = fgets($enFile)) {
|
||||
$fileLines[] = $line;
|
||||
}
|
||||
|
||||
foreach ($fileLines as $line){
|
||||
$lineArray[] = explode(' ', $line);
|
||||
//echo var_dump($lineArray);
|
||||
$deutsch = $lineArray[0][0];
|
||||
echo $line."|";
|
||||
if($deutsch==$searchTerm){
|
||||
echo "ja";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<form method="get">
|
||||
<label for="search_text">Suche:</label>
|
||||
<input id="search_text" type="text" name="search_text" value=<?php echo $searchTerm?>>
|
||||
<input type="submit" value="Suchen">
|
||||
</form>
|
||||
206
M2/Beispiele/meal.php
Normal file
@@ -0,0 +1,206 @@
|
||||
<?php
|
||||
const GET_PARAM_MIN_STARS = 'search_min_stars';
|
||||
const GET_PARAM_SEARCH_TEXT = 'search_text';
|
||||
const GET_PARAM_SHOW_DESCRIPTION = 'show_description';
|
||||
const GET_PARAM_SPRACHE = 'sprache';
|
||||
const GET_PARAM_TOP_FLOPP = 'top_flopp';
|
||||
/**
|
||||
* List of all allergens.
|
||||
*/
|
||||
$allergens = [
|
||||
11 => 'Gluten',
|
||||
12 => 'Krebstiere',
|
||||
13 => 'Eier',
|
||||
14 => 'Fisch',
|
||||
17 => 'Milch'
|
||||
];
|
||||
|
||||
$meal = [
|
||||
'name' => 'Süßkartoffeltaschen mit Frischkäse und Kräutern gefüllt',
|
||||
'description' => 'Die Süßkartoffeln werden vorsichtig aufgeschnitten und der Frischkäse eingefüllt.',
|
||||
'price_intern' => 2.90,
|
||||
'price_extern' => 3.90,
|
||||
'allergens' => [11, 13],
|
||||
'amount' => 42 // Number of available meals
|
||||
];
|
||||
|
||||
$ratings = [
|
||||
[ 'text' => 'Die Kartoffel ist einfach klasse. Nur die Fischstäbchen schmecken nach Käse. ',
|
||||
'author' => 'Ute U.',
|
||||
'stars' => 2 ],
|
||||
[ 'text' => 'Sehr gut. Immer wieder gerne',
|
||||
'author' => 'Gustav G.',
|
||||
'stars' => 4 ],
|
||||
[ 'text' => 'Der Klassiker für den Wochenstart. Frisch wie immer',
|
||||
'author' => 'Renate R.',
|
||||
'stars' => 4 ],
|
||||
[ 'text' => 'Kartoffel ist gut. Das Grüne ist mir suspekt.',
|
||||
'author' => 'Marta M.',
|
||||
'stars' => 3 ]
|
||||
];
|
||||
|
||||
$dic = [
|
||||
[ "Gericht" => "Gericht",
|
||||
"Allergien" => "Allergien",
|
||||
"Bewertungen" => "Bewertungen (Insgesamt: ",
|
||||
"Text" => "Text",
|
||||
"Sterne" => "Sterne",
|
||||
"Author" => "Author",
|
||||
"Preis" => "Preis",
|
||||
"Gaeste" => "Gäste"
|
||||
],
|
||||
[ "Gericht" => "Meal",
|
||||
"Allergien" => "Allergies",
|
||||
"Bewertungen" => "Review (overall: ",
|
||||
"Text" => "Text",
|
||||
"Sterne" => "Stars",
|
||||
"Author" => "Author",
|
||||
"Preis" => "Price",
|
||||
"Gaeste" => "Guests"
|
||||
]
|
||||
];
|
||||
|
||||
$translation = $dic[0];
|
||||
$language = "de";
|
||||
if (!empty($_GET[GET_PARAM_SPRACHE])){
|
||||
$language = $_GET[GET_PARAM_SPRACHE];
|
||||
}
|
||||
if($language == "en"){$translation = $dic[1];}
|
||||
|
||||
if (empty($_GET[GET_PARAM_SHOW_DESCRIPTION])){
|
||||
$meal['description'] = "";
|
||||
}
|
||||
|
||||
$searchTerm = "";
|
||||
$showRatings = [];
|
||||
if (!empty($_GET[GET_PARAM_SEARCH_TEXT])) {
|
||||
$searchTerm = $_GET[GET_PARAM_SEARCH_TEXT];
|
||||
foreach ($ratings as $rating) {
|
||||
if (strpos(strtolower($rating['text']), strtolower($searchTerm) )!== false) {
|
||||
$showRatings[] = $rating;
|
||||
}
|
||||
}
|
||||
} else if (!empty($_GET[GET_PARAM_MIN_STARS])) {
|
||||
$minStars = $_GET[GET_PARAM_MIN_STARS];
|
||||
foreach ($ratings as $rating) {
|
||||
if ($rating['stars'] >= $minStars) {
|
||||
$showRatings[] = $rating;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$showRatings = $ratings;
|
||||
}
|
||||
|
||||
if (!empty($_GET[GET_PARAM_TOP_FLOPP])){
|
||||
$flopp = $_GET[GET_PARAM_TOP_FLOPP];
|
||||
if($flopp == "flopp"){
|
||||
unset($showRatings);
|
||||
$showRatings=[];
|
||||
$stars=[];
|
||||
foreach ($ratings as $rating) {
|
||||
$stars[] = $rating["stars"];
|
||||
}
|
||||
$min = min($stars);
|
||||
foreach ($ratings as $rating) {
|
||||
if ($rating['stars'] == $min) {
|
||||
$showRatings[] = $rating;
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif ($flopp == "top"){
|
||||
unset($showRatings);
|
||||
$showRatings=[];
|
||||
$stars=[];
|
||||
foreach ($ratings as $rating) {
|
||||
$stars[] = $rating["stars"];
|
||||
}
|
||||
$min = max($stars);
|
||||
foreach ($ratings as $rating) {
|
||||
if ($rating['stars'] == $min) {
|
||||
$showRatings[] = $rating;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*:float gibt den return value der Funktion an
|
||||
*/
|
||||
function calcMeanStars (array $ratings) : float {
|
||||
$sum = 0;
|
||||
foreach ($ratings as $rating) {
|
||||
$sum += $rating['stars'] / count($ratings);
|
||||
}
|
||||
return $sum;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<title><?php echo $translation["Gericht"].": ". $meal['name']; ?></title>
|
||||
<style>
|
||||
* {
|
||||
font-family: Arial, serif;
|
||||
}
|
||||
.rating {
|
||||
color: darkgray;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1><?php echo $translation["Gericht"].": ". $meal['name']; ?></h1>
|
||||
<p><?php echo $meal['description']; ?>
|
||||
</p>
|
||||
|
||||
<h4><?php echo $translation["Preis"].":"?></h4>
|
||||
<p>
|
||||
<?php echo $translation["Preis"]." intern: ".$meal["price_intern"]."€";?> <br>
|
||||
<?php echo $translation["Preis"]." ".$translation["Gaeste"].": ".$meal["price_extern"]."€";?>
|
||||
</p>
|
||||
|
||||
<h4><?php echo $translation["Allergien"].":"?> </h4>
|
||||
<ul>
|
||||
<?php
|
||||
foreach ($meal['allergens'] as $all) {
|
||||
echo "<li>$allergens[$all]</li>";
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<h1><?php echo $translation["Bewertungen"].calcMeanStars($ratings); ?>)</h1>
|
||||
<!--Such form in den Bewertungen für den User -->
|
||||
<form method="get">
|
||||
<label for="search_text">Filter:</label>
|
||||
<input id="search_text" type="text" name="search_text" value=<?php echo $searchTerm?>>
|
||||
<input type="submit" value="Suchen">
|
||||
</form>
|
||||
<table class="rating">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?php echo $translation["Text"]?></td>
|
||||
<td><?php echo $translation["Sterne"]?></td>
|
||||
<td><?php echo $translation["Author"]?></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($showRatings as $rating) {
|
||||
echo "<tr><td class='rating_text'>{$rating['text']}</td>
|
||||
<td class='rating_stars'>{$rating['stars']}</td>
|
||||
<td class='rating_author'>{$rating['author']}</td>
|
||||
</tr>";
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<a href="?sprache=de">Deutsch</a> oder <a href="?sprache=en">English</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,10 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
Test
|
||||
</body>
|
||||
</html>
|
||||
1
M2/Werbeseite/besucher.txt
Normal file
@@ -0,0 +1 @@
|
||||
55
|
||||
BIN
M2/Werbeseite/fh-logo.jpg
Normal file
|
After Width: | Height: | Size: 64 KiB |
31
M2/Werbeseite/gerichte.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* Praktikum DBWT. Autoren:
|
||||
* Şafak, Hazinedar, 3108590
|
||||
* Robert, Joel, 3672729
|
||||
*/
|
||||
|
||||
|
||||
$gerichte = [
|
||||
1 => ['name' => 'Rindfleich mit Bambus, Kaiserschoten und roter Paprika, dazu Mie Nudeln',
|
||||
'priceint' => 3.50,
|
||||
"priceex" => 6.20,
|
||||
"img" =>"img/bambus.jpg"
|
||||
],
|
||||
2 => ['name' => 'Spinatrisotto mit kleinen Samosateigecken und gemischter Salat',
|
||||
'priceint' => 2.90,
|
||||
"priceex" => 5.30,
|
||||
"img" =>"img/risotto.jpg"
|
||||
],
|
||||
3 => ['name' => 'Spaghetti Bolognese',
|
||||
'priceint' => 3,
|
||||
"priceex" => 5,
|
||||
"img" =>"img/bolo.jpg"
|
||||
],
|
||||
4 => ['name' => 'Spaghetti Carbonara',
|
||||
'priceint' => 3,
|
||||
"priceex" => 5,
|
||||
"img" =>"img/carbonara.jpg"
|
||||
]
|
||||
]
|
||||
?>
|
||||
BIN
M2/Werbeseite/img/bambus.jpg
Normal file
|
After Width: | Height: | Size: 1.6 MiB |
BIN
M2/Werbeseite/img/bolo.jpg
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
M2/Werbeseite/img/carbonara.jpg
Normal file
|
After Width: | Height: | Size: 139 KiB |
BIN
M2/Werbeseite/img/risotto.jpg
Normal file
|
After Width: | Height: | Size: 103 KiB |
289
M2/Werbeseite/index.php
Normal file
@@ -0,0 +1,289 @@
|
||||
<?php
|
||||
/**
|
||||
* Praktikum DBWT. Autoren:
|
||||
* Şafak, Hazinedar, 3108590
|
||||
* Robert, Joel, 3672729
|
||||
*/
|
||||
|
||||
include "gerichte.php";
|
||||
|
||||
$besucherCount = 0;
|
||||
|
||||
if (file_exists("besucher.txt")) {
|
||||
$besucherFile = fopen("besucher.txt", "r");
|
||||
$besucherCount = fgets($besucherFile) + 1;
|
||||
fclose($besucherFile);
|
||||
$besucherFile = fopen("besucher.txt", "w");
|
||||
fwrite($besucherFile, $besucherCount);
|
||||
fclose($besucherFile);
|
||||
} else {
|
||||
$besucherFile = fopen("besucher.txt", "w");
|
||||
fwrite($besucherFile, 1);
|
||||
fclose($besucherFile);
|
||||
}
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
$name = $_POST['name'];
|
||||
$email = $_POST['email'];
|
||||
$language = $_POST['language'];
|
||||
$terms = $_POST['terms'];
|
||||
|
||||
$errors = array();
|
||||
|
||||
if (empty(trim($name))) {
|
||||
$errors[] = "Bitte geben Sie einen Namen ein.";
|
||||
}
|
||||
|
||||
if (!isset($terms)) {
|
||||
$errors[] = "Bitte stimmen Sie den Datenschutzbestimmungen zu.";
|
||||
}
|
||||
|
||||
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
|
||||
$errors[] = "Bitte geben Sie eine gültige E-Mail-Adresse ein.";
|
||||
}
|
||||
|
||||
$spam_domains = array("rcpt.at", "damnthespam.at", "wegwerfmail.de", "trashmail");
|
||||
|
||||
foreach ($spam_domains as $domain) {
|
||||
if (str_contains($email, $domain)) {
|
||||
$errors[] = "Bitte geben Sie eine gültige E-Mail-Adresse ein, keine Wegwerf- oder Spam-E-Mail-Adresse.";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($errors)) {
|
||||
$data = array(
|
||||
"name" => $name,
|
||||
"email" => $email,
|
||||
"language" => $language,
|
||||
"terms" => $terms
|
||||
);
|
||||
|
||||
$file = "subscriptions.json";
|
||||
$current_data = file_exists($file) ? json_decode(file_get_contents($file), true) : array();
|
||||
$current_data[] = $data;
|
||||
|
||||
if (file_put_contents($file, json_encode($current_data))) {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'alert("Vielen Dank für Ihre Anmeldung zum Newsletter.");';
|
||||
echo '</script>';
|
||||
} else {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'alert("Es gab einen Fehler bei Ihrer Anmeldung. Bitte versuchen Sie es erneut.");';
|
||||
echo '</script>';
|
||||
}
|
||||
} else {
|
||||
$error_string = "";
|
||||
foreach ($errors as $error) {
|
||||
$error_string .= $error . '\n';
|
||||
}
|
||||
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'alert("' . $error_string . '");';
|
||||
echo '</script>';
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns="http://www.w3.org/1999/html">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Ihre E-Mensa</title>
|
||||
<style>
|
||||
* {
|
||||
font-family: Arial;
|
||||
}
|
||||
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: 200px auto 200px;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.speisen {
|
||||
border: solid;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.speisen td {
|
||||
border: solid;
|
||||
border-collapse: collapse;
|
||||
border-radius: 4px;
|
||||
padding: 5px;
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.speisen td:not(:first-of-type) {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
p {
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
.zahlen {
|
||||
list-style-type: none;
|
||||
display: grid;
|
||||
grid-template-columns: auto auto auto;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.zahlen p {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.formular {
|
||||
display: grid;
|
||||
grid-template-columns: auto auto auto;
|
||||
justify-content: start;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.wichtig {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wichtigListe {
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.freude {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
footer {
|
||||
border-top: 1px solid;
|
||||
}
|
||||
|
||||
.fusszeile {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.fusszeile td:first-child {
|
||||
border-left: none;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.fusszeile td {
|
||||
border-left: 3px solid;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="grid">
|
||||
<div>
|
||||
<img src="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>
|
||||
<hr>
|
||||
<div class="grid">
|
||||
<div></div>
|
||||
<div>
|
||||
<img src="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>
|
||||
<table class="speisen">
|
||||
|
||||
<tr class="speisen">
|
||||
<td>Gerichte</td>
|
||||
<td>Preis intern</td>
|
||||
<td>Preis extern</td>
|
||||
<td>Bild</td>
|
||||
</tr>
|
||||
<?php
|
||||
/**
|
||||
* Speisekarte
|
||||
*/
|
||||
foreach ($gerichte as $gericht) {
|
||||
echo "<tr class=\"speisen\"><td>" . $gericht["name"] . "</td><td>" . $gericht["priceint"] . "</td><td>" . $gericht["priceex"] . "</td><td><img src=" . $gericht["img"] . " alt=" . $gericht["name"] . ">";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<h1 id="zahlen">E-Mensa in Zahlen</h1>
|
||||
<div class="zahlen">
|
||||
<p><?php echo $besucherCount; ?> Besuche</p>
|
||||
<p>Y Anmeldungen zum Newsletter</p>
|
||||
<p><?php echo count($gerichte); ?> Speisen</p>
|
||||
</div>
|
||||
<h1 id="kontakt">Interesse geweckt? Wir informieren</h1>
|
||||
|
||||
<form method="post">
|
||||
<div class="formular">
|
||||
<div>
|
||||
<label for="name">Name:</label> <br>
|
||||
<input type="text" name="name" id="name" placeholder="Bitte geben Sie Ihren Namen ein">
|
||||
</div>
|
||||
<div>
|
||||
<label for="email">E-Mail:</label> <br>
|
||||
<input type="email" name="email" id="email" placeholder="Bitte geben Sie Ihre E-Mail ein">
|
||||
</div>
|
||||
<div>
|
||||
<label for="language">Newsletter bitte in:</label> <br>
|
||||
<select name="language" id="language">
|
||||
<option value="deutsch">Deutsch</option>
|
||||
<option value="englisch">Englisch</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<input required type="checkbox" name="terms" id="terms">
|
||||
<label for="terms">Den Datenschutzbestimmungen stimme ich zu</label>
|
||||
<button type="submit">Zum Newsletter anmelden</button>
|
||||
</form>
|
||||
|
||||
|
||||
<h1 id="wichtig">Das ist uns wichtig</h1>
|
||||
<div class="wichtig">
|
||||
<ul class="wichtigListe">
|
||||
<li>Beste frische saisonale Zutaten</li>
|
||||
<li>Ausgewogen abwechslungsreiche Gerichte</li>
|
||||
<li>Sauberkeit</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h1 class="freude">Wir freuen uns auf Ihren Besuch!</h1>
|
||||
</div>
|
||||
</div>
|
||||
<footer>
|
||||
<table class="fusszeile">
|
||||
<tr>
|
||||
<td>(c) E-Mensa GmbH</td>
|
||||
<td>Şafak Hazinedar & Robert Joel</td>
|
||||
<td><a href="">Impressum</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
BIN
M2/Werbeseite/mensa21.jpg
Normal file
|
After Width: | Height: | Size: 153 KiB |
1
M2/Werbeseite/subscriptions.json
Normal file
@@ -0,0 +1 @@
|
||||
[{"name":"Max","email":"max@gmail.com","language":"deutsch","terms":"on"},{"name":"Max","email":"max@gmail.com","language":"deutsch","terms":"on"},{"name":"Max","email":"max@gmail.com","language":"deutsch","terms":"on"},{"name":"Max","email":"max@gmail.com","language":"deutsch","terms":"on"}]
|
||||
3
M2/beispiele/erstesphp.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
echo "Erstes PHP-Skript <br>";
|
||||
phpinfo();
|
||||