diff --git a/assets/pasted-20251017-115952-0d605af0.png b/assets/pasted-20251017-115952-0d605af0.png new file mode 100644 index 0000000..a154ee7 Binary files /dev/null and b/assets/pasted-20251017-115952-0d605af0.png differ diff --git a/assets/pasted-20251017-120438-de869d16.png b/assets/pasted-20251017-120438-de869d16.png new file mode 100644 index 0000000..324f603 Binary files /dev/null and b/assets/pasted-20251017-120438-de869d16.png differ diff --git a/index.php b/index.php index 7810d64..6697f9a 100644 --- a/index.php +++ b/index.php @@ -258,7 +258,10 @@ Add to Outlook/iCal
+ Thanks for registering for our webinar: {$webinar['title']}.
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-12-29 13:00:00', new DateTimeZone('America/New_York')); + $subject = "Confirmation: You're Registered for Professional Vibe-Coding Webinar by Flatlogic"; + $body_html = "Thanks for registering for our webinar: Professional Vibe-Coding Webinar by Flatlogic.
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.
"; MailService::sendMail($email, $subject, $body_html); // --- PREPARE SUCCESS RESPONSE --- - $webinar_date = new DateTime($webinar['scheduled_at'], new DateTimeZone('UTC')); - $start_time_utc = $webinar_date->format('Ymd H is Z'); + $webinar_date = new DateTime('2025-12-29 13:00:00', new DateTimeZone('America/New_York')); + $webinar_date->setTimezone(new DateTimeZone('UTC')); + $start_time_utc = $webinar_date->format('Ymd\THis\Z'); $webinar_date->add(new DateInterval('PT1H')); // Assume 1 hour duration - $end_time_utc = $webinar_date->format('Ymd H is Z'); + $end_time_utc = $webinar_date->format('Ymd\THis\Z'); - $google_link = 'https://www.google.com/calendar/render?action=TEMPLATE&text=' . urlencode($webinar['title']) . '&dates=' . $start_time_utc . '/' . $end_time_utc . '&details=' . urlencode($webinar['description']) . '&ctz=UTC'; + $google_link = 'https://www.google.com/calendar/render?action=TEMPLATE&text=' . urlencode('Professional Vibe-Coding Webinar by Flatlogic') . '&dates=' . $start_time_utc . '/' . $end_time_utc . '&details=' . urlencode('The fastest way to go from an idea to a working app you own, running on your server, with your database, using real frameworks.') . '&location=' . urlencode('Online') . '&ctz=UTC'; - $ics_content = implode("\n", [ - 'BEGIN:VCALENDAR', 'VERSION:2.0', 'BEGIN:VEVENT', + $ics_content = implode("\r\n", [ + 'BEGIN:VCALENDAR', + 'VERSION:2.0', + 'PRODID:-//Flatlogic//Professional Vibe-Coding Webinar//EN', + 'BEGIN:VEVENT', 'URL:' . 'http://' . $_SERVER['HTTP_HOST'], - 'DTSTART:' . $start_time_utc, 'DTEND:' . $end_time_utc, - 'SUMMARY:' . $webinar['title'], 'DESCRIPTION:' . $webinar['description'], - 'END:VEVENT', 'END:VCALENDAR' + 'DTSTART;TZID=UTC:' . $start_time_utc, + 'DTEND;TZID=UTC:' . $end_time_utc, + 'SUMMARY:Professional Vibe-Coding Webinar by Flatlogic', + 'DESCRIPTION:The fastest way to go from an idea to a working app you own, running on your server, with your database, using real frameworks.', + 'LOCATION:Online', + 'END:VEVENT', + 'END:VCALENDAR' ]); $outlook_link = 'data:text/calendar;charset=utf-8,' . rawurlencode($ics_content); echo json_encode([ 'success' => true, - 'webinar_title' => $webinar['title'], + 'webinar_title' => 'Professional Vibe-Coding Webinar by Flatlogic', 'google_link' => $google_link, 'outlook_link' => $outlook_link ]);