diff --git a/add_attendee.php b/add_attendee.php new file mode 100644 index 0000000..40e0786 --- /dev/null +++ b/add_attendee.php @@ -0,0 +1,39 @@ +prepare( + "INSERT INTO attendees (name, email, company, occupation, relation) VALUES (:name, :email, :company, :occupation, :relation)" + ); + $stmt->bindParam(':name', $name, PDO::PARAM_STR); + $stmt->bindParam(':email', $email, PDO::PARAM_STR); + $stmt->bindParam(':company', $company, PDO::PARAM_STR); + $stmt->bindParam(':occupation', $occupation, PDO::PARAM_STR); + $stmt->bindParam(':relation', $relation, PDO::PARAM_STR); + + $stmt->execute(); + + header('Location: index.php?status=success'); + exit; + } catch (PDOException $e) { + // In a real app, log this error. + header('Location: index.php?status=error'); + exit; + } +} else { + header('Location: index.php'); + exit; +} diff --git a/assets/css/custom.css b/assets/css/custom.css new file mode 100644 index 0000000..0eb9e42 --- /dev/null +++ b/assets/css/custom.css @@ -0,0 +1,44 @@ +body { + background-color: #f8f9fa; /* Light gray background */ + font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; +} + +.hero { + background: linear-gradient(135deg, #6f42c1, #4a148c); /* Purple gradient */ + color: white; + padding: 4rem 2rem; + border-radius: 0.5rem; +} + +.hero h1 { + font-weight: 700; +} + +.form-section, .list-section { + background: #ffffff; /* White */ + padding: 2rem; + border-radius: 0.5rem; + box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + margin-top: 2rem; +} + +.btn-primary { + background-color: #dc3545; /* Red */ + border-color: #dc3545; /* Red */ +} + +.btn-primary:hover { + background-color: #c82333; /* Darker Red */ + border-color: #bd2130; /* Darker Red */ +} + +.table { + margin-top: 1.5rem; +} + +.toast-container { + position: fixed; + top: 1rem; + right: 1rem; + z-index: 1055; +} \ No newline at end of file diff --git a/assets/js/main.js b/assets/js/main.js new file mode 100644 index 0000000..6560d64 --- /dev/null +++ b/assets/js/main.js @@ -0,0 +1,48 @@ +window.addEventListener('DOMContentLoaded', (event) => { + const params = new URLSearchParams(window.location.search); + const status = params.get('status'); + + if (status) { + let message = ''; + let type = ''; + + if (status === 'success') { + message = 'Thank you for joining the friends list!'; + type = 'success'; + } else if (status === 'error') { + message = 'There was an error with your submission. Please try again.'; + type = 'danger'; + } + + if (message) { + showToast(message, type); + // Clean URL + window.history.replaceState({}, document.title, window.location.pathname); + } + } +}); + +function showToast(message, type = 'success') { + const toastContainer = document.getElementById('toast-container'); + if (!toastContainer) return; + + const toastId = 'toast-' + Date.now(); + const toastHTML = ` + + `; + + toastContainer.insertAdjacentHTML('beforeend', toastHTML); + const toastElement = document.getElementById(toastId); + const toast = new bootstrap.Toast(toastElement, { delay: 5000 }); + toast.show(); + toastElement.addEventListener('hidden.bs.toast', () => { + toastElement.remove(); + }); +} diff --git a/db/setup.php b/db/setup.php new file mode 100644 index 0000000..3d865b1 --- /dev/null +++ b/db/setup.php @@ -0,0 +1,20 @@ +exec($sql); +} catch (PDOException $e) { + // In a real app, you'd log this error. + // For this example, we'll just ignore it if the table already exists. +} diff --git a/index.php b/index.php index 7205f3d..217dd00 100644 --- a/index.php +++ b/index.php @@ -1,150 +1,139 @@ query("SELECT name, company, occupation, relation, created_at FROM attendees ORDER BY created_at DESC"); + $attendees = $stmt->fetchAll(PDO::FETCH_ASSOC); +} catch (PDOException $e) { + // Silently fail for now, or log error +} ?> - + - - - New Style - - - - - - - - - - - - - - - - - - - + + + Belarusians Worldwide Friends + + + + + + + + + + + + + -
-
-

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

+ +
+ +
+
+

Belarusians Worldwide Friends

+

A welcoming corner at Web Summit where Belarusian founders, engineers, investors, creatives, and ecosystem builders meet, share, and show that we keep building - wherever we are.

+
+ +
+
+

Join the Friends List

+

Leave your details to connect with the Belarusian tech community at Web Summit.

+
+
+ + +
Please enter your name.
+
+
+ + +
Please enter a valid email address.
+
+
+ + +
+
+ + +
+
+ + +
+ +
+
+ +
+

Our Friends & Associates

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameCompany / StartupOccupationRelationDate Joined
Be the first to join the list!
+
+
+
+ +
-
- + + + + - + \ No newline at end of file