added more preview pages and more templates

This commit is contained in:
2026-07-21 07:10:03 -05:00
parent c6119ffdf5
commit b19fdee30d
3726 changed files with 651487 additions and 6169 deletions
@@ -0,0 +1,102 @@
<?php
if (
isset($_POST['name']) && isset($_POST['email']) && isset($_POST['number'])
&& isset($_POST['position']) && isset($_POST['location'])
&& isset($_POST['education']) && isset($_POST['experience'])
&& isset($_POST['message'])
) {
// Sanitize user inputs
$name = htmlspecialchars(trim($_POST['name']));
$email = htmlspecialchars(trim($_POST['email']));
$number = htmlspecialchars(trim($_POST['number']));
$position = htmlspecialchars(trim($_POST['position']));
$location = htmlspecialchars(trim($_POST['location']));
$education = htmlspecialchars(trim($_POST['education']));
$experience = htmlspecialchars(trim($_POST['experience']));
$message = htmlspecialchars(trim($_POST['message']));
// Styled HTML Email Content
$html = "
<div style='font-family: Arial, sans-serif; max-width: 600px; margin: auto; border: 1px solid #ddd; padding: 12px; background-color: #ffffff;'>
<h2 style='background: linear-gradient(45deg, #2E7D32, #4CAF50);color: #fff; margin: 0; text-align: center; padding: 15px;'>New Career Application</h2>
<table style='width: 100%; border-collapse: collapse; margin-top: 10px; border: 1px solid #ddd;'>
<tr>
<td style='padding: 12px; border-bottom: 1px solid #ddd; font-weight: bold; border-right: 1px solid #ddd;'>Name:</td>
<td style='padding: 12px; border-bottom: 1px solid #ddd;'>$name</td>
</tr>
<tr>
<td style='padding: 12px; border-bottom: 1px solid #ddd; font-weight: bold; border-right: 1px solid #ddd;'>Email:</td>
<td style='padding: 12px; border-bottom: 1px solid #ddd;'><a href='mailto:$email' style='color: #007BFF; text-decoration: none;'>$email</a></td>
</tr>
<tr>
<td style='padding: 12px; border-bottom: 1px solid #ddd; font-weight: bold; border-right: 1px solid #ddd;'>Phone Number:</td>
<td style='padding: 12px; border-bottom: 1px solid #ddd;'>$number</td>
</tr>
<tr>
<td style='padding: 12px; border-bottom: 1px solid #ddd; font-weight: bold; border-right: 1px solid #ddd;'>Position Applied For:</td>
<td style='padding: 12px; border-bottom: 1px solid #ddd;'>$position</td>
</tr>
<tr>
<td style='padding: 12px; border-bottom: 1px solid #ddd; font-weight: bold; border-right: 1px solid #ddd;'>Location:</td>
<td style='padding: 12px; border-bottom: 1px solid #ddd;'>$location</td>
</tr>
<tr>
<td style='padding: 12px; border-bottom: 1px solid #ddd; font-weight: bold; border-right: 1px solid #ddd;'>Highest Qualification:</td>
<td style='padding: 12px; border-bottom: 1px solid #ddd;'>$education</td>
</tr>
<tr>
<td style='padding: 12px; border-bottom: 1px solid #ddd; font-weight: bold; border-right: 1px solid #ddd;'>Years of Experience:</td>
<td style='padding: 12px; border-bottom: 1px solid #ddd;'>$experience</td>
</tr>
<tr>
<td style='padding: 12px; font-weight: bold; border-right: 1px solid #ddd;'>Message:</td>
<td style='padding: 12px;'>$message</td>
</tr>
</table>
<p style='text-align: center; font-size: 14px; color: #666; margin-top: 20px;'>
<em>Sent via LeafLine Career Application Form</em>
</p>
</div>";
include('smtp/PHPMailerAutoload.php');
$mail = new PHPMailer(true);
// SMTP Settings
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = "smtp.gmail.com"; // SMTP servers
$mail->Port = 587; // Specify SMTP Port
$mail->SMTPSecure = "tls"; // Enable TLS encryption, `ssl` also accepted
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username="your_email@gmail.com"; // Your Mail
$mail->Password="Your App Password"; // Your App Password
$mail->setFrom($email, $name);
$mail->addAddress('your_email@gmail.com', "your name");
$mail->IsHTML(true); // Set email format to HTML
$mail->Subject = "(LeafLine) Career Application";
$mail->Body = $html;
$mail->SMTPOptions = array('ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => false
));
$msg = "";
if ($mail->send()) {
$msg = "Form submitted successfully!";
} else {
$msg = "Error Occur";
}
echo $msg;
}
?>
@@ -0,0 +1,61 @@
<?php
if (isset($_POST['email'])) {
$user_email = $_POST['email'];
// HTML content for the user's confirmation email
$user_html = "
<div style='font-family: Arial, sans-serif; max-width: 600px; margin: auto; border: 1px solid #ddd; padding: 12px;'>
<div style='font-size: 20px; background: linear-gradient(45deg, #2E7D32, #4CAF50); color: #fff; text-align: center; padding: 20px;'><strong>Thank You for Subscribing!</strong></div>
<p style='font-size: 16px; text-align: center; color: #000;'>You have successfully subscribed to our newsletter</p>
<p style='background-color: #f4f4f4; color: #000; padding: 10px; border-radius: 5px; text-align: center;'><strong>Email:</strong> $user_email</p>
<p style='text-align: center; color: #000;'>Stay tuned for updates and exclusive offers!</p>
</div>";
// HTML content for the notification email to the website owner
$owner_html = "
<div style='font-family: Arial, sans-serif; max-width: 600px; margin: auto;border: 1px solid #ddd;'>
<h2 style='background: linear-gradient(45deg, #2E7D32, #4CAF50); color: #fff; text-align: center; padding: 20px; margin: 0;'>New Newsletter Subscriber</h2>
<div style='padding: 10px 15px;'>
<p style='font-size: 16px;'>You have a new subscriber:</p>
<p style='background-color: #f4f4f4; padding: 10px; border-radius: 5px; text-align: center;'><strong>Email:</strong> $user_email</p>
</div>
</div>";
// Include PHPMailer autoload file
require 'smtp/PHPMailerAutoload.php';
$mail = new PHPMailer(true); // Passing `true` enables exceptions
try {
// SMTP settings
$mail->isSMTP();
$mail->Host = 'smtp.gmail.com'; // Specify main and backup SMTP servers
$mail->Port = 587; // TCP port to connect to
$mail->SMTPSecure = 'tls'; // Enable TLS encryption
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = 'your_email@gmail.com'; // SMTP username (your Gmail email)
$mail->Password = 'Your App Password'; // SMTP password (your app password from Gmail)
// Send confirmation email to the user
$mail->setFrom('your_email@gmail.com', 'LeafLine'); // Sender's email and name
$mail->addAddress($user_email); // User's email address
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = 'Newsletter Subscription Confirmation'; // Email subject
$mail->Body = $user_html; // Email body
$mail->send();
// Send notification email to the website owner
$mail->clearAddresses(); // Clear previous recipients
$mail->addAddress('your_email@gmail.com', 'LeafLine'); // Recipient's email and name
$mail->Subject = 'New Newsletter Subscriber'; // Email subject
$mail->Body = $owner_html; // Email body
$mail->send();
$msg = "Thank you for subscribing!";
} catch (Exception $e) {
$msg = "Error occurred while sending email. Please try again later.";
}
echo $msg; // Output the result message
}
?>
+122
View File
@@ -0,0 +1,122 @@
<?php
if (
isset($_POST['name']) && isset($_POST['email']) && isset($_POST['number'])
&& isset($_POST['service-type']) && isset($_POST['address']) && isset($_POST['property-type'])
&& isset($_POST['area-size']) && isset($_POST['garden-style']) && isset($_POST['project-urgency'])
) {
// Sanitize user inputs
$name = htmlspecialchars(trim($_POST['name']));
$email = htmlspecialchars(trim($_POST['email']));
$number = htmlspecialchars(trim($_POST['number']));
$serviceType = htmlspecialchars(trim($_POST['service-type']));
$address = htmlspecialchars(trim($_POST['address']));
$propertyType = htmlspecialchars(trim($_POST['property-type']));
$areaSize = htmlspecialchars(trim($_POST['area-size']));
$gardenStyle = htmlspecialchars(trim($_POST['garden-style']));
$projectUrgency = htmlspecialchars(trim($_POST['project-urgency']));
$comment = isset($_POST['comment']) ? htmlspecialchars(trim($_POST['comment'])) : '';
$extraServices = isset($_POST['extra-services']) ? implode(', ', $_POST['extra-services']) : '';
// Styled HTML Email Content
$html = "
<div style='font-family: Arial, sans-serif; max-width: 600px; margin: auto; border: 1px solid #ddd; padding: 12px; background-color: #ffffff;'>
<h2 style='background: linear-gradient(45deg, #2E7D32, #4CAF50); color: #fff; margin: 0; text-align: center; padding: 15px;'>New Career Application</h2>
<table style='width: 100%; border-collapse: collapse; margin-top: 10px; border: 1px solid #ddd;'>
<tr>
<td style='padding: 12px; border-bottom: 1px solid #ddd; font-weight: bold; border-right: 1px solid #ddd;'>Name:</td>
<td style='padding: 12px; border-bottom: 1px solid #ddd;'>$name</td>
</tr>
<tr>
<td style='padding: 12px; border-bottom: 1px solid #ddd; font-weight: bold; border-right: 1px solid #ddd;'>Email:</td>
<td style='padding: 12px; border-bottom: 1px solid #ddd;'><a href='mailto:$email' style='color: #007BFF; text-decoration: none;'>$email</a></td>
</tr>
<tr>
<td style='padding: 12px; border-bottom: 1px solid #ddd; font-weight: bold; border-right: 1px solid #ddd;'>Phone Number:</td>
<td style='padding: 12px; border-bottom: 1px solid #ddd;'>$number</td>
</tr>
<tr>
<td style='padding: 12px; border-bottom: 1px solid #ddd; font-weight: bold; border-right: 1px solid #ddd;'>Servie Type:</td>
<td style='padding: 12px; border-bottom: 1px solid #ddd;'>$serviceType</td>
</tr>
<tr>
<td style='padding: 12px; border-bottom: 1px solid #ddd; font-weight: bold; border-right: 1px solid #ddd;'>Address:</td>
<td style='padding: 12px; border-bottom: 1px solid #ddd;'>$address</td>
</tr>
<tr>
<td style='padding: 12px; border-bottom: 1px solid #ddd; font-weight: bold; border-right: 1px solid #ddd;'>Property Type:</td>
<td style='padding: 12px; border-bottom: 1px solid #ddd;'>$propertyType</td>
</tr>
<tr>
<td style='padding: 12px; border-bottom: 1px solid #ddd; font-weight: bold; border-right: 1px solid #ddd;'>Area Size (sq m):</td>
<td style='padding: 12px; border-bottom: 1px solid #ddd;'>$areaSize</td>
</tr>
<tr>
<td style='padding: 12px; border-bottom: 1px solid #ddd; font-weight: bold; border-right: 1px solid #ddd;'>Garden Style:</td>
<td style='padding: 12px; border-bottom: 1px solid #ddd;'>$gardenStyle</td>
</tr>
<tr>
<td style='padding: 12px; border-bottom: 1px solid #ddd; font-weight: bold; border-right: 1px solid #ddd;'>Project Urgency:</td>
<td style='padding: 12px; border-bottom: 1px solid #ddd;'>$projectUrgency</td>
</tr>";
if (!empty($extraServices)) {
$html .= "
<tr>
<td style='padding: 12px; border-bottom: 1px solid #ddd; font-weight: bold; border-right: 1px solid #ddd;'>Extra Services:</td>
<td style='padding: 12px; border-bottom: 1px solid #ddd;'>$extraServices</td>
</tr>";
}
$html .= "
<tr>
<td style='padding: 12px; font-weight: bold; border-right: 1px solid #ddd;'>Comment:</td>
<td style='padding: 12px;'>$comment</td>
</tr>
</table>
<p style='text-align: center; font-size: 14px; color: #666; margin-top: 20px;'>
<em>Sent via LeafLine Career Application Form</em>
</p>
</div>";
include('smtp/PHPMailerAutoload.php');
$mail=new PHPMailer(true);
// smtp Settings
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host="smtp.gmail.com"; // SMTP servers
$mail->Port=587; //specify SMTP Port
$mail->SMTPSecure="tls"; // Enable TLS encryption, `ssl` also accepted
$mail->SMTPAuth=true; // Enable SMTP authentication
$mail->Username="your_email@gmail.com"; // (SMTP Username) Your Mail
$mail->Password="Your App Password"; // (SMTP Password) Your app password
$mail->setFrom($email, $name);
$mail->addAddress("your_email@gmail.com", "test");
$mail->IsHTML(true); // Set email format to HTML
$mail->Subject = "(LeafLine) Quote Form";
$mail->Body = $html;
$mail->SMTPOptions=array('ssl'=>array(
'verify_peer'=>false,
'verify_peer_name'=>false,
'allow_self_signed'=>false
));
$msg="";
if($mail->send()){
//echo "Mail send";
$msg="Form submitted successfully!";
}else{
//echo "Error occur";
$msg="Error Occur";
}
echo $msg;
}
?>
@@ -0,0 +1,51 @@
<?php
/**
* PHPMailer SPL autoloader.
* PHP Version 5
* @package PHPMailer
* @link https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
* @author Brent R. Matzelle (original founder)
* @copyright 2012 - 2014 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
* @note This program is distributed in the hope that it will be useful - WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
* PHPMailer SPL autoloader.
* @param string $classname The name of the class to load
*/
function PHPMailerAutoload($classname)
{
//Can't use __DIR__ as it's only in PHP 5.3+
$filename = dirname(__FILE__).DIRECTORY_SEPARATOR.'class.'.strtolower($classname).'.php';
if (is_readable($filename)) {
require $filename;
}
}
if (version_compare(PHP_VERSION, '5.1.2', '>=')) {
//SPL autoloading was introduced in PHP 5.1.2
if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
spl_autoload_register('PHPMailerAutoload', true, true);
} else {
spl_autoload_register('PHPMailerAutoload');
}
} else {
/**
* Fall back to traditional autoload for old PHP versions
* @param string $classname The name of the class to load
*/
// Removed by Ivan Tcholakov, 09-JAN-2019.
//function __autoload($classname)
//{
// PHPMailerAutoload($classname);
//}
//
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,76 @@
<?php
if(isset($_POST['name']) && isset($_POST['email']) && isset($_POST['number']) && isset($_POST['comment'])){
$name=$_POST['name'];
$email=$_POST['email'];
$number=$_POST['number'];
$comment=$_POST['comment'];
// HTML Email Content with Improved Styling
$html = "
<div style='font-family: Arial, sans-serif; max-width: 600px; margin: auto; border: 1px solid #ddd; padding: 15px; background-color: #ffffff;'>
<h2 style='background: linear-gradient(45deg, #2E7D32, #4CAF50); color: #fff; margin: 0; text-align: center; padding: 15px;'>New Contact Inquiry</h2>
<table style='width: 100%; border-collapse: collapse; margin-top: 10px; border: 1px solid #ddd;'>
<tr>
<td style='padding: 12px; background-color: #f8f8f8; border-right: 1px solid #ddd; border-bottom: 1px solid #ddd; font-weight: bold;'>Name:</td>
<td style='padding: 12px; border-bottom: 1px solid #ddd;'>$name</td>
</tr>
<tr>
<td style='padding: 12px; background-color: #f8f8f8; border-right: 1px solid #ddd; border-bottom: 1px solid #ddd; font-weight: bold;'>Email:</td>
<td style='padding: 12px; border-bottom: 1px solid #ddd;'><a href='mailto:$email' style='color: #007BFF; text-decoration: none;'>$email</a></td>
</tr>
<tr>
<td style='padding: 12px; background-color: #f8f8f8; border-right: 1px solid #ddd; border-bottom: 1px solid #ddd; font-weight: bold;'>Number:</td>
<td style='padding: 12px; border-bottom: 1px solid #ddd;'>$number</td>
</tr>
<tr>
<td style='padding: 12px; background-color: #f8f8f8; font-weight: bold; border-right: 1px solid #ddd;'>Comment:</td>
<td style='padding: 12px;'>$comment</td>
</tr>
</table>
<p style='text-align: center; font-size: 14px; color: #666; margin-top: 20px;'>
<em>Sent via LeafLine Contact Form</em>
</p>
</div>";
include('smtp/PHPMailerAutoload.php');
$mail=new PHPMailer(true);
// smtp Settings
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host="smtp.gmail.com"; // SMTP servers
$mail->Port=587; //specify SMTP Port
$mail->SMTPSecure="tls"; // Enable TLS encryption, `ssl` also accepted
$mail->SMTPAuth=true; // Enable SMTP authentication
$mail->Username="your_email@gmail.com"; // (SMTP Username) Your Mail
$mail->Password="Your App Password"; // (SMTP Password) Your app password
$mail->setFrom($email, $name);
$mail->addAddress("your_email@gmail.com", "LeafLine"); // (Your Mail) An email address that will receive the email with the output of the form
$mail->IsHTML(true); // Set email format to HTML
$mail->Subject = "(LeafLine) New Contact Info";
$mail->Body = $html;
$mail->SMTPOptions=array('ssl'=>array(
'verify_peer'=>false,
'verify_peer_name'=>false,
'allow_self_signed'=>false
));
$msg="";
if($mail->send()){
//echo "Mail send";
$msg="Sent Successfully";
}else{
//echo "Error occur";
$msg="Error Occur";
}
echo $msg;
}
?>