139 lines
6.8 KiB
PHP
139 lines
6.8 KiB
PHP
<?php
|
|
require_once __DIR__ . '/db/setup.php';
|
|
|
|
// Fetch attendees
|
|
$attendees = [];
|
|
try {
|
|
$pdo = db();
|
|
$stmt = $pdo->query("SELECT name, company, occupation, relation, created_at FROM attendees ORDER BY created_at DESC");
|
|
$attendees = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
|
} catch (PDOException $e) {
|
|
// Silently fail for now, or log error
|
|
}
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Belarusians Worldwide Friends</title>
|
|
<meta name="description" content="A friends list for the Belarusian Pavilion at Web Summit.">
|
|
<meta name="keywords" content="Belarusian Pavilion, Web Summit, Belarusians Worldwide, tech community, startups, networking, Belarusian founders, tech diaspora, Built with Flatlogic Generator">
|
|
<meta property="og:title" content="Belarusians Worldwide Friends">
|
|
<meta property="og:description" content="A friends list for the Belarusian Pavilion at Web Summit.">
|
|
<meta property="og:image" content="">
|
|
<meta name="twitter:card" content="summary_large_image">
|
|
<meta name="twitter:image" content="">
|
|
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<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=Inter:wght@400;700&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
|
</head>
|
|
<body>
|
|
|
|
<div id="toast-container" class="toast-container"></div>
|
|
|
|
<div class="container my-5">
|
|
<header class="hero text-center mb-5">
|
|
<h1>Belarusians Worldwide Friends</h1>
|
|
<p class="lead">A welcoming corner at Web Summit where Belarusian founders, engineers, investors, creatives, and ecosystem builders meet, share, and show that we keep building - wherever we are.</p>
|
|
</header>
|
|
|
|
<main>
|
|
<section class="form-section">
|
|
<h2>Join the Friends List</h2>
|
|
<p>Leave your details to connect with the Belarusian tech community at Web Summit.</p>
|
|
<form action="add_attendee.php" method="POST" class="needs-validation" novalidate>
|
|
<div class="mb-3">
|
|
<label for="name" class="form-label">Full Name</label>
|
|
<input type="text" class="form-control" id="name" name="name" required>
|
|
<div class="invalid-feedback">Please enter your name.</div>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="email" class="form-label">Email Address</label>
|
|
<input type="email" class="form-control" id="email" name="email" required>
|
|
<div class="invalid-feedback">Please enter a valid email address.</div>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="company" class="form-label">Company / Startup</label>
|
|
<input type="text" class="form-control" id="company" name="company">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="occupation" class="form-label">Occupation</label>
|
|
<input type="text" class="form-control" id="occupation" name="occupation">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="relation" class="form-label">Relation to the Booth</label>
|
|
<select class="form-select" id="relation" name="relation">
|
|
<option selected value="Friend">Friend</option>
|
|
<option value="Founder">Founder</option>
|
|
<option value="Investor">Investor</option>
|
|
<option value="Supporter">Supporter</option>
|
|
</select>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary btn-lg">Join the List</button>
|
|
</form>
|
|
</section>
|
|
|
|
<section class="list-section">
|
|
<h2>Our Friends & Associates</h2>
|
|
<div class="table-responsive">
|
|
<table class="table table-striped table-hover">
|
|
<thead class="table-dark">
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Company / Startup</th>
|
|
<th>Occupation</th>
|
|
<th>Relation</th>
|
|
<th>Date Joined</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php if (empty($attendees)): ?>
|
|
<tr>
|
|
<td colspan="5" class="text-center">Be the first to join the list!</td>
|
|
</tr>
|
|
<?php else: ?>
|
|
<?php foreach ($attendees as $attendee): ?>
|
|
<tr>
|
|
<td><?php echo htmlspecialchars($attendee['name']); ?></td>
|
|
<td><?php echo htmlspecialchars($attendee['company']); ?></td>
|
|
<td><?php echo htmlspecialchars($attendee['occupation']); ?></td>
|
|
<td><?php echo htmlspecialchars($attendee['relation']); ?></td>
|
|
<td><?php echo date('M d, Y', strtotime($attendee['created_at'])); ?></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
<?php endif; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</main>
|
|
|
|
<footer class="text-center text-muted mt-5">
|
|
<p>Built with ❤️ by the Belarusian Worldwide community.</p>
|
|
</footer>
|
|
</div>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
|
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
|
|
<script>
|
|
// Bootstrap form validation
|
|
(() => {
|
|
'use strict'
|
|
const forms = document.querySelectorAll('.needs-validation')
|
|
Array.from(forms).forEach(form => {
|
|
form.addEventListener('submit', event => {
|
|
if (!form.checkValidity()) {
|
|
event.preventDefault()
|
|
event.stopPropagation()
|
|
}
|
|
form.classList.add('was-validated')
|
|
}, false)
|
|
})
|
|
})()
|
|
</script>
|
|
</body>
|
|
</html>
|