This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="ro"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Newsletter Admin - Abonați</title> | |
| <style> | |
| body { | |
| font-family: Arial, sans-serif; | |
| margin: 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Enable error reporting for debugging (disable in production) | |
| ini_set('display_errors', 1); | |
| ini_set('display_startup_errors', 1); | |
| error_reporting(E_ALL); | |
| // Set JSON header first | |
| header('Content-Type: application/json; charset=utf-8'); | |
| header('Access-Control-Allow-Origin: *'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class SimpleNewsletter extends HTMLElement { | |
| constructor() { | |
| super(); | |
| this.attachShadow({ mode: 'open' }); | |
| // Get attributes or set defaults | |
| this.title = this.getAttribute('title') || 'Newsletter'; | |
| this.description = this.getAttribute('description') || 'Abonează-te pentru noutăți!'; | |
| this.apiUrl = this.getAttribute('api-url') || 'newsletter.php'; | |
| this.variant = this.getAttribute('variant') || 'default'; // default, compact, footer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="ro"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Newsletter Web Component Demo</title> | |
| <style> | |
| body { | |
| margin: 0; | |
| padding: 20px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ContactFab extends HTMLElement { | |
| constructor() { | |
| super(); | |
| this.attachShadow({ mode: 'open' }); | |
| this.isOpen = false; | |
| // Get attributes or set defaults | |
| this.whatsappNumber = this.getAttribute('whatsapp') || '+1234567890'; | |
| this.emailAddress = this.getAttribute('email') || '[email protected]'; | |
| this.phoneNumber = this.getAttribute('phone') || '+1234567890'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| ini_set('display_errors', 1); | |
| ini_set('display_startup_errors', 1); | |
| error_reporting(E_ALL); | |
| require 'PHPMailer/src/Exception.php'; | |
| require 'PHPMailer/src/PHPMailer.php'; | |
| require 'PHPMailer/src/SMTP.php'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Contact FAB Web Component Demo</title> | |
| <style> | |
| body { | |
| margin: 0; | |
| padding: 20px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Set sendmail_from address explicitly to ensure the correct "From" address | |
| ini_set('sendmail_from', '[email protected]'); | |
| // 1. Define recipient email, subject, and "From" address | |
| $to = "[email protected]"; // Replace with the recipient's email address | |
| $subject = "New Contact Form Submission"; | |
| $from = "[email protected]"; // Specify the "From" email address | |
| // 2. Collect form data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Contact Form</title> | |
| </head> | |
| <body> | |
| <form action="contact.php" method="POST"> | |
| <label for="name">Name:</label> | |
| <input type="text" id="name" name="name" required><br><br> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $to = '[email protected]'; | |
| $subject = 'Test mail'; | |
| $message = 'Aceasta este o scrisoare de test.'; | |
| $headers = 'From: [email protected]' . "\r\n" . | |
| 'Reply-To: [email protected]' . "\r\n" . | |
| 'X-Mailer: PHP/' . phpversion(); | |
| if (mail($to, $subject, $message, $headers)) { | |
| echo "Email trimis cu succes!"; |