33 Commits

Author SHA1 Message Date
Robert
72ecc1e836 Final Abgabe 2 2023-11-10 16:27:12 +01:00
Robert
2cbfe5ee61 Final Abgabe 2 2023-11-10 15:21:47 +01:00
Robert
d98acc1ce0 Update 2023-11-10 15:20:26 +01:00
Robert
09d786ea9b Upate 2023-11-10 15:18:31 +01:00
Robert
9382b6375a Merge pull request #2 from S170H/dev/m2_safak
Dev/m2 safak
2023-11-10 15:02:46 +01:00
Robert
17646a1ecd 7 und 9 fertig 2023-11-10 14:58:27 +01:00
S170H
1b5faa0d69 M2 Aufgabe 8 2023-11-10 14:39:20 +01:00
S170H
daa8f95cb7 Merge remote-tracking branch 'origin/m2_Robert' into dev/m2_safak 2023-11-10 13:42:06 +01:00
Robert
59d1540de6 Aufgabe 9 fertig 2023-11-10 01:04:07 +01:00
Robert
217a13bd52 Aufgabe 7 1) fertig 2023-11-07 13:03:30 +01:00
Robert
0c360ccb99 Woche 1 fertig 2023-11-07 01:14:33 +01:00
Robert
d1ee9c1fb9 Bis 6. 3) 2023-11-07 01:02:40 +01:00
S170H
8b4c4c1c7f M2 1 2023-11-06 22:37:19 +01:00
Robert
f1831cc58d Anfang von 6 2. 2023-11-06 16:54:20 +01:00
Robert
b8c27e90ea Aufgabe 5 fertig 2023-11-06 16:44:01 +01:00
Robert
2539383e67 Edit Matrikel nummer bis 5 c) 2023-11-05 23:30:46 +01:00
Robert
fddeba1ce8 Bis 5c) 2023-11-05 23:25:53 +01:00
Robert
7d4ec262a5 Aufgabe 3 komplett 2023-11-05 21:45:35 +01:00
Robert
fc22cd51df Bis 3i) 2023-11-05 17:17:58 +01:00
Robert
c7e17faeaf Bis 3 d) 2023-10-31 17:11:44 +01:00
Robert
48cca528a8 Bis Aufgabe 3 1. 2023-10-31 14:39:05 +01:00
S170H
8f740feb3c Merge pull request #1 from S170H/dev/m1
martikelnummer
2023-10-24 15:19:06 +02:00
S170H
e4fdfbaff5 martikelnummer 2023-10-24 15:17:30 +02:00
S170H
f31f62bc7c dossier 2023-10-19 23:12:04 +02:00
S170H
8cb89a929c Finish 10, added Authors, minor corrections 2023-10-19 23:07:12 +02:00
S170H
4b85661745 Finish 9 2023-10-19 22:36:53 +02:00
S170H
826fb3ae54 Finish 8b 2023-10-18 17:20:55 +02:00
S170H
495b05491f Finish 6,7,8 2023-10-18 15:47:17 +02:00
S170H
5f96533f1f Finish 6,7,8 2023-10-18 15:46:23 +02:00
S170H
3e697d1be6 Finish 4 2023-10-18 15:13:23 +02:00
S170H
783d211254 4b 2023-10-16 20:15:04 +02:00
S170H
79f0d28cd3 zs 2023-10-16 19:35:17 +02:00
S170H
357ac646f3 Aufgabe 1 2023-10-16 18:27:26 +02:00
51 changed files with 1549 additions and 20 deletions

8
.idea/.gitignore generated vendored Normal file
View 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
View 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
View 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
View 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
View 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

Binary file not shown.

BIN
M1/M1.pdf Normal file

Binary file not shown.

BIN
M1/Werbeseite/fh-logo.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

203
M1/Werbeseite/index.html Normal file
View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

132
M1/beispiele/css_table.html Normal file
View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
M1/beispiele/logo-FH.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View 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>
&amp; &lt; &gt; &quot;
<br>
Paragraph
<p>Lorem Ipsum</p>
</body>
</html>

View 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&euro;</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&euro;</td>
<td>A,A1</td>
</tr>
<tr>
<td>Bandnudeln</td>
<td>3,50&euro;</td>
<td></td>
<td>x</td>
<td>A, D, A1</td>
</tr>
</table>
</body>
</html>

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

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

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

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

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

View 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&uuml;r die E-Mensa
</body>
</html>

View 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&#228;glich</option>
<option value="2" selected>W&#246;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

Binary file not shown.

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

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

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

@@ -0,0 +1,4 @@
Bewertung;Rating
Name;Name
Begründung;Reason
Senden;Send

View File

@@ -0,0 +1,3 @@
<?php
echo "Erstes PHP-Skript <br>";
phpinfo();

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

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

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

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

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

View File

@@ -0,0 +1,46 @@
<?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;
}
$found = false;
foreach ($fileLines as $line){
$lineArray[] = explode(';', $line);
$deutsch = $lineArray[0][0];
if(strtolower($deutsch)==strtolower($searchTerm)){
$found = true;
echo $searchTerm." bedeutet ".$lineArray[0][1];
}
unset($lineArray);
}
if(!$found){
if(!empty($searchTerm)){
echo "Das gesuchte Wort ".$searchTerm." ist nicht enthalten";
}
}
?>
<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
View 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>

BIN
M2/M2.pdf Normal file

Binary file not shown.

View File

@@ -1,10 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
Test
</body>
</html>

View File

@@ -0,0 +1 @@
64

BIN
M2/Werbeseite/fh-logo.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

BIN
M2/Werbeseite/img/bolo.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

308
M2/Werbeseite/index.php Normal file
View File

@@ -0,0 +1,308 @@
<?php
/**
* Praktikum DBWT. Autoren:
* Şafak, Hazinedar, 3108590
* Robert, Joel, 3672729
*/
include "gerichte.php";
$besucherCount = 0;
$newletterCount = 0;
//Besucher counter
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);
}
//Newletter counter
if (file_exists("newletter.txt")) {
$newsFile = fopen("newletter.txt", "r");
$newletterCount = fgets($newsFile);
fclose($newsFile);
} else {
$newsFile = fopen("newletter.txt", "w");
fwrite($newsFile, 0);
fclose($newsFile);
}
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>';
//Newsletter counter
$newletterCount++;
$newsFile = fopen("newletter.txt", "w");
fwrite($newsFile, $newletterCount);
fclose($newsFile);
} 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><?php echo $newletterCount; ?> 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

View File

@@ -0,0 +1 @@
1

View 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"},{"name":"Ro","email":"robert-joel@web.de","language":"deutsch","terms":"on"},{"name":"Robert","email":"robert-joel@web.de","language":"deutsch","terms":"on"}]

View File

@@ -0,0 +1,3 @@
<?php
echo "Erstes PHP-Skript <br>";
phpinfo();

BIN
M2/dossier M2.xlsx Normal file

Binary file not shown.