Aufgabe 1 ca 80%
This commit is contained in:
@@ -2,9 +2,17 @@
|
||||
|
||||
@section("main")
|
||||
|
||||
@if($anmeldung == 1)
|
||||
@if($anmeldung == 1){
|
||||
<meta http-equiv="refresh" content="/"/>
|
||||
<form id="form_ok" action="/"></form>
|
||||
<?php if(session("bewertung",0)==0){
|
||||
echo "<form id=\"form_ok\" action=\"/\"></form>";
|
||||
}else{
|
||||
echo "<form id=\"form_ok\" action=\"/bewertung\"></form>";
|
||||
session(["bewertung" => 0]);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -19,7 +27,7 @@
|
||||
|
||||
window.onload = formAutoSubmit;
|
||||
|
||||
</script>
|
||||
</script>}
|
||||
@else
|
||||
|
||||
<form method="post" id="auto_form" action="/anmeldung_fehler">
|
||||
|
||||
106
M6/emensamobile/resources/views/main/bewertung.blade.php
Normal file
106
M6/emensamobile/resources/views/main/bewertung.blade.php
Normal file
@@ -0,0 +1,106 @@
|
||||
@extends("layouts.main_layout", ['title' => "E-Mensa"])
|
||||
<?php use Illuminate\Support\Facades\Session; ?>
|
||||
|
||||
@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("start",0)== 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")
|
||||
@if(isset($data))
|
||||
{{$id = $data["gerichtid"]}}
|
||||
@endif
|
||||
|
||||
@if(isset($gericht))
|
||||
<?php
|
||||
$gericht = $gericht[0];
|
||||
|
||||
$bildname = $gericht->bildname;
|
||||
|
||||
if ($bildname == Null) {
|
||||
$bildname = "00_image_missing.jpg";
|
||||
}
|
||||
|
||||
$bildname = "/img/gerichte/" . $bildname;
|
||||
|
||||
?>
|
||||
|
||||
<div class="grid_bewertung">
|
||||
<div>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<img class="bewertung" src="{{$bildname}}" alt="Bild vom Gericht" width= "10" height="10">
|
||||
</div>
|
||||
<div>
|
||||
<h1>{{$gericht->name}}</h1>
|
||||
|
||||
|
||||
<form action="/bewertung_abschicken" method="post">
|
||||
@method("post")
|
||||
@csrf <!-- {{ csrf_field() }} -->
|
||||
<label for="sterne">Sterne 1-4</label>
|
||||
<input id="sterne" name="sterne" type="number" placeholder="1-4" required maxlength="4">
|
||||
|
||||
<label for="Bemerkung">Bemerkung</label>
|
||||
<input id="bemerkung" name="bemerkung" type="text" placeholder="Bemerkung" required maxlength="200">
|
||||
|
||||
<input type="hidden" name="gericht_id" value={{ $id}}>
|
||||
|
||||
<button type="submit" >Bewerten</button>
|
||||
</form>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@else
|
||||
|
||||
|
||||
|
||||
@endif
|
||||
@endsection
|
||||
|
||||
@section("gerichte")
|
||||
|
||||
|
||||
@endsection
|
||||
|
||||
@section("footer")
|
||||
|
||||
<tr>
|
||||
<td>(c) E-Mensa GmbH</td>
|
||||
<td>Şafak Hazinedar & Robert Joel</td>
|
||||
<td><a href="">Impressum</a></td>
|
||||
</tr>
|
||||
|
||||
@endsection
|
||||
@@ -64,7 +64,14 @@
|
||||
$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>";
|
||||
$tabelle = "<table class=\"speisen\"><tr class=\"speisen\"> <td>Gerichte</td><td>Preis intern</td><td>Preis extern</td><td>Bild</td>";
|
||||
|
||||
if(session("start",0)== 1){
|
||||
$tabelle .= "<td>Bewerten</td></tr>";
|
||||
}
|
||||
else{
|
||||
$tabelle .= "</tr>";
|
||||
}
|
||||
|
||||
|
||||
foreach ($result_sql_gerichte as $row_gerichte) {
|
||||
@@ -80,8 +87,14 @@
|
||||
|
||||
$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 .= "<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>";
|
||||
|
||||
if(session("start",0)== 1){
|
||||
$tabelle .= "<td><a href=\"/bewertung?gerichtid=".$row_gerichte->id ."\">Bewerten</a></td></tr>";
|
||||
}
|
||||
else{
|
||||
$tabelle .= "</tr>";
|
||||
}
|
||||
|
||||
}
|
||||
$tabelle .= "</table>";
|
||||
|
||||
Reference in New Issue
Block a user