www
This commit is contained in:
parent
ce0ddecd05
commit
52b5af3fbe
120
assets/css/custom.css
Normal file
120
assets/css/custom.css
Normal file
@ -0,0 +1,120 @@
|
||||
|
||||
/* General Body Styles */
|
||||
body {
|
||||
background-color: #F4F7F6;
|
||||
font-family: 'Poppins', sans-serif;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
/* Navbar */
|
||||
.navbar {
|
||||
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
font-weight: 600;
|
||||
color: #4A90E2 !important;
|
||||
}
|
||||
|
||||
/* Main Container */
|
||||
.container {
|
||||
padding-top: 2rem;
|
||||
padding-bottom: 2rem;
|
||||
}
|
||||
|
||||
/* Page Titles */
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
h1.page-title {
|
||||
margin-bottom: 2rem;
|
||||
color: #4A90E2;
|
||||
}
|
||||
|
||||
|
||||
/* Venue Card Styles */
|
||||
.venue-card {
|
||||
background-color: #FFFFFF;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
||||
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
||||
overflow: hidden;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.venue-card:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
|
||||
.venue-card .card-img-top {
|
||||
border-top-left-radius: 8px;
|
||||
border-top-right-radius: 8px;
|
||||
aspect-ratio: 4 / 3;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.venue-card .card-body {
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
.venue-card .card-title {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 600;
|
||||
color: #4A90E2;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.venue-card .card-text {
|
||||
color: #555;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.venue-card .features-list {
|
||||
padding-left: 0;
|
||||
list-style: none;
|
||||
font-size: 0.9rem;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.venue-card .features-list li {
|
||||
margin-bottom: 0.25rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.venue-card .features-list i {
|
||||
color: #50E3C2;
|
||||
margin-right: 0.5rem;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.venue-card .badge {
|
||||
font-size: 0.8rem;
|
||||
font-weight: 500;
|
||||
padding: 0.4em 0.8em;
|
||||
}
|
||||
|
||||
.badge-available {
|
||||
background-color: #50E3C2;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.badge-booked {
|
||||
background-color: #E9573F;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
.footer {
|
||||
background-color: #fff;
|
||||
padding: 2rem 0;
|
||||
margin-top: 3rem;
|
||||
border-top: 1px solid #e9ecef;
|
||||
text-align: center;
|
||||
font-size: 0.9rem;
|
||||
color: #6c757d;
|
||||
}
|
||||
4
assets/js/main.js
Normal file
4
assets/js/main.js
Normal file
@ -0,0 +1,4 @@
|
||||
// No custom JS needed for this step, but the file is here for future use.
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
// Future interactive scripts will go here
|
||||
});
|
||||
@ -6,12 +6,92 @@ define('DB_USER', 'app_34010');
|
||||
define('DB_PASS', 'e689e56d-6f73-4dc6-b30b-aac78bb04979');
|
||||
|
||||
function db() {
|
||||
static $pdo;
|
||||
if (!$pdo) {
|
||||
$pdo = new PDO('mysql:host='.DB_HOST.';dbname='.DB_NAME.';charset=utf8mb4', DB_USER, DB_PASS, [
|
||||
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
||||
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
|
||||
]);
|
||||
}
|
||||
return $pdo;
|
||||
static $pdo;
|
||||
if (!$pdo) {
|
||||
$dsn = 'mysql:host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=utf8mb4';
|
||||
$options = [
|
||||
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
||||
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
|
||||
PDO::ATTR_EMULATE_PREPARES => false,
|
||||
];
|
||||
try {
|
||||
$pdo = new PDO($dsn, DB_USER, DB_PASS, $options);
|
||||
} catch (PDOException $e) {
|
||||
// In a real app, you'd log this error and show a generic message
|
||||
// For this demo, we'll just die with the error.
|
||||
die('Database connection failed: ' . $e->getMessage());
|
||||
}
|
||||
}
|
||||
return $pdo;
|
||||
}
|
||||
|
||||
function seed_initial_data() {
|
||||
$pdo = db();
|
||||
|
||||
// 1. Create venues table
|
||||
$pdo->exec("
|
||||
CREATE TABLE IF NOT EXISTS venues (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
name VARCHAR(255) NOT NULL,
|
||||
capacity INT NOT NULL,
|
||||
features TEXT,
|
||||
image_url VARCHAR(255),
|
||||
is_booked BOOLEAN DEFAULT FALSE,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
)
|
||||
");
|
||||
|
||||
// 2. Check if venues table is empty
|
||||
$stmt = $pdo->query("SELECT COUNT(*) FROM venues");
|
||||
if ($stmt->fetchColumn() == 0) {
|
||||
// 3. Insert sample data
|
||||
$venues = [
|
||||
[
|
||||
'name' => 'The Grand Ballroom',
|
||||
'capacity' => 500,
|
||||
'features' => '["Full A/V setup", "On-site catering", "Valet parking"]',
|
||||
'image_url' => 'https://picsum.photos/seed/venue-1/800/600',
|
||||
'is_booked' => false
|
||||
],
|
||||
[
|
||||
'name' => 'The Rustic Barn',
|
||||
'capacity' => 150,
|
||||
'features' => '["Scenic views", "Outdoor space", "Bridal suite"]',
|
||||
'image_url' => 'https://picsum.photos/seed/venue-2/800/600',
|
||||
'is_booked' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Cityscape Rooftop',
|
||||
'capacity' => 100,
|
||||
'features' => '["360° city views", "Modern decor", "Cocktail bar"]',
|
||||
'image_url' => 'https://picsum.photos/seed/venue-3/800/600',
|
||||
'is_booked' => false
|
||||
],
|
||||
[
|
||||
'name' => 'The Garden Pavilion',
|
||||
'capacity' => 250,
|
||||
'features' => '["Lush gardens", "Glass walls", "Natural light"]',
|
||||
'image_url' => 'https://picsum.photos/seed/venue-4/800/600',
|
||||
'is_booked' => false
|
||||
]
|
||||
];
|
||||
|
||||
$stmt = $pdo->prepare(
|
||||
"INSERT INTO venues (name, capacity, features, image_url, is_booked) VALUES (?, ?, ?, ?, ?)"
|
||||
);
|
||||
|
||||
foreach ($venues as $venue) {
|
||||
$stmt->execute([
|
||||
$venue['name'],
|
||||
$venue['capacity'],
|
||||
$venue['features'],
|
||||
$venue['image_url'],
|
||||
$venue['is_booked']
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Run the seeder
|
||||
seed_initial_data();
|
||||
|
||||
|
||||
241
index.php
241
index.php
@ -1,131 +1,124 @@
|
||||
<?php
|
||||
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');
|
||||
// This is the main entry point. For this step, it will serve as the landing page
|
||||
// and also the template for the navigation bar included in other pages.
|
||||
?>
|
||||
<!doctype html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>EventManager - Your All-in-One Event Solution</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@400;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
||||
<style>
|
||||
/* Additional styles for the hero section */
|
||||
.hero {
|
||||
background: linear-gradient(45deg, rgba(74, 144, 226, 0.9), rgba(80, 227, 194, 0.9)), url('https://picsum.photos/seed/hero-main/1600/900') no-repeat center center;
|
||||
background-size: cover;
|
||||
color: white;
|
||||
padding: 8rem 0;
|
||||
text-align: center;
|
||||
}
|
||||
.hero h1 {
|
||||
font-size: 3.5rem;
|
||||
font-weight: 700;
|
||||
color: white;
|
||||
}
|
||||
.hero p {
|
||||
font-size: 1.25rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
.hero .btn-primary {
|
||||
background-color: #50E3C2;
|
||||
border-color: #50E3C2;
|
||||
font-weight: 600;
|
||||
padding: 0.75rem 2rem;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
.hero .btn-primary:hover {
|
||||
background-color: #45c4a8;
|
||||
border-color: #45c4a8;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<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>
|
||||
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-white sticky-top">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="/">EventManager</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="/">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="venues.php">Venues</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#">Vendors</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#">Contact</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<?php if (basename($_SERVER['PHP_SELF']) == 'index.php'): ?>
|
||||
<header class="hero">
|
||||
<div class="container">
|
||||
<h1>Effortless Event Management</h1>
|
||||
<p>Your all-in-one solution for planning, organizing, and executing flawless events.</p>
|
||||
<a href="venues.php" class="btn btn-primary btn-lg">Explore Venues</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="container mt-5">
|
||||
<section class="text-center">
|
||||
<h2>Core Features</h2>
|
||||
<p class="lead text-muted">Everything you need, all in one place.</p>
|
||||
<div class="row mt-4">
|
||||
<div class="col-md-3">
|
||||
<i data-feather="map-pin" width="48" height="48" class="text-primary mb-3"></i>
|
||||
<h4>Venues</h4>
|
||||
<p>Manage all your event spaces.</p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<i data-feather="users" width="48" height="48" class="text-primary mb-3"></i>
|
||||
<h4>Vendors</h4>
|
||||
<p>Organize caterers, decorators, etc.</p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<i data-feather="calendar" width="48" height="48" class="text-primary mb-3"></i>
|
||||
<h4>Schedules</h4>
|
||||
<p>Plan your event minute-by-minute.</p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<i data-feather="dollar-sign" width="48" height="48" class="text-primary mb-3"></i>
|
||||
<h4>Budgets</h4>
|
||||
<p>Keep track of all your finances.</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer class="footer">
|
||||
<p>© <?php echo date("Y"); ?> EventManager. All Rights Reserved.</p>
|
||||
</footer>
|
||||
<?php endif; ?>
|
||||
|
||||
<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>
|
||||
77
venues.php
Normal file
77
venues.php
Normal file
@ -0,0 +1,77 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/db/config.php';
|
||||
|
||||
// Fetch venues from the database
|
||||
$stmt = db()->query("SELECT * FROM venues ORDER BY name ASC");
|
||||
$venues = $stmt->fetchAll();
|
||||
|
||||
function render_venue_card($venue) {
|
||||
$features = json_decode($venue['features'], true);
|
||||
$status_badge = $venue['is_booked']
|
||||
? '<span class="badge badge-booked">Booked</span>'
|
||||
: '<span class="badge badge-available">Available</span>';
|
||||
|
||||
$features_html = '';
|
||||
if (!empty($features)) {
|
||||
$features_html .= '<ul class="features-list mt-3">';
|
||||
foreach ($features as $feature) {
|
||||
$features_html .= '<li><i data-feather="check-circle"></i>' . htmlspecialchars($feature) . '</li>';
|
||||
}
|
||||
$features_html .= '</ul>';
|
||||
}
|
||||
|
||||
return <<<HTML
|
||||
<div class="col-lg-4 col-md-6 mb-4">
|
||||
<div class="card venue-card h-100">
|
||||
<img src="{$venue['image_url']}" class="card-img-top" alt="Image of {$venue['name']}">
|
||||
<div class="card-body d-flex flex-column">
|
||||
<div class="d-flex justify-content-between align-items-start">
|
||||
<h5 class="card-title">{$venue['name']}</h5>
|
||||
{$status_badge}
|
||||
</div>
|
||||
<p class="card-text text-muted">Capacity: {$venue['capacity']} guests</p>
|
||||
{$features_html}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
HTML;
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Our Venues - EventManager</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@400;600&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<?php include __DIR__ . '/index.php'; ?>
|
||||
|
||||
<main class="container">
|
||||
<h1 class="page-title text-center">Our Venues</h1>
|
||||
<div class="row">
|
||||
<?php foreach ($venues as $venue):
|
||||
echo render_venue_card($venue);
|
||||
endforeach; ?>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer class="footer">
|
||||
<p>© <?php echo date("Y"); ?> EventManager. All Rights Reserved.</p>
|
||||
</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>
|
||||
Loading…
x
Reference in New Issue
Block a user