Compare commits
No commits in common. "ai-dev" and "master" have entirely different histories.
@ -1,71 +0,0 @@
|
||||
body {
|
||||
font-family: 'Poppins', sans-serif;
|
||||
background-color: #F4F7F6;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
font-weight: 600;
|
||||
color: #4A90E2 !important;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: #4A90E2;
|
||||
border-color: #4A90E2;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background-color: #357ABD;
|
||||
border-color: #357ABD;
|
||||
}
|
||||
|
||||
.venue-card {
|
||||
border: none;
|
||||
border-radius: 0.5rem;
|
||||
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
|
||||
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
||||
}
|
||||
|
||||
.venue-card:hover {
|
||||
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;
|
||||
border-top-right-radius: 0.5rem;
|
||||
aspect-ratio: 4 / 3;
|
||||
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;
|
||||
}
|
||||
@ -1,31 +0,0 @@
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
|
||||
|
||||
// Smooth scroll for anchor links
|
||||
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
||||
anchor.addEventListener('click', function (e) {
|
||||
e.preventDefault();
|
||||
document.querySelector(this.getAttribute('href')).scrollIntoView({
|
||||
behavior: 'smooth'
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// Basic form validation
|
||||
const newsletterForm = document.querySelector('#newsletterForm');
|
||||
if(newsletterForm) {
|
||||
newsletterForm.addEventListener('submit', function(e) {
|
||||
const emailInput = document.querySelector('#email');
|
||||
if (!validateEmail(emailInput.value)) {
|
||||
e.preventDefault();
|
||||
alert('Please enter a valid email address.');
|
||||
emailInput.focus();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function validateEmail(email) {
|
||||
const re = /^(([^<>()[\\]\\.,;:\s@\"]+(\.[^<>()[\\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\\.)+[a-zA-Z]{2,}))$/;
|
||||
return re.test(String(email).toLowerCase());
|
||||
}
|
||||
});
|
||||
@ -15,19 +15,3 @@ function db() {
|
||||
}
|
||||
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();
|
||||
|
||||
@ -1,16 +0,0 @@
|
||||
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');
|
||||
214
index.php
214
index.php
@ -1,97 +1,131 @@
|
||||
<?php
|
||||
function render_header($title) {
|
||||
echo <<<HTML
|
||||
<!DOCTYPE html>
|
||||
declare(strict_types=1);
|
||||
@ini_set('display_errors', '1');
|
||||
@error_reporting(E_ALL);
|
||||
@date_default_timezone_set('UTC');
|
||||
|
||||
$phpVersion = PHP_VERSION;
|
||||
$now = date('Y-m-d H:i:s');
|
||||
?>
|
||||
<!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(); ?>">
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>New Style</title>
|
||||
<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">
|
||||
<style>
|
||||
:root {
|
||||
--bg-color-start: #6a11cb;
|
||||
--bg-color-end: #2575fc;
|
||||
--text-color: #ffffff;
|
||||
--card-bg-color: rgba(255, 255, 255, 0.01);
|
||||
--card-border-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Inter', sans-serif;
|
||||
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
|
||||
color: var(--text-color);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
body::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M-10 10L110 10M10 -10L10 110" stroke-width="1" stroke="rgba(255,255,255,0.05)"/></svg>');
|
||||
animation: bg-pan 20s linear infinite;
|
||||
z-index: -1;
|
||||
}
|
||||
@keyframes bg-pan {
|
||||
0% { background-position: 0% 0%; }
|
||||
100% { background-position: 100% 100%; }
|
||||
}
|
||||
main {
|
||||
padding: 2rem;
|
||||
}
|
||||
.card {
|
||||
background: var(--card-bg-color);
|
||||
border: 1px solid var(--card-border-color);
|
||||
border-radius: 16px;
|
||||
padding: 2rem;
|
||||
backdrop-filter: blur(20px);
|
||||
-webkit-backdrop-filter: blur(20px);
|
||||
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.loader {
|
||||
margin: 1.25rem auto 1.25rem;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border: 3px solid rgba(255, 255, 255, 0.25);
|
||||
border-top-color: #fff;
|
||||
border-radius: 50%;
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
@keyframes spin {
|
||||
from { transform: rotate(0deg); }
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
.hint {
|
||||
opacity: 0.9;
|
||||
}
|
||||
.sr-only {
|
||||
position: absolute;
|
||||
width: 1px; height: 1px;
|
||||
padding: 0; margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap; border: 0;
|
||||
}
|
||||
h1 {
|
||||
font-size: 3rem;
|
||||
font-weight: 700;
|
||||
margin: 0 0 1rem;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
p {
|
||||
margin: 0.5rem 0;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
code {
|
||||
background: rgba(0,0,0,0.2);
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||||
}
|
||||
footer {
|
||||
position: absolute;
|
||||
bottom: 1rem;
|
||||
font-size: 0.8rem;
|
||||
opacity: 0.7;
|
||||
}
|
||||
</style>
|
||||
</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 active" aria-current="page" href="index.php">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" 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>
|
||||
<main>
|
||||
<div class="card">
|
||||
<h1>Analyzing your requirements and generating your website…</h1>
|
||||
<div class="loader" role="status" aria-live="polite" aria-label="Applying initial changes">
|
||||
<span class="sr-only">Loading…</span>
|
||||
</div>
|
||||
<p class="hint">Flatlogic AI is collecting your requirements and applying the first changes.</p>
|
||||
<p class="hint">This page will update automatically as the plan is implemented.</p>
|
||||
<p>Runtime: PHP <code><?= htmlspecialchars($phpVersion) ?></code> — UTC <code><?= htmlspecialchars($now) ?></code></p>
|
||||
</div>
|
||||
</main>
|
||||
<footer>
|
||||
Page updated: <?= htmlspecialchars($now) ?> (UTC)
|
||||
</footer>
|
||||
</body>
|
||||
</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
114
venues.php
@ -1,114 +0,0 @@
|
||||
<?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