diff --git a/assets/css/custom.css b/assets/css/custom.css new file mode 100644 index 0000000..bfbd492 --- /dev/null +++ b/assets/css/custom.css @@ -0,0 +1,41 @@ + +body { + background-color: #F4F7F6; + color: #333333; + font-family: 'Roboto', sans-serif; +} + +h1, h2, h3, h4, h5, h6 { + font-family: 'Poppins', sans-serif; +} + +.hero { + background: linear-gradient(45deg, #4A90E2, #50E3C2); + color: white; + padding: 4rem 2rem; + border-radius: 0 0 1rem 1rem; +} + +.schedule-item { + background-color: #FFFFFF; + border-radius: 0.5rem; + padding: 1.5rem; + margin-bottom: 1rem; + border-left: 5px solid #4A90E2; + transition: transform 0.2s ease-in-out; +} + +.schedule-item:hover { + transform: translateY(-5px); +} + +.schedule-time { + font-weight: bold; + color: #4A90E2; +} + +.footer { + padding: 2rem 0; + margin-top: 2rem; + background-color: #FFFFFF; +} diff --git a/assets/js/main.js b/assets/js/main.js new file mode 100644 index 0000000..20295e0 --- /dev/null +++ b/assets/js/main.js @@ -0,0 +1,2 @@ + +// No custom JS needed for this static page yet. diff --git a/assets/pasted-20251111-120920-c48f73c0.jpg b/assets/pasted-20251111-120920-c48f73c0.jpg new file mode 100644 index 0000000..aa77778 Binary files /dev/null and b/assets/pasted-20251111-120920-c48f73c0.jpg differ diff --git a/assets/vm-shot-2025-11-11T12-09-17-858Z.jpg b/assets/vm-shot-2025-11-11T12-09-17-858Z.jpg new file mode 100644 index 0000000..aa77778 Binary files /dev/null and b/assets/vm-shot-2025-11-11T12-09-17-858Z.jpg differ diff --git a/db/setup.php b/db/setup.php new file mode 100644 index 0000000..d871d3b --- /dev/null +++ b/db/setup.php @@ -0,0 +1,112 @@ +exec("CREATE TABLE IF NOT EXISTS sessions ( + id INT AUTO_INCREMENT PRIMARY KEY, + time VARCHAR(255) NOT NULL, + title VARCHAR(255) NOT NULL, + speaker VARCHAR(255) NOT NULL, + description TEXT + )"); + + // Create speakers table if it doesn't exist + $pdo->exec("CREATE TABLE IF NOT EXISTS speakers ( + id INT AUTO_INCREMENT PRIMARY KEY, + name VARCHAR(255) NOT NULL, + bio TEXT, + photo_url VARCHAR(255), + slug VARCHAR(255) UNIQUE NOT NULL + )"); + + // Check if sessions table is empty + $stmt = $pdo->query("SELECT COUNT(*) FROM sessions"); + $count = $stmt->fetchColumn(); + + if ($count == 0) { + // Schedule data to insert + $seed_schedule = [ + [ + 'time' => '9:00 AM - 10:00 AM', + 'title' => 'Opening Keynote', + 'speaker' => 'Jane Doe', + 'description' => 'A look at the future of web development and the latest trends in the industry.' + ], + [ + 'time' => '10:15 AM - 11:15 AM', + 'title' => 'The Power of Modern PHP', + 'speaker' => 'John Smith', + 'description' => 'Exploring the new features of PHP 8 and how to write more efficient and readable code.' + ], + [ + 'time' => '11:30 AM - 12:30 PM', + 'title' => 'Frontend Magic with Vanilla JS', + 'speaker' => 'Emily White', + 'description' => 'Building interactive and dynamic user interfaces without the need for heavy frameworks.' + ], + [ + 'time' => '1:30 PM - 2:30 PM', + 'title' => 'Securing Your Web Applications', + 'speaker' => 'Michael Brown', + 'description' => 'Best practices for protecting your applications from common vulnerabilities.' + ] + ]; + + $stmt = $pdo->prepare("INSERT INTO sessions (time, title, speaker, description) VALUES (:time, :title, :speaker, :description)"); + foreach ($seed_schedule as $item) { + $stmt->execute($item); + } + } + + // Check if speakers table is empty + $stmt = $pdo->query("SELECT COUNT(*) FROM speakers"); + $count = $stmt->fetchColumn(); + + if ($count == 0) { + // Speaker data to insert + $seed_speakers = [ + [ + 'name' => 'Jane Doe', + 'bio' => 'Jane Doe is a renowned expert in web development with over 15 years of experience. She is a frequent speaker at international conferences and has authored several books on the subject.', + 'photo_url' => 'https://i.pravatar.cc/150?u=jane_doe', + 'slug' => 'jane-doe' + ], + [ + 'name' => 'John Smith', + 'bio' => 'John Smith is a core contributor to the PHP language and has been instrumental in its recent developments. He is passionate about open source and loves to share his knowledge with the community.', + 'photo_url' => 'https://i.pravatar.cc/150?u=john_smith', + 'slug' => 'john-smith' + ], + [ + 'name' => 'Emily White', + 'bio' => 'Emily White is a frontend developer who specializes in creating beautiful and performant user interfaces. She is a strong advocate for web standards and accessibility.', + 'photo_url' => 'https://i.pravatar.cc/150?u=emily_white', + 'slug' => 'emily-white' + ], + [ + 'name' => 'Michael Brown', + 'bio' => 'Michael Brown is a security researcher and ethical hacker. He has helped numerous companies secure their web applications and is a regular trainer at security bootcamps.', + 'photo_url' => 'https://i.pravatar.cc/150?u=michael_brown', + 'slug' => 'michael-brown' + ] + ]; + + $stmt = $pdo->prepare("INSERT INTO speakers (name, bio, photo_url, slug) VALUES (:name, :bio, :photo_url, :slug)"); + foreach ($seed_speakers as $speaker) { + $stmt->execute($speaker); + } + } + + } catch (PDOException $e) { + // In a real app, log this error and show a generic message + die('DB Setup Error: ' . $e->getMessage()); + } +} + +setup_database(); diff --git a/index.php b/index.php index 7205f3d..5a72383 100644 --- a/index.php +++ b/index.php @@ -1,150 +1,93 @@ query("SELECT time, title, speaker, description FROM sessions ORDER BY id"); + $schedule = $stmt->fetchAll(); + + // Fetch speakers from the database to create a lookup table for slugs + $stmt = $pdo->query("SELECT name, slug FROM speakers"); + $speakers = $stmt->fetchAll(PDO::FETCH_KEY_PAIR); + +} catch (PDOException $e) { + $schedule = []; + $speakers = []; + $db_error = "Database error: " . $e->getMessage(); +} ?> - + - - - New Style - - - - - - - - - - - - - - - - - - - + + + Web App Summit + + + + + + + + + + + + + -
-
-

Analyzing your requirements and generating your website…

-
- Loading… -
-

AI is collecting your requirements and applying the first changes.

-

This page will update automatically as the plan is implemented.

-

Runtime: PHP — UTC

-
-
- + +
+
+ +
+
+ +
+
+

Welcome to the Web App Summit

+

The premier event for web application developers and enthusiasts.

+
+ +

Event Schedule

+ +
+ +
+ + +
The schedule is not available at the moment. Please check back later.
+ + +
+
+
+
+
+

Speaker:

+

+
+
+
+ + +
+
+ + + + + - + \ No newline at end of file diff --git a/speaker.php b/speaker.php new file mode 100644 index 0000000..0b79376 --- /dev/null +++ b/speaker.php @@ -0,0 +1,77 @@ +prepare("SELECT name, bio, photo_url FROM speakers WHERE slug = ?"); + $stmt->execute([$speaker_slug]); + $speaker = $stmt->fetch(); + + if (!$speaker) { + $error = 'Speaker not found.'; + } + } catch (PDOException $e) { + $error = 'Database error: ' . $e->getMessage(); + } +} +?> + + + + + + <?php echo $speaker ? htmlspecialchars($speaker['name']) : 'Speaker Details'; ?> - Web App Summit + + + + + + + + + +
+
+ +
+
+ +
+ + Back to Schedule + +
+ <?php echo htmlspecialchars($speaker['name']); ?> +
+
+

+

+ Back to Schedule +
+ + +
+ + + + + + + \ No newline at end of file