Implement Bandreservierung Plattform
This commit is contained in:
@@ -1,323 +1,111 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
require_once __DIR__ . '/includes/auth.php';
|
||||
|
||||
date_default_timezone_set('Europe/Berlin');
|
||||
|
||||
$now = new DateTimeImmutable('now');
|
||||
$dayOfYear = (int) $now->format('z') + 1;
|
||||
$weekOfYear = (int) $now->format('W');
|
||||
$swatchBeats = (int) floor((($now->getTimestamp() % 86400) / 86.4));
|
||||
$moonPhase = (int) floor((($now->getTimestamp() / 2551443) - floor($now->getTimestamp() / 2551443)) * 100);
|
||||
|
||||
$worldCities = [
|
||||
['label' => 'Berlin', 'zone' => 'Europe/Berlin'],
|
||||
['label' => 'Tokyo', 'zone' => 'Asia/Tokyo'],
|
||||
['label' => 'San Francisco', 'zone' => 'America/Los_Angeles'],
|
||||
['label' => 'São Paulo', 'zone' => 'America/Sao_Paulo'],
|
||||
['label' => 'Kapstadt', 'zone' => 'Africa/Johannesburg'],
|
||||
$filters = [
|
||||
'genre' => $_GET['genre'] ?? '',
|
||||
'city' => $_GET['city'] ?? '',
|
||||
];
|
||||
|
||||
$worldTimes = array_map(
|
||||
static function (array $city): array {
|
||||
$dt = new DateTimeImmutable('now', new DateTimeZone($city['zone']));
|
||||
return [
|
||||
'label' => $city['label'],
|
||||
'time' => $dt->format('H:i'),
|
||||
'date' => $dt->format('d.m.Y'),
|
||||
'weekday' => $dt->format('l'),
|
||||
'offset' => $dt->format('P'),
|
||||
];
|
||||
},
|
||||
$worldCities
|
||||
);
|
||||
|
||||
$timeline = [];
|
||||
for ($i = 1; $i <= 5; $i++) {
|
||||
$future = $now->modify('+' . $i * 37 . ' minutes');
|
||||
$timeline[] = [
|
||||
'label' => "+" . $i * 37 . " min",
|
||||
'time' => $future->format('H:i'),
|
||||
'micro' => $future->format('s.u'),
|
||||
'iso' => $future->format(DateTimeInterface::ATOM),
|
||||
];
|
||||
}
|
||||
|
||||
$startMillis = (int) round(((float) $now->format('U.u')) * 1000);
|
||||
$bands = allBands($filters);
|
||||
$settings = settings();
|
||||
$user = currentUser();
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Hypermodern Temporal Hub</title>
|
||||
<title><?= SITE_NAME ?> – Bands buchen</title>
|
||||
<link rel="stylesheet" href="assets/css/style.css">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&family=IBM+Plex+Mono:wght@400;600&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
:root {
|
||||
color-scheme: dark;
|
||||
--bg: radial-gradient(circle at 20% 20%, #1d1646 0%, #05000f 60%, #020203 100%);
|
||||
--card: rgba(13, 6, 30, 0.8);
|
||||
--stroke: rgba(255, 255, 255, 0.12);
|
||||
--glow: #74f9ff;
|
||||
--accent: #ff43c1;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
|
||||
min-height: 100vh;
|
||||
background: var(--bg);
|
||||
color: #f5f5ff;
|
||||
padding: clamp(1rem, 3vw, 4rem);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2rem;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
font-size: clamp(2.2rem, 4vw, 3.8rem);
|
||||
margin: 0 0 0.3rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.1em;
|
||||
}
|
||||
|
||||
header p {
|
||||
margin: 0;
|
||||
max-width: 520px;
|
||||
color: rgba(255, 255, 255, 0.75);
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
||||
gap: 1.2rem;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: var(--card);
|
||||
border: 1px solid var(--stroke);
|
||||
border-radius: 20px;
|
||||
padding: 1.5rem;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.card::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: radial-gradient(circle at top right, rgba(255,67,193,0.35), transparent 45%);
|
||||
opacity: 0.5;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.card h2 {
|
||||
margin: 0 0 0.8rem;
|
||||
font-size: 1rem;
|
||||
letter-spacing: 0.3em;
|
||||
font-weight: 600;
|
||||
color: var(--glow);
|
||||
}
|
||||
|
||||
.primary-time {
|
||||
font-size: clamp(3rem, 8vw, 4.5rem);
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.08em;
|
||||
}
|
||||
|
||||
.primary-date {
|
||||
font-family: 'IBM Plex Mono', monospace;
|
||||
color: rgba(255,255,255,0.8);
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.metrics {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 1rem;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.metric {
|
||||
flex: 1;
|
||||
min-width: 120px;
|
||||
}
|
||||
|
||||
.metric span {
|
||||
display: block;
|
||||
font-family: 'IBM Plex Mono', monospace;
|
||||
color: rgba(255,255,255,0.6);
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.metric strong {
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
|
||||
ul.timeline {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
ul.timeline li {
|
||||
background: rgba(255,255,255,0.04);
|
||||
border: 1px solid rgba(255,255,255,0.1);
|
||||
border-radius: 16px;
|
||||
padding: 0.9rem;
|
||||
font-family: 'IBM Plex Mono', monospace;
|
||||
}
|
||||
|
||||
ul.timeline li span {
|
||||
display: block;
|
||||
color: rgba(255,255,255,0.6);
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.worldtime {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.8rem;
|
||||
}
|
||||
|
||||
.city {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-family: 'IBM Plex Mono', monospace;
|
||||
border-bottom: 1px solid rgba(255,255,255,0.1);
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.city:last-child {
|
||||
border-bottom: none;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.city strong {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.city span {
|
||||
color: rgba(255,255,255,0.65);
|
||||
}
|
||||
|
||||
.nano-clock {
|
||||
font-family: 'IBM Plex Mono', monospace;
|
||||
font-size: 1.1rem;
|
||||
margin-top: 0.8rem;
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
footer {
|
||||
font-size: 0.8rem;
|
||||
color: rgba(255,255,255,0.55);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
body {
|
||||
padding: 1.2rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600&display=swap" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>Hypermodern Temporal Hub</h1>
|
||||
<p>Ein futuristisches Datums-Dashboard, das terrestrische, kosmische und spekulative Zeitsysteme in einem einzigen, vibrierenden Interface verschmilzt.</p>
|
||||
</header>
|
||||
|
||||
<section class="grid">
|
||||
<article class="card">
|
||||
<h2>JETZT</h2>
|
||||
<div class="primary-time" id="clock" aria-live="polite"><?= htmlspecialchars($now->format('H:i:s'), ENT_QUOTES, 'UTF-8'); ?></div>
|
||||
<div class="primary-date">Tag <?= $dayOfYear; ?> · Woche <?= $weekOfYear; ?> · ISO <?= htmlspecialchars($now->format(DateTimeInterface::ATOM), ENT_QUOTES, 'UTF-8'); ?></div>
|
||||
<div class="nano-clock" id="nano">µ<?= $now->format('u'); ?></div>
|
||||
<div class="metrics">
|
||||
<div class="metric">
|
||||
<span>Swatch Beats</span>
|
||||
<strong>@<?= str_pad((string) $swatchBeats, 3, '0', STR_PAD_LEFT); ?></strong>
|
||||
</div>
|
||||
<div class="metric">
|
||||
<span>Gravitationsphase</span>
|
||||
<strong><?= $moonPhase; ?>%</strong>
|
||||
</div>
|
||||
<div class="metric">
|
||||
<span>Unix-Epoche</span>
|
||||
<strong><?= number_format($now->getTimestamp(), 0, ',', '.'); ?></strong>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<article class="card">
|
||||
<h2>WELTWELLEN</h2>
|
||||
<div class="worldtime">
|
||||
<?php foreach ($worldTimes as $city): ?>
|
||||
<div class="city">
|
||||
<div>
|
||||
<strong><?= htmlspecialchars($city['label'], ENT_QUOTES, 'UTF-8'); ?></strong>
|
||||
<span><?= htmlspecialchars($city['weekday'], ENT_QUOTES, 'UTF-8'); ?> · <?= htmlspecialchars($city['date'], ENT_QUOTES, 'UTF-8'); ?></span>
|
||||
</div>
|
||||
<div>
|
||||
<strong><?= htmlspecialchars($city['time'], ENT_QUOTES, 'UTF-8'); ?></strong>
|
||||
<span><?= htmlspecialchars($city['offset'], ENT_QUOTES, 'UTF-8'); ?></span>
|
||||
</div>
|
||||
<header>
|
||||
<nav class="badge-list" style="justify-content: flex-end;">
|
||||
<?php if ($user): ?>
|
||||
<span class="badge">Hallo <?= htmlspecialchars($user['name']) ?></span>
|
||||
<a class="badge" href="profil.php">Mein Profil</a>
|
||||
<?php if ($user['role'] === 'admin'): ?>
|
||||
<a class="badge" href="admin/dashboard.php">Admin</a>
|
||||
<?php endif; ?>
|
||||
<a class="badge" href="login.php?action=logout">Logout</a>
|
||||
<?php else: ?>
|
||||
<a class="badge" href="login.php">Login / Registrieren</a>
|
||||
<?php endif; ?>
|
||||
</nav>
|
||||
<section class="hero">
|
||||
<div>
|
||||
<p class="badge">Schritt 3 · Frontend Release</p>
|
||||
<h1>Finde deine <span style="color: var(--primary);">Funky Liveband</span></h1>
|
||||
<p>GetYourBand bringt verifizierte Live-Acts mit Veranstalter:innen in der ganzen Schweiz zusammen. Mit Bewertungen,
|
||||
moderner Suche und aktivierbarer Vermittlungsgebühr.</p>
|
||||
<div class="badge-list">
|
||||
<span class="badge">Bewertungen geprüft</span>
|
||||
<span class="badge badge-rating">PayPal <?= $settings['paypal_enabled'] === '1' ? 'aktiv' : 'optional' ?></span>
|
||||
<span class="badge">Service Fee <?= htmlspecialchars($settings['service_fee']) ?>%</span>
|
||||
</div>
|
||||
</div>
|
||||
<form class="search-panel" method="get" data-filter-form>
|
||||
<div>
|
||||
<label for="genre">Stil / Genre</label>
|
||||
<input type="text" id="genre" name="genre" value="<?= htmlspecialchars($filters['genre']) ?>" placeholder="Funk, Party, Jazz">
|
||||
</div>
|
||||
<div>
|
||||
<label for="city">Ort / PLZ</label>
|
||||
<input type="text" id="city" name="city" value="<?= htmlspecialchars($filters['city']) ?>" placeholder="Zürich, Basel">
|
||||
</div>
|
||||
<div>
|
||||
<label> </label>
|
||||
<button type="submit" class="btn-primary">Filtern</button>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</header>
|
||||
<main>
|
||||
<h2>Aktive Bands (<?= count($bands) ?>)</h2>
|
||||
<section class="band-grid">
|
||||
<?php foreach ($bands as $band): $rating = averageRating((int) $band['id']); ?>
|
||||
<article class="band-card">
|
||||
<p class="badge"><?= htmlspecialchars($band['genre']) ?></p>
|
||||
<h3><?= htmlspecialchars($band['name']) ?></h3>
|
||||
<p class="card-meta">Standort: <?= htmlspecialchars($band['city'] ?? '–') ?></p>
|
||||
<p><?= htmlspecialchars($band['description']) ?></p>
|
||||
<p class="price-tag">ab <?= formatPrice((int) $band['price']) ?></p>
|
||||
<?php if ($rating): ?>
|
||||
<p class="card-meta">Bewertung: <?= $rating ?> ★</p>
|
||||
<?php endif; ?>
|
||||
<div class="badge-list">
|
||||
<?php foreach (array_filter(array_map('trim', explode(',', (string) $band['style_tags']))) as $tag): ?>
|
||||
<span class="badge">#<?= htmlspecialchars($tag) ?></span>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<p>
|
||||
<a class="btn-primary" href="band-detail.php?id=<?= (int) $band['id'] ?>">Band ansehen</a>
|
||||
</p>
|
||||
</article>
|
||||
<?php endforeach; ?>
|
||||
<?php if (!$bands): ?>
|
||||
<p>Keine Bands gefunden – ändere deine Filter.</p>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
</main>
|
||||
<footer>
|
||||
<div>
|
||||
<strong>Legal</strong><br>
|
||||
<a href="#">Datenschutz</a> · <a href="#">AGB</a>
|
||||
</div>
|
||||
</article>
|
||||
<div>
|
||||
<strong>Kontakt</strong><br>
|
||||
support@getyourband.ch
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<article class="card">
|
||||
<h2>TEMPORAL-LINSE</h2>
|
||||
<ul class="timeline">
|
||||
<?php foreach ($timeline as $moment): ?>
|
||||
<li>
|
||||
<span><?= htmlspecialchars($moment['label'], ENT_QUOTES, 'UTF-8'); ?></span>
|
||||
<strong><?= htmlspecialchars($moment['time'], ENT_QUOTES, 'UTF-8'); ?></strong>
|
||||
<span><?= htmlspecialchars($moment['micro'], ENT_QUOTES, 'UTF-8'); ?></span>
|
||||
<span><?= htmlspecialchars($moment['iso'], ENT_QUOTES, 'UTF-8'); ?></span>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<footer>
|
||||
Synchronisiert mit Serverzeit · Hypermodernität trifft Präzision auf <?= htmlspecialchars($now->format('d.m.Y'), ENT_QUOTES, 'UTF-8'); ?>.
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
const serverMillis = <?= json_encode($startMillis, JSON_THROW_ON_ERROR); ?>;
|
||||
const clientBoot = Date.now();
|
||||
const drift = serverMillis - clientBoot;
|
||||
const clock = document.getElementById('clock');
|
||||
const nano = document.getElementById('nano');
|
||||
|
||||
function pad(value, length = 2) {
|
||||
return String(value).padStart(length, '0');
|
||||
}
|
||||
|
||||
function tick() {
|
||||
const precise = new Date(Date.now() + drift);
|
||||
const hours = pad(precise.getHours());
|
||||
const minutes = pad(precise.getMinutes());
|
||||
const seconds = pad(precise.getSeconds());
|
||||
const millis = precise.getMilliseconds();
|
||||
clock.textContent = `${hours}:${minutes}:${seconds}`;
|
||||
nano.textContent = `µ${pad(millis, 3)}${String(Math.floor((millis / 1000) * 1000)).padStart(3, '0')}`;
|
||||
requestAnimationFrame(tick);
|
||||
}
|
||||
|
||||
tick();
|
||||
</script>
|
||||
<div class="cookie-banner">
|
||||
<p>Wir verwenden Cookies für Performance-Analysen. Mit Klick auf "Okay" akzeptierst du das.</p>
|
||||
<button class="btn-primary" data-cookie-accept>Okay!</button>
|
||||
</div>
|
||||
<script src="assets/js/app.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user