From d553a4a9149c5c31c3ba87814fa943fe9ce68bb9 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Thu, 30 Oct 2025 13:01:48 +0000 Subject: [PATCH] email --- .../009_add_deleted_at_to_attendees.sql | 1 + login.php | 3 +- register.php | 79 ++++++++++++++++++- 3 files changed, 80 insertions(+), 3 deletions(-) create mode 100644 db/migrations/009_add_deleted_at_to_attendees.sql diff --git a/db/migrations/009_add_deleted_at_to_attendees.sql b/db/migrations/009_add_deleted_at_to_attendees.sql new file mode 100644 index 0000000..1f8758e --- /dev/null +++ b/db/migrations/009_add_deleted_at_to_attendees.sql @@ -0,0 +1 @@ +ALTER TABLE attendees ADD COLUMN deleted_at TIMESTAMP NULL DEFAULT NULL; \ No newline at end of file diff --git a/login.php b/login.php index 9cbbc86..96f80ea 100644 --- a/login.php +++ b/login.php @@ -11,7 +11,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['email'])) { $password = isset($_POST['password']) ? $_POST['password'] : ''; // Admin Login - if ($email === 'admin@gmail.com' && $password === 'admin') { + // Hardcoded admin credentials (consider a more secure solution) + if ($email === 'admin@example.com' && $password === 'admin') { $_SESSION['user'] = 'admin'; header('Location: admin.php'); exit; diff --git a/register.php b/register.php index 7baafc9..6ce79f3 100644 --- a/register.php +++ b/register.php @@ -74,9 +74,84 @@ try { } // --- SEND CONFIRMATION EMAIL --- - $webinar_date_obj = new DateTime('2025-11-19 10:00:00', new DateTimeZone('America/New_York')); + $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http'; + $host = $_SERVER['HTTP_HOST']; + $logo_url = $protocol . '://' . $host . '/assets/pasted-20251030-095744-1b7c02ab.png'; $subject = "Confirmation: You're Registered for Building Scalable Apps with AppWizzy"; - $body_html = "

You're in!

Thanks for registering for our webinar: Building Scalable Apps with AppWizzy.

Professional Vibe-Coding Webinar

It will take place on " . $webinar_date_obj->format('l, F j, Y \a\t g:i A T') . ".

You can now log in to your dashboard to see the details.

"; + $webinar_date_obj = new DateTime('2025-11-19 10:00:00', new DateTimeZone('America/New_York')); + + $body_html = << + + + + + Webinar Registration Confirmation + + + + + + +
+ + + + + + + + + + + + + + + + + +
+ AppWizzy Logo +

You're Registered!

+
+

Hello {$first_name},

+

Thank you for registering for the Building Scalable Apps with AppWizzy webinar.

+

We're excited to have you join us for this professional vibe-coding session.

+
+

Webinar Details:

+

{$webinar_date_obj->format('l, F j, Y | g:i A T')}

+
+

You'll learn the fastest way to go from an idea to a working app you own, running on your server, with your database, using real frameworks.

+

+ Access Your Dashboard +

+
+

Meet the Speakers

+ + + + + + +
+

Philip Daineka

+

CEO, AppWizzy

+
+

Alexandr Rubanau

+

Lead Engineer

+
+

Alexey Vertel

+

Lead Engineer

+
+
+

© 2025 AppWizzy. All rights reserved.

+

You can visit our website for more information.

+
+
+ + +HTML; MailService::sendMail($email, $subject, $body_html); // --- PREPARE SUCCESS RESPONSE ---