This commit is contained in:
Flatlogic Bot 2025-10-30 13:01:48 +00:00
parent c733efa8ca
commit d553a4a914
3 changed files with 80 additions and 3 deletions

View File

@ -0,0 +1 @@
ALTER TABLE attendees ADD COLUMN deleted_at TIMESTAMP NULL DEFAULT NULL;

View File

@ -11,7 +11,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['email'])) {
$password = isset($_POST['password']) ? $_POST['password'] : ''; $password = isset($_POST['password']) ? $_POST['password'] : '';
// Admin Login // 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'; $_SESSION['user'] = 'admin';
header('Location: admin.php'); header('Location: admin.php');
exit; exit;

View File

@ -74,9 +74,84 @@ try {
} }
// --- SEND CONFIRMATION EMAIL --- // --- 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"; $subject = "Confirmation: You're Registered for Building Scalable Apps with AppWizzy";
$body_html = "<h1>You're in!</h1><p>Thanks for registering for our webinar: <strong>Building Scalable Apps with AppWizzy</strong>.</p><p style='font-size: 0.8em;'><strong>Professional Vibe-Coding Webinar</strong></p><p>It will take place on <strong>" . $webinar_date_obj->format('l, F j, Y \a\t g:i A T') . "</strong>.</p><p>You can now log in to your dashboard to see the details.</p>"; $webinar_date_obj = new DateTime('2025-11-19 10:00:00', new DateTimeZone('America/New_York'));
$body_html = <<<HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Webinar Registration Confirmation</title>
</head>
<body style="font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background-color: #f4f4f4; color: #333; margin: 0; padding: 0;">
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="background-color: #f4f4f4;">
<tr>
<td align="center">
<table width="600" border="0" cellspacing="0" cellpadding="0" style="background-color: #ffffff; margin: 20px auto; border-radius: 10px; box-shadow: 0 4px 8px rgba(0,0,0,0.1);">
<!-- Header -->
<tr>
<td align="center" style="padding: 40px 20px; background: linear-gradient(135deg, #1a237e 0%, #673ab7 100%); border-radius: 10px 10px 0 0;">
<img src="{$logo_url}" alt="AppWizzy Logo" style="height: 60px; margin-bottom: 20px;">
<h1 style="color: #ffffff; font-size: 28px; margin: 0; line-height: 1.2;">You're Registered!</h1>
</td>
</tr>
<!-- Body -->
<tr>
<td style="padding: 40px 30px;">
<h2 style="font-size: 22px; color: #1a237e;">Hello {$first_name},</h2>
<p style="font-size: 16px; line-height: 1.6;">Thank you for registering for the <strong>Building Scalable Apps with AppWizzy</strong> webinar.</p>
<p style="font-size: 16px; line-height: 1.6;">We're excited to have you join us for this professional vibe-coding session.</p>
<div style="background-color: #f9f9f9; border-left: 4px solid #673ab7; padding: 15px 20px; margin: 20px 0;">
<p style="margin: 0; font-size: 16px;"><strong>Webinar Details:</strong></p>
<p style="margin: 10px 0 0; font-size: 16px;">{$webinar_date_obj->format('l, F j, Y | g:i A T')}</p>
</div>
<p style="font-size: 16px; line-height: 1.6;">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.</p>
<p style="text-align: center; margin-top: 30px;">
<a href="{$protocol}://{$host}/login.php" style="background: linear-gradient(135deg, #3f51b5 0%, #9c27b0 100%); color: #ffffff; padding: 12px 25px; text-decoration: none; border-radius: 8px; font-weight: bold;">Access Your Dashboard</a>
</p>
</td>
</tr>
<!-- Speakers -->
<tr>
<td style="padding: 0 30px 30px;">
<h3 style="text-align: center; color: #1a237e; border-top: 1px solid #eeeeee; padding-top: 30px;">Meet the Speakers</h3>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" style="padding: 10px;">
<p style="margin: 0; font-weight: bold;">Philip Daineka</p>
<p style="margin: 5px 0 0; color: #777;">CEO, AppWizzy</p>
</td>
<td align="center" style="padding: 10px;">
<p style="margin: 0; font-weight: bold;">Alexandr Rubanau</p>
<p style="margin: 5px 0 0; color: #777;">Lead Engineer</p>
</td>
<td align="center" style="padding: 10px;">
<p style="margin: 0; font-weight: bold;">Alexey Vertel</p>
<p style="margin: 5px 0 0; color: #777;">Lead Engineer</p>
</td>
</tr>
</table>
</td>
</tr>
<!-- Footer -->
<tr>
<td align="center" style="padding: 20px; background-color: #f4f4f4; border-top: 1px solid #dddddd;">
<p style="margin: 0; color: #777;">&copy; 2025 AppWizzy. All rights reserved.</p>
<p style="margin: 5px 0 0; color: #777;">You can <a href="{$protocol}://{$host}/" style="color: #3f51b5;">visit our website</a> for more information.</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
HTML;
MailService::sendMail($email, $subject, $body_html); MailService::sendMail($email, $subject, $body_html);
// --- PREPARE SUCCESS RESPONSE --- // --- PREPARE SUCCESS RESPONSE ---