Server : LiteSpeed System : Linux us-phx-web1202.main-hosting.eu 4.18.0-553.84.1.lve.el8.x86_64 #1 SMP Tue Nov 25 18:33:03 UTC 2025 x86_64 User : u615232177 ( 615232177) PHP Version : 8.1.33 Disable Function : NONE Directory : /home/u615232177/domains/ellexsleevesapartments.com/public_html/ |
<?php use PHPMailer\PHPMailer\PHPMailer;use PHPMailer\PHPMailer\Exception;use PHPMailer\PHPMailer\SMTP; session_start();
$page_name = basename($_SERVER['PHP_SELF']);
$page_title = "Contact us";
$page_header = "ea39d5f88c.jpg";
include("header.php"); ?>
<title><?php echo $company_name; ?> - <?php echo $page_title; ?></title>
<?php include("page_header.php"); ?>
<?php
$msg='';$captcha_error=""; $errors=0;
if (isset($_POST["send_message"])) {
//include("captcha_start.php");
if($errors == 0){
$subject = mysqli_real_escape_string($con,$_POST['subject']);
$last_name = mysqli_real_escape_string($con,$_POST['last_name']);
$first_name = mysqli_real_escape_string($con,$_POST['first_name']);
$email = mysqli_real_escape_string($con,$_POST['email']);
$message1 = mysqli_real_escape_string($con,$_POST['message']);
$msg = '';
require 'PHPMailer/src/PHPMailer.php';
require 'PHPMailer/src/SMTP.php';
require 'PHPMailer/src/Exception.php';
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->Host = "smtp.hostinger.com"; // sets the SMTP server
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // Set encryption to STARTTLS
$mail->Port = 587; // Use port 587 for TLS
$mail->Username = "$no_reply_email"; // SMTP account username
$mail->Password = "$no_reply_password"; // SMTP account password
$mail->SetFrom("$no_reply_email", "$company_name");//Use a fixed address in your own domain as the from address
$mail->AddReplyTo("$email","$email"); //Put the submitter's address in a reply-to header
$mail->Subject = "$subject";
$mail->MsgHTML("<html><body>$message1</body></html>");
$mail->AddAddress("$company_email", "Contact Form");//Send the message to yourself, or whoever should receive contact for submissions
//$mail->AddAttachment(""); // attachment
if(!$mail->Send()) {
//echo "Mailer Error: " . $mail->ErrorInfo;
$msg = "<div class='alert alert-danger'>
<a href='#' class='close' data-dismiss='alert' aria-label='close'>×</a>
<b>Something went wrong, please try again</b>
</div>";
}
else {
$msg = "<div class='alert alert-success'>
<a href='#' class='close' data-dismiss='alert' aria-label='close'>×</a>
<b>Email Sent</b>
</div>";
}
//email an autoresponse to the person too
$mail->clearAddresses();
$mail->clearReplyTos();
$subject1 = "Thanks for contacting us"; // form field
$email_topic = "Thanks for contacting us";
$button_link = "$link";
$button_text = "Visit our website";
$message="";
include("email_header.php");
$message .= "
Dear $first_name,<br/><br/>
Thank you for reaching out to us! We have received your message and our team is already reviewing it. You will hear from us soon with an update.
<br/><br/>
The $company_name Team.<br/>
$email_logo
";
include("email_footer.php");
$mail->SetFrom("$no_reply_email", "$company_name");//Use a fixed address in your own domain as the from add
$mail->AddAddress("$email", "$email");//Send the message to yourself, or whoever should receive contact for submissions
$mail->AddReplyTo("$company_email", "$company_name"); //Put the submitter's address in a reply-to header
$mail->Subject = "$subject1";
$mail->MsgHTML("<html><body>$message<br></body></html>");
if(!$mail->Send()) {
//echo "Mailer Error: " . $mail->ErrorInfo;
//$msg = "Email not sent, please try again Mailer Error: ".$mail->ErrorInfo;
$msg = "<div class='alert alert-success'>
<a href='#' class='close' data-dismiss='alert' aria-label='close'>×</a>
<b>Your message was sucessfully sent!</b>
</div>";
}
else {
//echo "Thanks for getting in touch, we will get back to ASAP";
$msg = "<div class='alert alert-success'>
<a href='#' class='close' data-dismiss='alert' aria-label='close'>×</a>
<b>Your message was sucessfully sent!</b>
</div>";
}
}
}
?>
<br><br>
<!-- Contact Info Box Section Start -->
<div class="contact-info-box">
<div class="container">
<div class="row">
<div class="col-lg-3 col-md-6">
<!-- Contact Info Item Start -->
<div class="contact-info-item wow fadeInUp">
<div class="icon-box">
<img src="images/icon-phone.svg" alt="">
</div>
<div class="contact-info-content">
<h3>Contact Us</h3>
<p><a href="tel:<?= $company_phone ?>"><?= $company_phone ?></a></p>
</div>
</div>
<!-- Contact Info Item End -->
</div>
<div class="col-lg-3 col-md-6">
<!-- Contact Info Item Start -->
<div class="contact-info-item wow fadeInUp" data-wow-delay="0.2s">
<div class="icon-box">
<img src="images/icon-mail.svg" alt="">
</div>
<div class="contact-info-content">
<h3>E-mail Address </h3>
<p><a href=""><?= $company_email ?></a></p>
</div>
</div>
<!-- Contact Info Item End -->
</div>
<div class="col-lg-3 col-md-6">
<!-- Contact Info Item Start -->
<div class="contact-info-item wow fadeInUp" data-wow-delay="0.4s">
<div class="icon-box">
<img src="images/icon-location.svg" alt="">
</div>
<div class="contact-info-content">
<h3>Address</h3>
<p><?= $company_address ?></p>
</div>
</div>
<!-- Contact Info Item End -->
</div>
<div class="col-lg-3 col-md-6">
<!-- Contact Info Item Start -->
<div class="contact-info-item wow fadeInUp" data-wow-delay="0.6s">
<div class="icon-box">
<img src="images/icon-clock.svg" alt="">
</div>
<div class="contact-info-content">
<h3>Working Hours</h3>
<p>Mon-Fri : 9:00am to 5:00pm</p>
</div>
</div>
<!-- Contact Info Item End -->
</div>
</div>
</div>
</div>
<!-- Contact Info Box Section End -->
<!-- Page Contact Us Start -->
<div class="page-contact-us">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="contact-us-box">
<!-- Contact Us Content Start -->
<div class="contact-form">
<!-- Section Title Start -->
<div class="section-title">
<h2 class="text-anime-style-3" data-cursor="-opaque">Get in Touch with Us</h2>
</div>
<!-- Section Title End -->
<?= $msg ?>
<form id="contactFor" action="contact" method="post" data-toggle="validato" class="wow fadeInUp" data-wow-delay="0.2s">
<div class="row">
<div class="form-group col-md-6 mb-4">
<input type="text" name="first_name" class="form-control" id="fname" placeholder="First Name" required>
<div class="help-block with-errors"></div>
</div>
<div class="form-group col-md-6 mb-4">
<input type="text" name="last_name" class="form-control" id="lname" placeholder="Last Name" required>
<div class="help-block with-errors"></div>
</div>
<div class="form-group col-md-6 mb-4">
<input type="email" name ="email" class="form-control" id="email" placeholder="E-mail Address" required>
<div class="help-block with-errors"></div>
</div>
<div class="form-group col-md-6 mb-4">
<input type="text" name="subject" class="form-control" id="subject" placeholder="Subject" required>
<div class="help-block with-errors"></div>
</div>
<div class="form-group col-md-12">
<textarea name="message" class="form-control" id="message" rows="4" placeholder="Write Message"></textarea>
</div>
<div class='col-12'><?php include("captcha_end.php"); ?></div>
<div class="col-md-12">
<button type="submit" name='send_message' class="btn-main"><span>send message</span></button>
</div>
</div>
</form>
</div>
<!-- Contact Us Content End -->
</div>
</div>
</div>
</div>
</div>
<!-- Page Contact Us End -->
<br><br>
<!-- Google Map Section Start -->
<div class="google-map">
<div class="container">
<div class="row">
<div class="col-lg-12">
<!-- Google Map IFrame Start -->
<div class="google-map-iframe">
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3956.4937497262813!2d3.9118620747619857!3d7.410475892599777!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x103992af841db423%3A0x61f22aa03806e240!2sAgodi%20Gra%2C%20Agodi%2C%20Ibadan%20200285%2C%20Oyo!5e0!3m2!1sen!2sng!4v1755283626258!5m2!1sen!2sng" allowfullscreen="" loading="lazy" style='width:100%;height:400px;' referrerpolicy="no-referrer-when-downgrade"></iframe>
</div>
<!-- Google Map IFrame End -->
<br><br>
</div>
</div>
</div>
</div>
<!-- Google Map Section End -->
<?php include("footer.php"); ?>