adsd
This commit is contained in:
@@ -1,6 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
use PDO;
|
|
||||||
|
|
||||||
if (!isset($_SESSION['user_id'])) {
|
if (!isset($_SESSION['user_id'])) {
|
||||||
redirect('/login');
|
redirect('/login');
|
||||||
}
|
}
|
||||||
@@ -114,38 +112,16 @@ $events = $stmt->fetchAll(PDO::FETCH_ASSOC) ?: [];
|
|||||||
<div class="card dash-card">
|
<div class="card dash-card">
|
||||||
<div class="badge">Profil</div>
|
<div class="badge">Profil</div>
|
||||||
<h3>Deine Angaben</h3>
|
<h3>Deine Angaben</h3>
|
||||||
<form method="post" class="stack gap-12">
|
<ul class="dash-list">
|
||||||
<input type="hidden" name="action" value="profile">
|
<li>Anzeigename: <?= htmlspecialchars($profile['display_name'], ENT_QUOTES) ?></li>
|
||||||
<div class="form-grid">
|
<li>Ort: <?= htmlspecialchars($profile['city'], ENT_QUOTES) ?> <?= htmlspecialchars($profile['zip'], ENT_QUOTES) ?></li>
|
||||||
<div class="stack gap-6">
|
<li>Beruf: <?= htmlspecialchars($profile['profession'], ENT_QUOTES) ?></li>
|
||||||
<label class="label" for="pName">Anzeigename</label>
|
<li>Sprachen: <?= htmlspecialchars($profile['languages'], ENT_QUOTES) ?></li>
|
||||||
<input id="pName" name="display_name" class="input" value="<?= htmlspecialchars($profile['display_name'], ENT_QUOTES) ?>">
|
<li>About: <?= htmlspecialchars($profile['about'], ENT_QUOTES) ?></li>
|
||||||
</div>
|
</ul>
|
||||||
<div class="stack gap-6">
|
<div class="flex gap-12" style="margin-top:12px;">
|
||||||
<label class="label" for="pCity">Ort</label>
|
<button class="btn" type="button" data-modal-open="modalProfile">Bearbeiten</button>
|
||||||
<input id="pCity" name="city" class="input" value="<?= htmlspecialchars($profile['city'], ENT_QUOTES) ?>">
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-grid">
|
|
||||||
<div class="stack gap-6">
|
|
||||||
<label class="label" for="pZip">PLZ</label>
|
|
||||||
<input id="pZip" name="zip" class="input" value="<?= htmlspecialchars($profile['zip'], ENT_QUOTES) ?>">
|
|
||||||
</div>
|
|
||||||
<div class="stack gap-6">
|
|
||||||
<label class="label" for="pProf">Beruf</label>
|
|
||||||
<input id="pProf" name="profession" class="input" value="<?= htmlspecialchars($profile['profession'], ENT_QUOTES) ?>">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="stack gap-6">
|
|
||||||
<label class="label" for="pLang">Sprachen</label>
|
|
||||||
<input id="pLang" name="languages" class="input" value="<?= htmlspecialchars($profile['languages'], ENT_QUOTES) ?>">
|
|
||||||
</div>
|
|
||||||
<div class="stack gap-6">
|
|
||||||
<label class="label" for="pAbout">Kurzvorstellung</label>
|
|
||||||
<textarea id="pAbout" name="about" class="textarea" rows="3"><?= htmlspecialchars($profile['about'], ENT_QUOTES) ?></textarea>
|
|
||||||
</div>
|
|
||||||
<button class="btn" type="submit">Speichern</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card dash-card">
|
<div class="card dash-card">
|
||||||
@@ -160,39 +136,9 @@ $events = $stmt->fetchAll(PDO::FETCH_ASSOC) ?: [];
|
|||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</ul>
|
</ul>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<form method="post" class="stack gap-12" style="margin-top:12px;">
|
<div class="flex gap-12" style="margin-top:12px;">
|
||||||
<input type="hidden" name="action" value="child_add">
|
<button class="btn" type="button" data-modal-open="modalChild">Kind hinzufügen</button>
|
||||||
<div class="form-grid">
|
</div>
|
||||||
<div class="stack gap-6">
|
|
||||||
<label class="label" for="cName">Vorname</label>
|
|
||||||
<input id="cName" name="first_name" class="input" required>
|
|
||||||
</div>
|
|
||||||
<div class="stack gap-6">
|
|
||||||
<label class="label" for="cGender">Geschlecht</label>
|
|
||||||
<select id="cGender" name="gender" class="select">
|
|
||||||
<option value="male">Männlich</option>
|
|
||||||
<option value="female">Weiblich</option>
|
|
||||||
<option value="diverse">Divers</option>
|
|
||||||
<option value="unknown">Unbekannt</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-grid">
|
|
||||||
<div class="stack gap-6">
|
|
||||||
<label class="label" for="cBirth">Geburtsdatum</label>
|
|
||||||
<input id="cBirth" name="birthdate" class="input" type="date">
|
|
||||||
</div>
|
|
||||||
<div class="stack gap-6">
|
|
||||||
<label class="label" for="cAge">Alter (Jahre)</label>
|
|
||||||
<input id="cAge" name="age_years" class="input" type="number" min="0" max="18">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="stack gap-6">
|
|
||||||
<label class="label" for="cNote">Notiz</label>
|
|
||||||
<input id="cNote" name="note" class="input">
|
|
||||||
</div>
|
|
||||||
<button class="btn" type="submit">Kind hinzufügen</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -216,6 +162,106 @@ $events = $stmt->fetchAll(PDO::FETCH_ASSOC) ?: [];
|
|||||||
<div class="card dash-card">
|
<div class="card dash-card">
|
||||||
<div class="badge">Eigenes Event</div>
|
<div class="badge">Eigenes Event</div>
|
||||||
<h3>Neuen Termin erstellen</h3>
|
<h3>Neuen Termin erstellen</h3>
|
||||||
|
<button class="btn" type="button" data-modal-open="modalEvent">Event anlegen</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Modals -->
|
||||||
|
<div class="modal" id="modalProfile">
|
||||||
|
<div class="panel">
|
||||||
|
<div class="head flex between center-y">
|
||||||
|
<h3>Profil bearbeiten</h3>
|
||||||
|
<button class="btn ghost" type="button" data-modal-close>✕</button>
|
||||||
|
</div>
|
||||||
|
<form method="post" class="stack gap-12">
|
||||||
|
<input type="hidden" name="action" value="profile">
|
||||||
|
<div class="form-grid">
|
||||||
|
<div class="stack gap-6">
|
||||||
|
<label class="label" for="pName">Anzeigename</label>
|
||||||
|
<input id="pName" name="display_name" class="input" value="<?= htmlspecialchars($profile['display_name'], ENT_QUOTES) ?>">
|
||||||
|
</div>
|
||||||
|
<div class="stack gap-6">
|
||||||
|
<label class="label" for="pCity">Ort</label>
|
||||||
|
<input id="pCity" name="city" class="input" value="<?= htmlspecialchars($profile['city'], ENT_QUOTES) ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-grid">
|
||||||
|
<div class="stack gap-6">
|
||||||
|
<label class="label" for="pZip">PLZ</label>
|
||||||
|
<input id="pZip" name="zip" class="input" value="<?= htmlspecialchars($profile['zip'], ENT_QUOTES) ?>">
|
||||||
|
</div>
|
||||||
|
<div class="stack gap-6">
|
||||||
|
<label class="label" for="pProf">Beruf</label>
|
||||||
|
<input id="pProf" name="profession" class="input" value="<?= htmlspecialchars($profile['profession'], ENT_QUOTES) ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="stack gap-6">
|
||||||
|
<label class="label" for="pLang">Sprachen</label>
|
||||||
|
<input id="pLang" name="languages" class="input" value="<?= htmlspecialchars($profile['languages'], ENT_QUOTES) ?>">
|
||||||
|
</div>
|
||||||
|
<div class="stack gap-6">
|
||||||
|
<label class="label" for="pAbout">Kurzvorstellung</label>
|
||||||
|
<textarea id="pAbout" name="about" class="textarea" rows="3"><?= htmlspecialchars($profile['about'], ENT_QUOTES) ?></textarea>
|
||||||
|
</div>
|
||||||
|
<div class="flex gap-12">
|
||||||
|
<button class="btn ghost" type="button" data-modal-close>Abbrechen</button>
|
||||||
|
<button class="btn" type="submit">Speichern</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal" id="modalChild">
|
||||||
|
<div class="panel">
|
||||||
|
<div class="head flex between center-y">
|
||||||
|
<h3>Kind hinzufügen</h3>
|
||||||
|
<button class="btn ghost" type="button" data-modal-close>✕</button>
|
||||||
|
</div>
|
||||||
|
<form method="post" class="stack gap-12">
|
||||||
|
<input type="hidden" name="action" value="child_add">
|
||||||
|
<div class="form-grid">
|
||||||
|
<div class="stack gap-6">
|
||||||
|
<label class="label" for="cName">Vorname</label>
|
||||||
|
<input id="cName" name="first_name" class="input" required>
|
||||||
|
</div>
|
||||||
|
<div class="stack gap-6">
|
||||||
|
<label class="label" for="cGender">Geschlecht</label>
|
||||||
|
<select id="cGender" name="gender" class="select">
|
||||||
|
<option value="male">Männlich</option>
|
||||||
|
<option value="female">Weiblich</option>
|
||||||
|
<option value="diverse">Divers</option>
|
||||||
|
<option value="unknown">Unbekannt</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-grid">
|
||||||
|
<div class="stack gap-6">
|
||||||
|
<label class="label" for="cBirth">Geburtsdatum</label>
|
||||||
|
<input id="cBirth" name="birthdate" class="input" type="date">
|
||||||
|
</div>
|
||||||
|
<div class="stack gap-6">
|
||||||
|
<label class="label" for="cAge">Alter (Jahre)</label>
|
||||||
|
<input id="cAge" name="age_years" class="input" type="number" min="0" max="18">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="stack gap-6">
|
||||||
|
<label class="label" for="cNote">Notiz</label>
|
||||||
|
<input id="cNote" name="note" class="input">
|
||||||
|
</div>
|
||||||
|
<div class="flex gap-12">
|
||||||
|
<button class="btn ghost" type="button" data-modal-close>Abbrechen</button>
|
||||||
|
<button class="btn" type="submit">Speichern</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal" id="modalEvent">
|
||||||
|
<div class="panel">
|
||||||
|
<div class="head flex between center-y">
|
||||||
|
<h3>Neues Event</h3>
|
||||||
|
<button class="btn ghost" type="button" data-modal-close>✕</button>
|
||||||
|
</div>
|
||||||
<form class="stack gap-12" style="margin-top: 10px;" method="post" action="/dashboard#events">
|
<form class="stack gap-12" style="margin-top: 10px;" method="post" action="/dashboard#events">
|
||||||
<input type="hidden" name="action" value="event_add">
|
<input type="hidden" name="action" value="event_add">
|
||||||
<div class="form-grid">
|
<div class="form-grid">
|
||||||
@@ -238,7 +284,7 @@ $events = $stmt->fetchAll(PDO::FETCH_ASSOC) ?: [];
|
|||||||
<input id="evDate" name="starts_at" class="input" type="datetime-local" required>
|
<input id="evDate" name="starts_at" class="input" type="datetime-local" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="stack gap-6">
|
<div class="stack gap-6">
|
||||||
<label class="label" for="evLoc">Ort/Label</label>
|
<label class="label" for "evLoc">Ort/Label</label>
|
||||||
<input id="evLoc" name="location_label" class="input" placeholder="Park / Café">
|
<input id="evLoc" name="location_label" class="input" placeholder="Park / Café">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -268,8 +314,32 @@ $events = $stmt->fetchAll(PDO::FETCH_ASSOC) ?: [];
|
|||||||
<label class="label" style="display:flex; align-items:center; gap:8px;">
|
<label class="label" style="display:flex; align-items:center; gap:8px;">
|
||||||
<input type="checkbox" name="allow_kids" checked> Kinder erlaubt
|
<input type="checkbox" name="allow_kids" checked> Kinder erlaubt
|
||||||
</label>
|
</label>
|
||||||
<button class="btn" type="submit">Event anlegen</button>
|
<div class="flex gap-12">
|
||||||
|
<button class="btn ghost" type="button" data-modal-close>Abbrechen</button>
|
||||||
|
<button class="btn" type="submit">Event anlegen</button>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.querySelectorAll('[data-modal-open]').forEach(btn => {
|
||||||
|
btn.addEventListener('click', () => {
|
||||||
|
const id = btn.getAttribute('data-modal-open');
|
||||||
|
const modal = document.getElementById(id);
|
||||||
|
if (modal) modal.classList.add('open');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
document.querySelectorAll('[data-modal-close]').forEach(btn => {
|
||||||
|
btn.addEventListener('click', () => {
|
||||||
|
const modal = btn.closest('.modal');
|
||||||
|
if (modal) modal.classList.remove('open');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
document.querySelectorAll('.modal').forEach(modal => {
|
||||||
|
modal.addEventListener('click', (e) => {
|
||||||
|
if (e.target === modal) modal.classList.remove('open');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user