www
This commit is contained in:
parent
d0f190927a
commit
1f2c647afc
@ -1,70 +1,71 @@
|
|||||||
|
|
||||||
:root {
|
|
||||||
--primary-color: #4A90E2;
|
|
||||||
--secondary-color: #50E3C2;
|
|
||||||
--background-color: #F8F9FA;
|
|
||||||
--surface-color: #FFFFFF;
|
|
||||||
--text-color: #212529;
|
|
||||||
--primary-gradient: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
font-family: 'Poppins', sans-serif;
|
||||||
background-color: var(--background-color);
|
background-color: #F4F7F6;
|
||||||
color: var(--text-color);
|
color: #333333;
|
||||||
padding-top: 70px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-brand {
|
.navbar-brand {
|
||||||
font-weight: bold;
|
font-weight: 600;
|
||||||
}
|
color: #4A90E2 !important;
|
||||||
|
|
||||||
.hero {
|
|
||||||
background: var(--primary-gradient);
|
|
||||||
color: white;
|
|
||||||
padding: 6rem 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero h1 {
|
|
||||||
font-weight: 700;
|
|
||||||
font-size: 3.5rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary {
|
.btn-primary {
|
||||||
background-color: var(--primary-color);
|
background-color: #4A90E2;
|
||||||
border-color: var(--primary-color);
|
border-color: #4A90E2;
|
||||||
|
transition: background-color 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-secondary {
|
.btn-primary:hover {
|
||||||
background-color: var(--secondary-color);
|
background-color: #357ABD;
|
||||||
border-color: var(--secondary-color);
|
border-color: #357ABD;
|
||||||
}
|
}
|
||||||
|
|
||||||
.section {
|
.venue-card {
|
||||||
padding: 5rem 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card {
|
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 0.75rem;
|
border-radius: 0.5rem;
|
||||||
box-shadow: 0 8px 24px rgba(0,0,0,0.05);
|
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
|
||||||
transition: transform 0.2s ease-in-out;
|
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card:hover {
|
.venue-card:hover {
|
||||||
transform: translateY(-5px);
|
transform: translateY(-5px);
|
||||||
|
box-shadow: 0 12px 20px rgba(0,0,0,0.15);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.venue-card .card-img-top {
|
||||||
|
border-top-left-radius: 0.5rem;
|
||||||
.store-badge {
|
border-top-right-radius: 0.5rem;
|
||||||
display: inline-block;
|
aspect-ratio: 4 / 3;
|
||||||
height: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.avatar {
|
|
||||||
width: 96px;
|
|
||||||
height: 96px;
|
|
||||||
border-radius: 50%;
|
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.badge {
|
||||||
|
padding: 0.5em 0.75em;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-success-light {
|
||||||
|
background-color: rgba(80, 227, 194, 0.2);
|
||||||
|
color: #008a62;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-danger-light {
|
||||||
|
background-color: rgba(232, 86, 86, 0.2);
|
||||||
|
color: #c52828;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-secondary-light {
|
||||||
|
background-color: #e9ecef;
|
||||||
|
color: #495057;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero {
|
||||||
|
background: linear-gradient(45deg, #4A90E2, #50E3C2);
|
||||||
|
color: white;
|
||||||
|
padding: 6rem 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero h1 {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
@ -15,3 +15,19 @@ function db() {
|
|||||||
}
|
}
|
||||||
return $pdo;
|
return $pdo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function run_migrations() {
|
||||||
|
$pdo = db();
|
||||||
|
$migration_files = glob(__DIR__ . '/migrations/*.sql');
|
||||||
|
foreach ($migration_files as $file) {
|
||||||
|
try {
|
||||||
|
$sql = file_get_contents($file);
|
||||||
|
$pdo->exec($sql);
|
||||||
|
} catch (PDOException $e) {
|
||||||
|
// Log error or handle it as needed
|
||||||
|
error_log("Migration failed for file: " . basename($file) . " with error: " . $e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
run_migrations();
|
||||||
|
|||||||
16
db/migrations/001_create_venues_table.sql
Normal file
16
db/migrations/001_create_venues_table.sql
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
CREATE TABLE IF NOT EXISTS venues (
|
||||||
|
id INT PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
name VARCHAR(255) NOT NULL,
|
||||||
|
description TEXT,
|
||||||
|
image_url VARCHAR(255),
|
||||||
|
capacity INT,
|
||||||
|
features VARCHAR(255),
|
||||||
|
status ENUM('Available', 'Booked') DEFAULT 'Available'
|
||||||
|
);
|
||||||
|
|
||||||
|
-- Seed data
|
||||||
|
INSERT INTO venues (name, description, image_url, capacity, features, status) VALUES
|
||||||
|
('The Grand Ballroom', 'A spacious and elegant hall perfect for large corporate events and weddings. Features high ceilings and crystal chandeliers.', 'https://picsum.photos/seed/venue-hall/800/600', 500, 'AV System,Catering,On-site Parking', 'Available'),
|
||||||
|
('The Secret Garden', 'A beautiful outdoor garden venue, ideal for romantic weddings and intimate gatherings. Surrounded by lush greenery.', 'https://picsum.photos/seed/venue-garden/800/600', 150, 'Outdoor Seating,Sound System,Pet Friendly', 'Available'),
|
||||||
|
('The Metro Loft', 'A modern, industrial loft with exposed brick and large windows, offering a unique backdrop for any event.', 'https://picsum.photos/seed/venue-loft/800/600', 200, 'Wi-Fi,Projector,Rooftop Access', 'Booked'),
|
||||||
|
('Lakeside Pavilion', 'A serene pavilion by the lake, offering stunning views and a tranquil atmosphere for retreats and special occasions.', 'https://picsum.photos/seed/venue-pavilion/800/600', 100, 'Waterfront,Kitchenette,Wheelchair Accessible', 'Available');
|
||||||
230
index.php
230
index.php
@ -1,185 +1,97 @@
|
|||||||
|
<?php
|
||||||
|
function render_header($title) {
|
||||||
|
echo <<<HTML
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>TrailGo - Find Your Next Adventure</title>
|
<title>${title} - EventFlow</title>
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.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=Poppins:wght@300;400;600&display=swap" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm">
|
||||||
<!-- Navbar -->
|
<div class="container-fluid">
|
||||||
<nav class="navbar navbar-expand-lg navbar-light bg-light shadow-sm fixed-top">
|
<a class="navbar-brand" href="index.php">EventFlow</a>
|
||||||
<div class="container">
|
|
||||||
<a class="navbar-brand" href="#">TrailGo</a>
|
|
||||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
<div class="collapse navbar-collapse" id="navbarNav">
|
<div class="collapse navbar-collapse" id="navbarNav">
|
||||||
<ul class="navbar-nav ms-auto">
|
<ul class="navbar-nav ms-auto">
|
||||||
<li class="nav-item"><a class="nav-link" href="#how-it-works">How it Works</a></li>
|
<li class="nav-item">
|
||||||
<li class="nav-item"><a class="nav-link" href="#features">Features</a></li>
|
<a class="nav-link active" aria-current="page" href="index.php">Home</a>
|
||||||
<li class="nav-item"><a class="nav-link" href="#reviews">Reviews</a></li>
|
</li>
|
||||||
<li class="nav-item ms-lg-3"><a class="btn btn-primary" href="#newsletter">Get App</a></li>
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="venues.php">Venues</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
HTML;
|
||||||
|
}
|
||||||
|
|
||||||
<!-- Hero Section -->
|
function render_footer() {
|
||||||
<header class="hero text-center">
|
echo <<<HTML
|
||||||
<div class="container">
|
<footer class="py-4 mt-auto">
|
||||||
<div class="row align-items-center">
|
<div class="container-fluid px-4">
|
||||||
<div class="col-lg-6 text-lg-start">
|
<div class="d-flex align-items-center justify-content-between small">
|
||||||
<h1 class="display-3">Find Your Next Adventure.</h1>
|
<div class="text-muted">Copyright © EventFlow 2025</div>
|
||||||
<p class="lead my-4">The ultimate companion for every trailblazer. Discover routes, track progress, and connect with nature.</p>
|
|
||||||
<div>
|
|
||||||
<a href="#" class="store-badge"><img src="https://upload.wikimedia.org/wikipedia/commons/3/3c/Download_on_the_App_Store_Badge.svg" alt="Download on the App Store" style="height: 50px;"></a>
|
|
||||||
<a href="#" class="store-badge"><img src="https://upload.wikimedia.org/wikipedia/commons/7/78/Google_Play_Store_badge_EN.svg" alt="Get it on Google Play" style="height: 50px;"></a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-6 mt-5 mt-lg-0">
|
|
||||||
<img src="https://picsum.photos/seed/trailgo-phone/450/800" class="img-fluid rounded-5 shadow-lg" alt="A smartphone displaying the TrailGo app's main map interface on a scenic mountain trail.">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<!-- How it Works Section -->
|
|
||||||
<section id="how-it-works" class="section">
|
|
||||||
<div class="container text-center">
|
|
||||||
<h2 class="mb-5">How It Works</h2>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-4 mb-4">
|
|
||||||
<div class="card p-4 h-100">
|
|
||||||
<i class="bi bi-map display-3 text-primary"></i>
|
|
||||||
<h4 class="my-3">1. Discover Routes</h4>
|
|
||||||
<p>Explore thousands of trails for hiking, biking, and running, submitted by a community of explorers.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4 mb-4">
|
|
||||||
<div class="card p-4 h-100">
|
|
||||||
<i class="bi bi-phone display-3 text-primary"></i>
|
|
||||||
<h4 class="my-3">2. Start Your Journey</h4>
|
|
||||||
<p>Use our live GPS tracking to navigate your chosen path and record your adventure.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4 mb-4">
|
|
||||||
<div class="card p-4 h-100">
|
|
||||||
<i class="bi bi-people display-3 text-primary"></i>
|
|
||||||
<h4 class="my-3">3. Share Your Experience</h4>
|
|
||||||
<p>Share photos, reviews, and tips with the TrailGo community and inspire others.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<!-- Features Section -->
|
|
||||||
<section id="features" class="section bg-light">
|
|
||||||
<div class="container">
|
|
||||||
<h2 class="text-center mb-5">App Features</h2>
|
|
||||||
<div class="row g-4">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="card p-4"><h5>Offline Maps</h5><p>Download maps for offline use and navigate even without a signal.</p></div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="card p-4"><h5>Live Tracking</h5><p>Share your real-time location with friends and family for safety.</p></div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="card p-4"><h5>Community Reviews</h5><p>Get up-to-date trail conditions and tips from fellow adventurers.</p></div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="card p-4"><h5>Achievement Badges</h5><p>Stay motivated by unlocking badges for milestones and challenges.</p></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row mt-5 g-4 align-items-center">
|
|
||||||
<div class="col-lg-6">
|
|
||||||
<img src="https://picsum.photos/seed/trailgo-feature1/600/400" class="img-fluid rounded-4 shadow" alt="A hiker using the TrailGo app to navigate a forest path.">
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-6">
|
|
||||||
<h3>Detailed Trail Info</h3>
|
|
||||||
<p>Get everything you need to know before you go, including difficulty, elevation, and photos.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row mt-5 g-4 align-items-center flex-row-reverse">
|
|
||||||
<div class="col-lg-6">
|
|
||||||
<img src="https://picsum.photos/seed/trailgo-feature2/600/400" class="img-fluid rounded-4 shadow" alt="Close-up of the TrailGo app's achievement badges screen.">
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-6">
|
|
||||||
<h3>Connect with Friends</h3>
|
|
||||||
<p>Follow friends, see their activities, and plan your next adventure together.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<!-- Reviews Section -->
|
|
||||||
<section id="reviews" class="section">
|
|
||||||
<div class="container">
|
|
||||||
<h2 class="text-center mb-5">Loved by Explorers</h2>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-4 mb-4">
|
|
||||||
<div class="card text-center p-4 h-100">
|
|
||||||
<img src="https://picsum.photos/seed/trailgo-avatar1/96/96" class="avatar mx-auto mb-3" alt="Avatar of user Alex.">
|
|
||||||
<p class="fst-italic">"TrailGo has completely changed how I find new hiking trails. The community tips are a lifesaver!"</p>
|
|
||||||
<footer class="mt-auto">- Alex Johnson</footer>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4 mb-4">
|
|
||||||
<div class="card text-center p-4 h-100">
|
|
||||||
<img src="https://picsum.photos/seed/trailgo-avatar2/96/96" class="avatar mx-auto mb-3" alt="Avatar of user Maria.">
|
|
||||||
<p class="fst-italic">"The offline maps are a game-changer for my backcountry trips. I feel so much safer on the trail."</p>
|
|
||||||
<footer class="mt-auto">- Maria Garcia</footer>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4 mb-4">
|
|
||||||
<div class="card text-center p-4 h-100">
|
|
||||||
<img src="https://picsum.photos/seed/trailgo-avatar3/96/96" class="avatar mx-auto mb-3" alt="Avatar of user Sam.">
|
|
||||||
<p class="fst-italic">"I love the achievement badges! They keep me motivated to get out and explore more each weekend."</p>
|
|
||||||
<footer class="mt-auto">- Sam Chen</footer>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<!-- Newsletter Section -->
|
|
||||||
<section id="newsletter" class="section bg-light">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-lg-7 text-center">
|
|
||||||
<h2>Stay in the Loop</h2>
|
|
||||||
<p>Subscribe to our newsletter for the latest trail updates, app features, and exclusive offers.</p>
|
|
||||||
<form id="newsletterForm" class="row mt-4">
|
|
||||||
<div class="col-md-8">
|
|
||||||
<input type="email" id="email" class="form-control form-control-lg" placeholder="Enter your email" required>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4 mt-3 mt-md-0">
|
|
||||||
<button type="submit" class="btn btn-primary btn-lg w-100">Subscribe</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<!-- Footer -->
|
|
||||||
<footer class="py-4 bg-dark text-white">
|
|
||||||
<div class="container text-center">
|
|
||||||
<div class="mb-3">
|
|
||||||
<a href="#" class="text-white mx-2"><i class="bi bi-twitter"></i></a>
|
|
||||||
<a href="#" class="text-white mx-2"><i class="bi bi-instagram"></i></a>
|
|
||||||
<a href="#" class="text-white mx-2"><i class="bi bi-facebook"></i></a>
|
|
||||||
</div>
|
|
||||||
<p class="mb-0">© <?php echo date("Y"); ?> TrailGo. All Rights Reserved.</p>
|
|
||||||
<p><a href="#" class="text-white">Privacy Policy</a> · <a href="#" class="text-white">Terms of Service</a></p>
|
|
||||||
</div>
|
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
<script src="https://unpkg.com/feather-icons"></script>
|
||||||
|
<script>feather.replace()</script>
|
||||||
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
|
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
HTML;
|
||||||
|
}
|
||||||
|
|
||||||
|
render_header('Welcome to EventFlow');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<div class="hero">
|
||||||
|
<div class="container">
|
||||||
|
<h1 class="display-4">Effortless Event Management</h1>
|
||||||
|
<p class="lead">Your all-in-one solution for planning, managing, and executing flawless events. From small gatherings to large corporate affairs.</p>
|
||||||
|
<a href="venues.php" class="btn btn-light btn-lg mt-3">Explore Venues</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container my-5">
|
||||||
|
<div class="row text-center">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="p-4">
|
||||||
|
<i data-feather="map-pin" class="text-primary mb-3" width="48" height="48"></i>
|
||||||
|
<h3>Venues</h3>
|
||||||
|
<p class="text-muted">Manage event spaces, features, and availability all in one place.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="p-4">
|
||||||
|
<i data-feather="users" class="text-primary mb-3" width="48" height="48"></i>
|
||||||
|
<h3>Guests</h3>
|
||||||
|
<p class="text-muted">Keep track of guest lists, RSVPs, and special requirements with ease.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="p-4">
|
||||||
|
<i data-feather="dollar-sign" class="text-primary mb-3" width="48" height="48"></i>
|
||||||
|
<h3>Budgets</h3>
|
||||||
|
<p class="text-muted">Stay on top of your finances from initial deposits to final payments.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
render_footer();
|
||||||
|
?>
|
||||||
|
|||||||
114
venues.php
Normal file
114
venues.php
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
<?php
|
||||||
|
require_once 'db/config.php';
|
||||||
|
|
||||||
|
try {
|
||||||
|
$stmt = db()->query('SELECT * FROM venues ORDER BY name ASC
|
||||||
|
');
|
||||||
|
$venues = $stmt->fetchAll();
|
||||||
|
} catch (PDOException $e) {
|
||||||
|
error_log($e->getMessage());
|
||||||
|
// You could redirect to an error page or show a friendly message
|
||||||
|
die('Error connecting to the database.');
|
||||||
|
}
|
||||||
|
|
||||||
|
function render_header($title) {
|
||||||
|
echo <<<HTML
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>{$title} - EventFlow</title>
|
||||||
|
<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=Poppins:wght@300;400;600&display=swap" rel="stylesheet">
|
||||||
|
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<a class="navbar-brand" href="index.php">EventFlow</a>
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
<div class="collapse navbar-collapse" id="navbarNav">
|
||||||
|
<ul class="navbar-nav ms-auto">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="index.php">Home</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link active" aria-current="page" href="venues.php">Venues</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
HTML;
|
||||||
|
}
|
||||||
|
|
||||||
|
function render_footer() {
|
||||||
|
echo <<<HTML
|
||||||
|
<footer class="py-4 mt-auto">
|
||||||
|
<div class="container-fluid px-4">
|
||||||
|
<div class="d-flex align-items-center justify-content-between small">
|
||||||
|
<div class="text-muted">Copyright © EventFlow 2025</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
<script src="https://unpkg.com/feather-icons"></script>
|
||||||
|
<script>feather.replace()</script>
|
||||||
|
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
HTML;
|
||||||
|
}
|
||||||
|
|
||||||
|
render_header('Event Venues');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<main class="container my-5">
|
||||||
|
<h1 class="mb-4 text-center">Event Venues</h1>
|
||||||
|
<p class="text-center text-muted mb-5">Browse our curated selection of top-tier venues for your next event.</p>
|
||||||
|
|
||||||
|
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 g-4">
|
||||||
|
<?php if (empty($venues)): ?>
|
||||||
|
<div class="col">
|
||||||
|
<p>No venues found.</p>
|
||||||
|
</div>
|
||||||
|
<?php else: ?>
|
||||||
|
<?php foreach ($venues as $venue):
|
||||||
|
// Corrected the escaping for the status badge
|
||||||
|
$status_class = $venue['status'] == 'Available' ? 'bg-success-light' : 'bg-danger-light';
|
||||||
|
?>
|
||||||
|
<div class="col">
|
||||||
|
<div class="card h-100 venue-card">
|
||||||
|
<img src="<?php echo htmlspecialchars($venue['image_url']); ?>" class="card-img-top" alt="<?php echo htmlspecialchars($venue['name']); ?>">
|
||||||
|
<div class="card-body d-flex flex-column">
|
||||||
|
<h5 class="card-title"><?php echo htmlspecialchars($venue['name']); ?></h5>
|
||||||
|
<p class="card-text text-muted flex-grow-1"><?php echo htmlspecialchars($venue['description']); ?></p>
|
||||||
|
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||||
|
<span class="badge bg-light text-dark"><i data-feather="users" class="me-1"></i><?php echo htmlspecialchars($venue['capacity']); ?> Guests</span>
|
||||||
|
<span class="badge <?php echo $status_class; ?>"><?php echo htmlspecialchars($venue['status']); ?></span>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<?php foreach (explode(',', $venue['features']) as $feature):
|
||||||
|
// Ensure feature is not empty before echoing
|
||||||
|
if (!empty(trim($feature))):
|
||||||
|
?>
|
||||||
|
<span class="badge bg-secondary-light me-1 mb-1"><?php echo htmlspecialchars(trim($feature)); ?></span>
|
||||||
|
<?php endif; endforeach; ?>
|
||||||
|
</div>
|
||||||
|
<button class="btn btn-primary mt-auto" <?php echo $venue['status'] == 'Booked' ? 'disabled' : ''; ?>>Book Now</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
render_footer();
|
||||||
|
?>
|
||||||
Loading…
x
Reference in New Issue
Block a user