Compare commits
8 Commits
aa20731efc
...
main
Author | SHA1 | Date | |
---|---|---|---|
e426926692 | |||
07a56b31a6 | |||
3dc185b667 | |||
8cebf35c6d | |||
e5637d4929 | |||
c8499aa9d5 | |||
509c685d80 | |||
96e569c66d |
@@ -3,6 +3,7 @@ header {
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 100%;
|
||||
background-color: var(--brand-background);
|
||||
}
|
||||
|
||||
nav {
|
||||
|
@@ -18,6 +18,13 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn-link {
|
||||
text-decoration: underline;
|
||||
background-color: transparent;
|
||||
color: var(--brand-white);
|
||||
border: none;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: var(--brand-primary);
|
||||
border-radius: 3px;
|
||||
|
@@ -24,18 +24,23 @@ body {
|
||||
color: white;
|
||||
text-align: left;
|
||||
max-width: 1000px;
|
||||
margin: 0 auto;
|
||||
padding-left: 230px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.course-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 30px;
|
||||
margin: 0 auto;
|
||||
gap: 40px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 765px) {
|
||||
.course-grid{
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.course-card {
|
||||
background: var(--brand-white);
|
||||
border-radius: 12px;
|
||||
|
@@ -2,7 +2,6 @@
|
||||
background: #EB8202;
|
||||
color: #fff;
|
||||
padding: 1em;
|
||||
max-width: 300px;
|
||||
border-radius: 8px;
|
||||
font-family: sans-serif;
|
||||
margin-bottom: 1em;
|
||||
@@ -30,4 +29,4 @@
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
@@ -51,6 +51,12 @@ textarea {
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1024px) {
|
||||
.form-grid {
|
||||
grid-template-columns: repeat(1, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
.form-grid-3 {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
@@ -113,3 +119,9 @@ form .error {
|
||||
background: transparent!important;
|
||||
border: transparent!important;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 500px) {
|
||||
.input-transparent{
|
||||
display: none;
|
||||
}
|
||||
}
|
@@ -24,6 +24,7 @@ body {
|
||||
color: var(--brand-white);
|
||||
font-size: 15px;
|
||||
margin: 0;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
h1 {
|
||||
@@ -48,6 +49,13 @@ main {
|
||||
margin-top: 190px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1024px) {
|
||||
main{
|
||||
margin-top: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.msg {
|
||||
text-align: center;
|
||||
font-size: 17px;
|
||||
@@ -110,6 +118,14 @@ main {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 500px) {
|
||||
.d-flex-between{
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
gap: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.hover:hover {
|
||||
opacity: 0.75;
|
||||
text-decoration: none;
|
||||
|
@@ -7,25 +7,37 @@
|
||||
|
||||
/*** Container ***/
|
||||
|
||||
.container{
|
||||
.container {
|
||||
max-width: 90%;
|
||||
padding: 24px 42px 24px 42px;
|
||||
/* padding: 24px 42px 24px 42px; */
|
||||
margin: 0 auto;
|
||||
color: var(--brand-white);
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 500px) {
|
||||
.container {
|
||||
padding: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
.row {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
/*** Spaltendefinitionen Smartphone Ansicht ***/
|
||||
@media (max-width: 529px) {
|
||||
.col-s-12 {
|
||||
flex: 0 0 100%;
|
||||
}
|
||||
|
||||
|
||||
/*** Loesung Workshop-Seite ***/
|
||||
.textContent {
|
||||
padding: 15px 0 0 0;
|
||||
@@ -33,19 +45,22 @@
|
||||
}
|
||||
|
||||
/*** Spaltendefinitionen Tablet Ansicht ***/
|
||||
@media (min-width: 530px) {
|
||||
@media (min-width: 750px) {
|
||||
.col-m-1 {
|
||||
flex: 0 0 100%;
|
||||
}
|
||||
|
||||
.col-m-4 {
|
||||
flex: 0 0 33.3333333%;
|
||||
}
|
||||
|
||||
.col-m-6 {
|
||||
flex: 0 0 50%;
|
||||
}
|
||||
|
||||
.col-m-12 {
|
||||
flex: 0 0 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*** Spaltendefinitionen Desktop Ansicht ***/
|
||||
@@ -53,21 +68,35 @@
|
||||
.col-1 {
|
||||
flex: 0 0 8.3333333%;
|
||||
}
|
||||
|
||||
.col-3 {
|
||||
flex: 0 0 25%;
|
||||
}
|
||||
|
||||
.col-4 {
|
||||
flex: 0 0 33.3333333%;
|
||||
}
|
||||
|
||||
.col-card-4{
|
||||
flex: 1 1 calc((100% - (3 - 1) * 40px) / 3);
|
||||
}
|
||||
|
||||
.col-5 {
|
||||
flex: 0 0 41.6666667%;
|
||||
}
|
||||
|
||||
.col-6 {
|
||||
flex: 0 0 50%;
|
||||
}
|
||||
|
||||
.col-8 {
|
||||
flex: 0 0 66.66666667%;
|
||||
}
|
||||
|
||||
.col-9{
|
||||
flex: 0 0 75%;
|
||||
}
|
||||
|
||||
.col-12 {
|
||||
flex: 0 0 100%;
|
||||
}
|
||||
|
35
Controller/CourseController.php
Normal file
35
Controller/CourseController.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Blog\Controller;
|
||||
|
||||
use Blog\Model\CourseModel;
|
||||
|
||||
class CourseController{
|
||||
private $view;
|
||||
private $db;
|
||||
|
||||
public function __construct($view){
|
||||
$this->db = new CourseModel();
|
||||
$this->view = $view;
|
||||
}
|
||||
|
||||
public function showCourse(){
|
||||
$id = $_GET["courseId"] ?? null;
|
||||
if(!$id){
|
||||
header('Location: index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
$kurs = $this->db->getCourseById($id);
|
||||
if(!$kurs){
|
||||
new \Blog\Library\ErrorMsg("Kurs nicht gefunden");
|
||||
}
|
||||
|
||||
$this->view->setVars([
|
||||
"kurs" => $kurs
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -267,7 +267,7 @@ class UserController{
|
||||
|
||||
$currentUser = $this->db->getUserById($userId);
|
||||
if(!$currentUser){
|
||||
throw new \Exception("User nicht gefunden");
|
||||
new \Blog\Library\ErrorMsg("User nicht gefunden");
|
||||
}
|
||||
|
||||
$validData = [
|
||||
@@ -296,7 +296,7 @@ class UserController{
|
||||
|
||||
$currentUser = $this->db->getUserById($userId);
|
||||
if (!$currentUser) {
|
||||
throw new \Exception('User nicht gefunden');
|
||||
new \Blog\Library\ErrorMsg('User nicht gefunden');
|
||||
}
|
||||
|
||||
$submitted = [
|
||||
@@ -388,5 +388,20 @@ class UserController{
|
||||
|
||||
}
|
||||
|
||||
public function enroll() {
|
||||
$courseId = $_POST['id'] ?? null;
|
||||
$userId = $_SESSION['user_id'] ?? null;
|
||||
|
||||
if ($userId === null) {
|
||||
new \Blog\Library\ErrorMsg("Nicht eingeloggt.");
|
||||
}
|
||||
|
||||
if ($courseId === null) {
|
||||
new \Blog\Library\ErrorMsg("Kein Kurs ausgewählt");
|
||||
}
|
||||
|
||||
$this->db->enroll($courseId, $userId);
|
||||
|
||||
$this->view->setDoMethodName("showEnrollmentConfirmation");
|
||||
}
|
||||
}
|
24
Model/CourseModel.php
Normal file
24
Model/CourseModel.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Blog\Model;
|
||||
|
||||
use Blog\Model\Database;
|
||||
use PDOException;
|
||||
use Random\RandomException;
|
||||
|
||||
class CourseModel extends Database
|
||||
{
|
||||
public function getCourseById(string $id){
|
||||
$pdo = $this->linkDB();
|
||||
$sql = "SELECT k.id, k.name, k.preis, k.dauer, k.rabatt, k.kategorie, k.beschreibung, k.ort_id,
|
||||
o.stadt, o.strasse, o.plz, b.note, b.kommentar
|
||||
FROM kurs k
|
||||
JOIN ort o ON k.ort_id = o.id
|
||||
LEFT JOIN bewertungen AS b ON b.kurs_id = k.id
|
||||
WHERE k.id = :id";
|
||||
$sth = $pdo->prepare($sql);
|
||||
$sth->execute([':id' => $id]);
|
||||
$result = $sth->fetch(\PDO::FETCH_ASSOC);
|
||||
return $result ?? null;
|
||||
}
|
||||
}
|
@@ -190,7 +190,40 @@ class UserModel extends Database
|
||||
die;
|
||||
}
|
||||
}
|
||||
public function getAllCourses() {
|
||||
$pdo = $this->linkDB();
|
||||
$userId = $_SESSION['user_id'] ?? null;
|
||||
|
||||
if ($userId === null) {
|
||||
$sql = "SELECT
|
||||
k.id, k.name, k.preis, k.dauer, k.rabatt, k.kategorie, k.beschreibung, k.ort_id,
|
||||
o.stadt, o.strasse, o.plz, b.note, b.kommentar,
|
||||
0 AS isTeilnehmer
|
||||
FROM kurs AS k
|
||||
JOIN ort AS o ON o.id = k.ort_id
|
||||
LEFT JOIN bewertungen AS b ON b.kurs_id = k.id";
|
||||
$params = [];
|
||||
} else {
|
||||
$sql = "SELECT
|
||||
k.id, k.name, k.preis, k.dauer, k.rabatt, k.kategorie, k.beschreibung, k.ort_id,
|
||||
o.stadt, o.strasse, o.plz, b.note, b.kommentar,
|
||||
CASE WHEN ku.user_id IS NULL THEN 0 ELSE 1 END AS isTeilnehmer
|
||||
FROM kurs AS k
|
||||
JOIN ort AS o ON o.id = k.ort_id
|
||||
LEFT JOIN bewertungen AS b ON b.kurs_id = k.id
|
||||
LEFT JOIN kurs_user AS ku ON ku.kurs_id = k.id AND ku.user_id = :userId";
|
||||
$params = ['userId' => $userId];
|
||||
}
|
||||
|
||||
try {
|
||||
$sth = $pdo->prepare($sql);
|
||||
$sth->execute($params);
|
||||
return $sth->fetchAll(\PDO::FETCH_ASSOC);
|
||||
} catch (PDOException $e) {
|
||||
new \Blog\Library\ErrorMsg("Fehler beim Lesen der Daten.", $e);
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
||||
public function updateCourse($course) {
|
||||
$pdo = $this->linkDB();
|
||||
@@ -261,4 +294,35 @@ class UserModel extends Database
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function enroll($courseId, $userId) {
|
||||
$pdo = $this->linkDB();
|
||||
|
||||
try {
|
||||
$checkSql = "SELECT COUNT(*) FROM kurs_user WHERE user_id = :user_id AND kurs_id = :kurs_id";
|
||||
$checkStmt = $pdo->prepare($checkSql);
|
||||
$checkStmt->execute([
|
||||
':user_id' => $userId,
|
||||
':kurs_id' => $courseId
|
||||
]);
|
||||
|
||||
if ($checkStmt->fetchColumn() > 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$insertSql = "INSERT INTO kurs_user (user_id, kurs_id) VALUES (:user_id, :kurs_id)";
|
||||
$insertStmt = $pdo->prepare($insertSql);
|
||||
$insertStmt->execute([
|
||||
':user_id' => $userId,
|
||||
':kurs_id' => $courseId
|
||||
]);
|
||||
|
||||
} catch (PDOException $e) {
|
||||
new \Blog\Library\ErrorMsg("Fehler beim Einschreiben in den Kurs.", $e);
|
||||
die;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
20
Views/Course/showCourse.phtml
Normal file
20
Views/Course/showCourse.phtml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
include dirname(__DIR__).'/header.phtml';
|
||||
?>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<h1><?= htmlspecialchars($kurs['name']) ?></h1>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<p><strong>Bewertung:</strong> <?= $kurs['note'] ?> ★</p>
|
||||
<p><strong>Preis:</strong> <?= htmlspecialchars($kurs['preis']) ?>€</p>
|
||||
<p><strong>Adresse:</strong> <?= htmlspecialchars($kurs['strasse']) ?>, <?= htmlspecialchars($kurs['plz']) ?> <?= htmlspecialchars($kurs['stadt']) ?></p>
|
||||
<p><?= nl2br(htmlspecialchars($kurs['beschreibung'] ?? '')) ?></p>
|
||||
<a href="index.php">‹ Zurück zur Kursübersicht</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include dirname(__DIR__).'/footer.phtml'; ?>
|
12
Views/User/showEnrollmentConfirmation.phtml
Normal file
12
Views/User/showEnrollmentConfirmation.phtml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
include dirname(__DIR__).'/header.phtml';
|
||||
?>
|
||||
|
||||
<div class="msg">
|
||||
<p>Erfolgreich aufgenommen!</p>
|
||||
<a href="?controller=welcome">Weiter</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?php include dirname(__DIR__).'/footer.phtml'; ?>
|
@@ -1,11 +1,10 @@
|
||||
<?php
|
||||
include dirname(__DIR__) . '/header.phtml';
|
||||
|
||||
// Filter auslesen
|
||||
$rating = $_GET['rating'] ?? '';
|
||||
$price = $_GET['price'] ?? '';
|
||||
$location = $_GET['location'] ?? '';
|
||||
?>
|
||||
?>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
@@ -13,84 +12,41 @@ $location = $_GET['location'] ?? '';
|
||||
<h1 class="welcome-heading">KURSE & ERLEBNISSE JEDER ART</h1>
|
||||
<p class="welcome-subheading">Alle Kurse in deiner Nähe – auf einen Blick</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<div class="filter-box">
|
||||
<form method="get">
|
||||
<label for="rating">Bewertung:</label>
|
||||
<select name="rating" id="rating">
|
||||
<option value="">Alle</option>
|
||||
<option value="5" <?= $rating == '5' ? 'selected' : '' ?>>5 Sterne</option>
|
||||
<option value="4" <?= $rating == '4' ? 'selected' : '' ?>>4 Sterne+</option>
|
||||
<option value="3" <?= $rating == '3' ? 'selected' : '' ?>>3 Sterne+</option>
|
||||
</select>
|
||||
<div class="row">
|
||||
<div class="col-3 col-m-12">
|
||||
<div class="filter-box">
|
||||
<form method="get">
|
||||
<label for="rating">Bewertung:</label>
|
||||
<select name="rating" id="rating">
|
||||
<option value="">Alle</option>
|
||||
<option value="5" <?= $rating == '5' ? 'selected' : '' ?>>5 Sterne</option>
|
||||
<option value="4" <?= $rating == '4' ? 'selected' : '' ?>>4 Sterne+</option>
|
||||
<option value="3" <?= $rating == '3' ? 'selected' : '' ?>>3 Sterne+</option>
|
||||
</select>
|
||||
|
||||
<label for="price">Preis:</label>
|
||||
<select name="price" id="price">
|
||||
<option value="">Alle</option>
|
||||
<option value="asc" <?= $price == 'asc' ? 'selected' : '' ?>>Aufsteigend</option>
|
||||
<option value="desc" <?= $price == 'desc' ? 'selected' : '' ?>>Absteigend</option>
|
||||
</select>
|
||||
<button type="submit">Anwenden</button>
|
||||
</form>
|
||||
<label for="price">Preis:</label>
|
||||
<select name="price" id="price">
|
||||
<option value="">Alle</option>
|
||||
<option value="asc" <?= $price == 'asc' ? 'selected' : '' ?>>Aufsteigend</option>
|
||||
<option value="desc" <?= $price == 'desc' ? 'selected' : '' ?>>Absteigend</option>
|
||||
</select>
|
||||
<button type="submit">Anwenden</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-8">
|
||||
<!-- KURSLISTE -->
|
||||
<div class="course-grid row">
|
||||
<?php
|
||||
$kurse = [
|
||||
[
|
||||
'bewertung' => 5,
|
||||
'titel' => 'Marketing Pro',
|
||||
'adresse' => 'Bulu ulu Straße 17',
|
||||
'preis' => '59,99€',
|
||||
'ort' => '33333 Frankfurt',
|
||||
'leiter' => 'Max Mustermann'
|
||||
],
|
||||
[
|
||||
'bewertung' => 4,
|
||||
'titel' => 'Design Basics',
|
||||
'adresse' => 'Musterstraße 10',
|
||||
'preis' => '39,99€',
|
||||
'ort' => '10115 Berlin',
|
||||
'leiter' => 'Lisa Beispiel'
|
||||
],
|
||||
[
|
||||
'bewertung' => 5,
|
||||
'titel' => 'Excel Masterclass',
|
||||
'adresse' => 'Tabellenweg 5',
|
||||
'preis' => '49,99€',
|
||||
'ort' => '20457 Hamburg',
|
||||
'leiter' => 'Thomas Tabelle'
|
||||
],
|
||||
[
|
||||
'bewertung' => 5,
|
||||
'titel' => 'Excel Masterclass',
|
||||
'adresse' => 'Tabellenweg 5',
|
||||
'preis' => '49,99€',
|
||||
'ort' => '20457 Hamburg',
|
||||
'leiter' => 'Thomas Tabelle'
|
||||
],
|
||||
[
|
||||
'bewertung' => 5,
|
||||
'titel' => 'Excel Masterclass',
|
||||
'adresse' => 'Tabellenweg 5',
|
||||
'preis' => '49,99€',
|
||||
'ort' => '20457 Hamburg',
|
||||
'leiter' => 'Thomas Tabelle'
|
||||
],
|
||||
];
|
||||
<div class="col-9">
|
||||
<div class="course-grid row">
|
||||
<?php
|
||||
$userModel = new \Blog\Model\UserModel();
|
||||
$kurse = $userModel->getAllCourses();
|
||||
|
||||
// Filter anwenden
|
||||
$filteredKurse = array_filter($kurse, function($kurs) use ($rating, $location) {
|
||||
if ($rating && $kurs['bewertung'] < $rating) return false;
|
||||
if ($rating && $kurs['note'] < $rating) return false;
|
||||
if ($location && stripos($kurs['ort'], $location) === false) return false;
|
||||
return true;
|
||||
});
|
||||
|
||||
// Preise in Float umwandeln für Sortierung
|
||||
if ($price) {
|
||||
usort($filteredKurse, function($a, $b) use ($price) {
|
||||
$priceA = floatval(str_replace(',', '.', str_replace('€', '', $a['preis'])));
|
||||
@@ -99,29 +55,52 @@ $location = $_GET['location'] ?? '';
|
||||
});
|
||||
}
|
||||
|
||||
foreach ($filteredKurse as $kurs): ?>
|
||||
<div class="course-card col-4">
|
||||
<div class="course-image"></div>
|
||||
<div class="course-content">
|
||||
<div class="course-left">
|
||||
<div><?= $kurs['bewertung'] ?> ★</div>
|
||||
<div><?= $kurs['titel'] ?></div>
|
||||
<div>Kursleiter: <?= $kurs['leiter'] ?></div>
|
||||
<div><?= $kurs['adresse'] ?></div>
|
||||
$doc = new DOMDocument('1.0', 'UTF-8');
|
||||
|
||||
if (!empty($filteredKurse)) {
|
||||
foreach ($filteredKurse as $kurs) {
|
||||
foreach ($filteredKurse as $kurs) {
|
||||
$id = htmlspecialchars($kurs['id']);
|
||||
$note = htmlspecialchars($kurs['note'] ?? 'Keine Bewertung') . ' ★';
|
||||
$name = htmlspecialchars($kurs['name']);
|
||||
$address = htmlspecialchars($kurs['strasse'] . ', ' . $kurs['stadt'] . ' ' . $kurs['plz']);
|
||||
$preis = htmlspecialchars($kurs['preis']) . ' €';
|
||||
$kategorie = htmlspecialchars($kurs['kategorie'] ?? 'Keine Kategorie');
|
||||
|
||||
echo <<<HTML
|
||||
<a style="flex: 0 0 calc(50% - 20px);" href="?controller=course&do=showCourse&courseId=$id">
|
||||
<div class="course-card">
|
||||
<div class="course-image"></div>
|
||||
<div class="course-content">
|
||||
<div class="course-left">
|
||||
<div>$note</div>
|
||||
<div>$name</div>
|
||||
<div>$address</div>
|
||||
</div>
|
||||
<div class="course-right">
|
||||
<div>$preis</div>
|
||||
<div>$kategorie</div>
|
||||
<form method="POST" class="course-card-form">
|
||||
<input type="hidden" name="do" value="enroll">
|
||||
<input type="hidden" name="controller" value="user">
|
||||
<input type="hidden" name="id" value="$id">
|
||||
<button type="submit" class="btn-link">Teilnehmen</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="course-right">
|
||||
<div><?= $kurs['preis'] ?></div>
|
||||
<div><?= $kurs['ort'] ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
HTML;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo '<p>Keine Kurse gefunden.</p>';
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -14,25 +14,31 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<nav class="d-flex-between">
|
||||
<a id="logo" href="index.php">bib<span>course</span></a>
|
||||
<div style="column-gap: 8px;" class="d-flex-between">
|
||||
<div style="column-gap: 8px;" class="d-flex-between">
|
||||
<?php if (isset($_SESSION['user_id']) && $_SESSION['user_id'] !== null): ?>
|
||||
<a style="column-gap: 16px;" class="btn" href="?controller=User&do=showUserAccountPage">
|
||||
<?php echo ($_SESSION['vorname'] ?? "") . " " . ($_SESSION['name'] ?? "") . ", " . ($_SESSION['user_role']) ?>
|
||||
<span class="btn btn-user">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<header>
|
||||
<nav class="d-flex-between">
|
||||
<a id="logo" href="index.php">bib<span>course</span></a>
|
||||
<div style="column-gap: 8px;" class="d-flex-between">
|
||||
<div style="column-gap: 8px;" class="d-flex-between">
|
||||
<?php if (isset($_SESSION['user_id']) && $_SESSION['user_id'] !== null): ?>
|
||||
<a style="column-gap: 16px;" class="btn" href="?controller=User&do=showUserAccountPage">
|
||||
<?php echo ($_SESSION['vorname'] ?? "") . " " . ($_SESSION['name'] ?? "") . ", " . ($_SESSION['user_role']) ?>
|
||||
<span class="btn btn-user">
|
||||
<span class="material-icons">person</span>
|
||||
</span>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<a class="btn" href="?controller=User&do=showUserLoginForm">Anmeldung</a>
|
||||
<a class="btn btn-primary" href="?controller=User&do=showUserRegisterForm">Registration</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<a class="btn" href="?controller=User&do=showUserLoginForm">Anmeldung</a>
|
||||
<a class="btn btn-primary" href="?controller=User&do=showUserRegisterForm">Registration</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
</div>
|
||||
</div>
|
||||
<!-- TODO Transparent mit Fehleranzeige bei der Anmeldung -->
|
||||
<main>
|
Reference in New Issue
Block a user