Webseite ohne Anmeldung läuft auf laravel
This commit is contained in:
0
M6/emensamobile/resources/css/app.css
Normal file
0
M6/emensamobile/resources/css/app.css
Normal file
96
M6/emensamobile/resources/css/style.css
Normal file
96
M6/emensamobile/resources/css/style.css
Normal file
@@ -0,0 +1,96 @@
|
||||
* {
|
||||
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: auto;
|
||||
}
|
||||
|
||||
.speisen td:not(:first-of-type) {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.speisen img{
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
1
M6/emensamobile/resources/js/app.js
Normal file
1
M6/emensamobile/resources/js/app.js
Normal file
@@ -0,0 +1 @@
|
||||
import './bootstrap';
|
||||
32
M6/emensamobile/resources/js/bootstrap.js
vendored
Normal file
32
M6/emensamobile/resources/js/bootstrap.js
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* We'll load the axios HTTP library which allows us to easily issue requests
|
||||
* to our Laravel back-end. This library automatically handles sending the
|
||||
* CSRF token as a header based on the value of the "XSRF" token cookie.
|
||||
*/
|
||||
|
||||
import axios from 'axios';
|
||||
window.axios = axios;
|
||||
|
||||
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||
|
||||
/**
|
||||
* Echo exposes an expressive API for subscribing to channels and listening
|
||||
* for events that are broadcast by Laravel. Echo and event broadcasting
|
||||
* allows your team to easily build robust real-time web applications.
|
||||
*/
|
||||
|
||||
// import Echo from 'laravel-echo';
|
||||
|
||||
// import Pusher from 'pusher-js';
|
||||
// window.Pusher = Pusher;
|
||||
|
||||
// window.Echo = new Echo({
|
||||
// broadcaster: 'pusher',
|
||||
// key: import.meta.env.VITE_PUSHER_APP_KEY,
|
||||
// cluster: import.meta.env.VITE_PUSHER_APP_CLUSTER ?? 'mt1',
|
||||
// wsHost: import.meta.env.VITE_PUSHER_HOST ? import.meta.env.VITE_PUSHER_HOST : `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`,
|
||||
// wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80,
|
||||
// wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443,
|
||||
// forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https',
|
||||
// enabledTransports: ['ws', 'wss'],
|
||||
// });
|
||||
@@ -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
|
||||
23
M6/emensamobile/resources/views/layouts/layout.blade.php
Normal file
23
M6/emensamobile/resources/views/layouts/layout.blade.php
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">
|
||||
@yield("cssextra")
|
||||
<meta name="theme-color" content="#dadada">
|
||||
<!-- good developers check the markup ;) -->
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
@yield("content")
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@yield("jsextra")
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,21 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="DE">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>{{ $title }}</title>
|
||||
|
||||
@yield("header")
|
||||
|
||||
<!-- good developers check the markup ;) -->
|
||||
</head>
|
||||
<body>
|
||||
@yield("body")
|
||||
|
||||
<footer>
|
||||
<table class="fusszeile">
|
||||
@yield("footer")
|
||||
</table>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,30 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="DE">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>{{ $title }}</title>
|
||||
|
||||
@yield("header")
|
||||
|
||||
<!-- good developers check the markup ;) -->
|
||||
</head>
|
||||
<body>
|
||||
@yield("nav")
|
||||
<hr>
|
||||
<div class="grid">
|
||||
<div></div>
|
||||
<div>
|
||||
@yield("text")
|
||||
|
||||
@yield("gerichte")
|
||||
</div>
|
||||
<div></div>
|
||||
</div>
|
||||
<footer>
|
||||
<table class="fusszeile">
|
||||
@yield("footer")
|
||||
</table>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
11
M6/emensamobile/resources/views/m5_a1/abmeldung.blade.php
Normal file
11
M6/emensamobile/resources/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=/" />
|
||||
|
||||
@endif
|
||||
|
||||
@endsection
|
||||
23
M6/emensamobile/resources/views/m5_a1/anmeldung.blade.php
Normal file
23
M6/emensamobile/resources/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 Es ist ein Fehler aufgetretten!
|
||||
@endif
|
||||
|
||||
@endsection
|
||||
@@ -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 Es ist ein Fehler aufgetretten!
|
||||
@endif
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,50 @@
|
||||
@extends("m5_a1.layout_anmeldung")
|
||||
|
||||
@section("main")
|
||||
|
||||
@if($anmeldung == 1)
|
||||
<meta http-equiv="refresh" content="/"/>
|
||||
<form id="form_ok" action="/"></form>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function formAutoSubmit() {
|
||||
|
||||
var frm = document.getElementById("form_ok");
|
||||
|
||||
frm.submit();
|
||||
|
||||
}
|
||||
|
||||
|
||||
window.onload = formAutoSubmit;
|
||||
|
||||
</script>
|
||||
@else
|
||||
|
||||
<form method="post" id="auto_form" action="/anmeldung_fehler">
|
||||
<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
|
||||
@@ -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>
|
||||
113
M6/emensamobile/resources/views/main/index.blade.php
Normal file
113
M6/emensamobile/resources/views/main/index.blade.php
Normal file
@@ -0,0 +1,113 @@
|
||||
@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>
|
||||
|
||||
@if(($_SESSION['login'] ?? NULL) == 0)
|
||||
<a href="/anmeldung">Anmelden</a>
|
||||
@else
|
||||
Angemeldet als:<br>
|
||||
<div>{{ $_SESSION['name'] }}</div>
|
||||
<a href="/abmeldung">Abmelden</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section("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>
|
||||
|
||||
@endsection
|
||||
|
||||
@section("gerichte")
|
||||
|
||||
|
||||
@if (isset($data['error']))
|
||||
<h1>Es gab ein Problem mit der Datenbankverbindung</h1>
|
||||
<p>Fehlermeldung</p>
|
||||
<pre> {{$data['beschreibung']}}</pre>
|
||||
|
||||
@else
|
||||
<?php
|
||||
//Daten vom Modell
|
||||
$result_sql_allergen = $data["result_sql_allergen"];
|
||||
$verwendete_allergene_code = $data["verwendete_allergene_code"];
|
||||
$result_sql_gerichte = $data["result_sql_gerichte"];
|
||||
$verwendete_allergene_string = $data["allergene"];
|
||||
$allergene = $data["allergene1"];
|
||||
|
||||
$tabelle = "<table class=\"speisen\"><tr class=\"speisen\"> <td>Gerichte</td><td>Preis intern</td><td>Preis extern</td><td>Bild</td></tr>";
|
||||
|
||||
|
||||
foreach ($result_sql_gerichte as $row_gerichte) {
|
||||
|
||||
$preisintern = number_format($row_gerichte->preisintern, 2, ',', '.');
|
||||
$preisextern = number_format($row_gerichte->preisextern, 2, ',', '.');
|
||||
|
||||
$bildname = $row_gerichte->bildname;
|
||||
|
||||
if ($bildname == Null) {
|
||||
$bildname = "00_image_missing.jpg";
|
||||
}
|
||||
|
||||
$bildname = "/img/gerichte/" . $bildname;
|
||||
|
||||
$tabelle .= "<tr class=\"speisen\"><td>" . htmlspecialchars($row_gerichte->name) . " <sup>" . htmlspecialchars($allergene) . "</sup></td><td>" . htmlspecialchars($preisintern) . "€</td><td>" . htmlspecialchars($preisextern) . "€</td><td> <img src=\"" . $bildname . "\" alt =\"Bild vom Gericht\" width= \"10\" height=\"10\"> </td></tr>";
|
||||
|
||||
|
||||
}
|
||||
$tabelle .= "</table>";
|
||||
|
||||
|
||||
foreach ($result_sql_allergen as $row_allergen) {
|
||||
foreach ($verwendete_allergene_code as $verwendet){
|
||||
if($row_allergen->code == $verwendet){
|
||||
$verwendete_allergene_string .= "<sup>" . htmlspecialchars($row_allergen->code) . "</sup> " . htmlspecialchars($row_allergen->name) . ", ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Ausgabe
|
||||
echo $tabelle;
|
||||
echo $verwendete_allergene_string;
|
||||
?>
|
||||
@endif
|
||||
|
||||
@endsection
|
||||
|
||||
@section("footer")
|
||||
|
||||
<tr>
|
||||
<td>(c) E-Mensa GmbH</td>
|
||||
<td>Şafak Hazinedar & Robert Joel</td>
|
||||
<td><a href="">Impressum</a></td>
|
||||
</tr>
|
||||
|
||||
@endsection
|
||||
7
M6/emensamobile/resources/views/welcome.blade.php
Normal file
7
M6/emensamobile/resources/views/welcome.blade.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
|
||||
<body class="antialiased">
|
||||
Moin
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user