diff --git a/assets/css/custom.css b/assets/css/custom.css new file mode 100644 index 0000000..814fa2f --- /dev/null +++ b/assets/css/custom.css @@ -0,0 +1,66 @@ + +/* --- custom.css --- */ +@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap'); + +body { + font-family: 'Poppins', sans-serif; + background-color: #f8f9fa; + color: #333; +} + +:root { + --primary-gradient: linear-gradient(45deg, #6f42c1, #007bff); + --primary-gradient-hover: linear-gradient(45deg, #007bff, #6f42c1); +} + +.navbar-brand { + font-weight: 700; +} + +.hero { + padding: 6rem 1rem; + text-align: center; + background: #fff; + border-bottom: 1px solid #dee2e6; +} + +.hero h1 { + font-size: 3rem; + font-weight: 700; +} + +.hero p { + font-size: 1.25rem; + font-weight: 300; + max-width: 600px; + margin: 1rem auto; +} + +.btn-primary { + background: var(--primary-gradient); + border: none; + padding: 0.75rem 1.5rem; + font-weight: 600; + transition: background 0.3s ease; +} + +.btn-primary:hover { + background: var(--primary-gradient-hover); +} + +.interactive-widget { + background: #ffffff; + padding: 3rem 1rem; + margin-top: 2rem; + border-radius: 0.5rem; + box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05); + text-align: center; + max-width: 500px; + margin-left: auto; + margin-right: auto; +} + +.interactive-widget h3 { + font-weight: 600; + margin-bottom: 1.5rem; +} diff --git a/db/migrate.php b/db/migrate.php new file mode 100644 index 0000000..e352fe8 --- /dev/null +++ b/db/migrate.php @@ -0,0 +1,27 @@ +exec($sql); + + echo "Success: Database schema applied successfully." . PHP_EOL; + +} catch (PDOException $e) { + die("Error: Database connection failed: " . $e->getMessage()); +} catch (Exception $e) { + die($e->getMessage()); +} diff --git a/db/migrations/001_initial_schema.sql b/db/migrations/001_initial_schema.sql new file mode 100644 index 0000000..b8d9509 --- /dev/null +++ b/db/migrations/001_initial_schema.sql @@ -0,0 +1,32 @@ +-- Initial Schema for Event Management App + +-- Venues Table: Stores information about event locations. +CREATE TABLE IF NOT EXISTS `venues` ( + `id` INT PRIMARY KEY AUTO_INCREMENT, + `name` VARCHAR(255) NOT NULL, + `description` TEXT, + `capacity` INT, + `address` VARCHAR(255), + `is_available` BOOLEAN DEFAULT TRUE, + `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- Vendors Table: Stores information about service providers. +CREATE TABLE IF NOT EXISTS `vendors` ( + `id` INT PRIMARY KEY AUTO_INCREMENT, + `name` VARCHAR(255) NOT NULL, + `service_type` VARCHAR(100) COMMENT '''e.g., Catering, Decor, Entertainment''', + `contact_email` VARCHAR(255), + `contact_phone` VARCHAR(20), + `rating` DECIMAL(3, 2) COMMENT '''Rating from 1.00 to 5.00''', + `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- Users Table: For authentication and roles. +CREATE TABLE IF NOT EXISTS `users` ( + `id` INT PRIMARY KEY AUTO_INCREMENT, + `email` VARCHAR(255) NOT NULL UNIQUE, + `password_hash` VARCHAR(255) NOT NULL, + `role` VARCHAR(50) NOT NULL DEFAULT '''event_manager''' COMMENT '''e.g., event_manager, admin''', + `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; diff --git a/edit-vendor.php b/edit-vendor.php new file mode 100644 index 0000000..7722d2a --- /dev/null +++ b/edit-vendor.php @@ -0,0 +1,125 @@ +prepare('UPDATE vendors SET name = ?, service_type = ?, contact_email = ?, contact_phone = ?, rating = ? WHERE id = ?'); + $stmt->execute([$name, $service_type, $contact_email, $contact_phone, $rating, $vendor_id]); + header("Location: vendors.php?success=3"); + exit; + } catch (PDOException $e) { + $errorMessage = "Error: Could not update the vendor. " . $e->getMessage(); + } + } +} + +// Fetch the vendor to edit +$vendor = null; +try { + $pdo = db(); + $stmt = $pdo->prepare('SELECT * FROM vendors WHERE id = ?'); + $stmt->execute([$vendor_id]); + $vendor = $stmt->fetch(PDO::FETCH_ASSOC); +} catch (PDOException $e) { + $errorMessage = "Error: Could not fetch vendor details."; +} + +if (!$vendor) { + header("Location: vendors.php"); + exit; +} + +?> + + +
+ + +Flatlogic AI is collecting your requirements and applying the first changes.
-This page will update automatically as the plan is implemented.
-Runtime: PHP = htmlspecialchars($phpVersion) ?> — UTC = htmlspecialchars($now) ?>
Your all-in-one solution for managing venues, vendors, guests, and budgets from a single, easy-to-use dashboard.
+ Discover Your Dream Venue +