<?php
session_start();
error_reporting(0);
include('backendLTE/phpaccess/linkme.php');

use PHPMailer\PHPMailer\PHPMailer;
//use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;


date_default_timezone_set('Africa/Lagos');// change according timezone
$currentTime = date( 'd-m-Y ' );


require 'PHPMailer/src/PHPMailer.php';
require 'PHPMailer/src/SMTP.php';
require 'PHPMailer/src/Exception.php';

//id firstname lastname email phone subject message date

if(isset($_POST['submit']))
{
$uid=$_SESSION['id'];
$firstname=$_POST['firstname'];
$lastname=$_POST['lastname'];
$email=$_POST['Email'];
$phone=$_POST['phone'];
$subject=$_POST['subject'];
$message=$_POST['message'];
$date=date("d-M-Y");

$query=mysqli_query($con,"insert into contact(firstname,lastname,email,phone,subject,message,date) 
values('$firstname','$lastname','$email','$phone','$subject','$message','$date')");
// code for show complaint number
$sql=mysqli_query($con,"select id from contact  order by id desc limit 1");
while($row=mysqli_fetch_array($sql))
{
 $cmpn=$row['id'];
}
$complainno=$cmpn;
echo '<script> alert("Thank you for your message.")</script>';


//EMAIL sending content trying 

//include("class.phpmailer.php");
//include("class.smtp.php");

$mail = new PHPMailer(true); // create a new object
$mail->IsSMTP(); // enable SMTP
//$mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only
$mail->SMTPAuth = true; // authentication enabled
$mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for Gmail
$mail->Host = "smtp.gmail.com";
$mail->Port = 465; // or 587
$mail->IsHTML(true);
//$mail->Username = "tkgbad09@gmail.com";
//$mail->Password = "mfqrzhwkznsgjqfn";
$mail->Username = "enlpoms@gmail.com";
$mail->Password = "shxikvxkvtqfvbgy";
//$mail->SetFrom("tkgbad09@gmail.com");
$mail->SetFrom("emanifest@enlconsortium.com");
$mail->Subject = "$firstname - You have sent a message to ENL Consortium Limited ";
$mail->Body = "<center><img SRC='http://port.enlconsortium.com/assets/img/logo_mod-a.png' align='bottom'> </center><HR>

<br>

Dear <b><i> $firstname </i></b>,<br>
You have successfully sent a message to us on our website contact channel.<br>

<br> Find below detail of what you had sent us .<br>

<style>
table, th, td {
  border: 1px solid black;
  border-collapse: collapse;
}
th, td {
  padding: 15px;
  text-align: left;
}
#t01 {
  width: 100%;    
  background-color: #b4c9c6;
}
</style>
<table id='t01' style = 'width: 100%; background-color: #b4c9c6; padding: 15px;
  text-align: left;'>
  
  
   <tr>
      <td>
	<strong>First Name : </strong> <br>$firstname 
	</td>  
    
	<td>
	<strong>Last Name : </strong> <br>$lastname
	</td>  
 
   
    </tr>
											
	
	<tr>
     <td>
	<strong>Email : </strong><br>$email
	</td>  
     
	 <td>
	<strong>Phone : </strong><br>$phone
	</td>  
       
    </tr>
											
											
    <tr>
	<td>
	<strong>Subject : </strong><br>$subject
	</td>  
     
	 <td>
	 <strong>Message : </strong><br>$message
	 </td>  
     
	  </tr>
	
  
</table>


<br>

<h2>Thank you </h2>
<HR>";
$mail->AddAddress("$email");
$mail->AddBCC("it@enlconsortium.com");
//$mail->AddBCC("tagtechng@gmail.com");

 if(!$mail->Send()) {
    echo "Mailer Error: " . $mail->ErrorInfo;
 } else {
    //echo "Message has been sent";
 }
 				
//------------------------ END EMail -------------------------



//echo "<script type='text/javascript'> document.location = 'contact.php'; </script>";


}
?>
<!DOCTYPE html>
<html class="no-js" lang="en">

<head>
  <!-- Meta Tags -->
  <meta charset="utf-8" />
  <meta http-equiv="x-ua-compatible" content="ie=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <meta name="author" content="taglogictech" />
   <meta name="keywords" content="ENL, Burma Road, Apapa, Lagos, Amac Plaza (Next to Heritage Building),Kabala Close,Wuse Zone III, Abuja" />
        <meta name="description" content="ENL Consortium Ltd. ENL Consortium Ltd. 26 Burma Road, Apapa, Lagos, Nigeria.Tel: +234-1-2778400 | +234-1-2778401 | +234-1-2778402">
        <meta id="MetaCopyright" name="COPYRIGHT" content="Copyright 2016 by ENL Consortium Limited" />
        
  <!-- Favicon Icon -->
  <link rel="icon" href="assets/img/fav_icon.ico" />
  <!-- Site Title -->
  <title>Contact Us &#8211; ENL Consortium Limited </title>
  <link rel="stylesheet" href="assets/css/plugins/bootstrap.min.css" />
  <link rel="stylesheet" href="assets/css/plugins/swiper.min.css" />
  <link rel="stylesheet" type="text/css" href="assets/fonts/flaticon.css" />
  <link rel="stylesheet" href="assets/css/style.css" />
  
    
  <link rel="alternate" href="http://www.enlconsortium.com" hreflang="en-US"/>
     <meta property="og:determiner" content="the" />
        <meta name="robots" content="index, follow">
        <meta property="og:locale" content="en_US" />
        <meta property="og:locale:alternate" content="en_GB" />
        <meta property="article:author" content="http://www.enlconsortium.com/contact"/>
        <meta property="TAG:author" content="TAG Logic Technology http://www.taglogictech.com"/>
        <meta property="og:type" content="website"/>
        <meta property="og:site_name" content="ENL Consortium Limited" />
        <meta property="og:title" content="Contact Us  &#8211; ENL Consortium Limited"/>
        <meta property="og:description" content="ENL Consortium Ltd. ENL Consortium Ltd. 26 Burma Road, Apapa, Lagos, Nigeria.Tel: +234-1-2778400 | +234-1-2778401 | +234-1-2778402" />
        
         <meta property="og:url" content="http://www.enlconsortium.com/contact"/>
  
</head>

<body>
  <!-- Start Preloader -->
     <?php include("move/preload.php");?>    
  <!-- End Preloader -->

  <!-- Start Header Section -->
  <header class="cs_site_header cs-header-with-bg cs_style1 cs_sticky_header">
     <!-- Header Topbar Start -->
   <?php include("move/topbar.php");?>    
    <!-- End Topbar -->

    <!-- Start Main Header Area -->
	<?php include("move/mainheader.php");?>    
    <!-- End Main Header Area -->
   
  </header>
  <!-- End Header Section -->

  <!-- Start Sidebar -->
  	<?php include("move/Sidebar.php");?>    
  <!-- End Sidebar -->

  <!-- Start Common BreadCrumb -->
  <section>
    <div class="cs-braidcrumb-wrap cs-bread-style-2">
      <div class="container">
        <div class="row cs_center">
          <div class="cs-bread-page-title-area">
            <div class="cs-page-title-in">
              <div class="cs-page-title">
                <h2>Contact</h2>
              </div>
              <div class="breadcrumb">
                <ul class="cs_mp0">
                  <li>
                    <a href="index" class="cs-text_b_line"><span>Home</span></a>
                  </li>
                  <li>.</li>
                  <li>Contact</li>
                </ul>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </section>
  <!-- End Common BreadCrumb -->

  <div class="cs-section-height"></div>
  <!-- Section to Section Gap -->


  <!-- Start Contact Page Content -->
  <section>
    <div class="cs-contact-page-content">
      <div class="container-fluid">
        <div class="row cs_center">
          <div class="col-xl-5">
            <div class="cs-contact-in">
              <h2>Get In Touch</h2>
              <p class="cs-contact-text">Get in touch with us on any of our available channel</p>
              <div class="cs-logi-office-wrap">
                <div class="cs-logi-cor-office cs-default-office">
                  <div class="cs-footer-widget-title">
                    <h6>Corporate Office</h6>
                  </div>
                  <p class="cs-max-width-200 cs-color-body">
                    26 Burma Rd, Apapa Quays, Lagos 102272, Lagos, Nigeria
                  </p>
                  <div class="cs-logi-emai-phone">
                    <a href="#" class="cs-text-style-h6">+234-201-2778400</a>
                    <a href="#" class="cs-text-style-h6">+234-201-2778401</a>
                    <a href="#" class="cs-text-style-h6">+234-201-2778402</a>
                  </div>
                </div>
                <div class="cs-border-v-line"></div>
                <div class="cs-logi-cor-office cs-default-office">
                  <div class="cs-footer-widget-title">
                    <h6>Abuja Office</h6>
                  </div>
                  <p class="cs-max-width-200 cs-color-body">
                    Plot 1847 Mohammed Mahathir Street,<br>Asokoro, Abuja, Nigeria.
                  </p>
                  <div class="cs-logi-emai-phone">
                    <a href="#" class="cs-text-style-h6">+234-80984-83191</a>
                    <a href="mailto:contactus@enlconsortium.com" class="cs-text-style-h6">contactus@enlconsortium.com</a>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="col-xl-7">
            <div class="cs-contact-page-form-wrap">
              <div class="cs-form-cp-in">
	<form class="needs-validation" novalidate method="post" name="request" enctype="multipart/form-data" >
                  <div class="mb-3">
                    <input type="text" name="firstname"  class="form-control" placeholder="First Name (Sunname)" required>
                  </div>

				  
				  <div class="mb-3">
                    <input type="text" name="lastname" class="form-control" placeholder="Last Name" required>
                  </div>
                  <div class="mb-3">
                    <input type="email" name="Email" class="form-control" placeholder="example@email.com" required>
                  </div>
                  <div class="mb-3">
                    <input type="tel" name="phone" class="form-control" id="phone" placeholder="080-8241228" required>
                  </div>
                  <div class="mb-3">
                    <input type="text" name="subject" class="form-control" id="subject" placeholder="Subjet" required>
                  </div>
                  <div class="mb-3">
                    <textarea class="form-control" name="message" id="message" rows="4" placeholder="Your Message" required></textarea>
                  </div>

                  <button type="submit" name="submit"  class="cs-primary-btn">Submit<i class="flaticon-right-arrow"></i></button>
                </form>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </section>
  <!-- End Contact Page Content -->

  <div class="cs-section-height"></div>
  <!-- Section to Section Gap -->

  <!-- Start Client Area Full Width -->
  <section>
    <div class="cs-client-brand-wrapper style-full-1raw">
      <div class="cs-client-container">
        <div class="container-fluid">
          <div class="row">
            <div class="col-lg-3 col-md-4 col-sm-4">
              <div class="cs-client-card">
                <h6><a href="#">ENL Construction & Property</a></h6>
              </div>
            </div>
            <div class="col-lg-3 col-md-4 col-sm-4">
              <div class="cs-client-card">
                <h6><a href="#">ENL Quary & Minning</a></h6>
              </div>
            </div>
            <div class="col-lg-3 col-md-4 col-sm-4">
              <div class="cs-client-card">
                <h6><a href="#">ENL Gold</a></h6>
              </div>
            </div>
            <div class="col-lg-3 col-md-4 col-sm-4">
              <div class="cs-client-card">
                <h6><a href="#">ENL Power</a></h6>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </section>
  <!-- End Client Area Full Width -->

  <!-- Start Map -->
  <div class="cs-logi-map-wrap">
    <iframe
      src="https://www.google.com/maps/embed?pb=!1m14!1m12!1m3!1d224.23780763754402!2d3.369373990681313!3d6.4385273814476225!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!5e1!3m2!1sen!2sng!4v1750430813523!5m2!1sen!2sng"
      allowfullscreen=""></iframe>
  </div>
  <!-- End Map -->

  <!-- Start Footer -->
  <?php include("move/footer.php");?>  

  <!-- End Footer -->

  <!-- Start Scrollup -->
  <span class="cs_scrollup">
    <i class="flaticon-top"></i>
  </span>
  <!-- End Scrollup -->

  <!-- Script -->
  <script src="assets/js/plugins/jquery-3.7.0.min.js"></script>
  <script src="assets/js/plugins/swiper.min.js"></script>
  <script src="assets/js/plugins/SplitText.min.js"></script>
  <script src="assets/js/plugins/ScrollToPlugin.min.js"></script>
  <script src="assets/js/plugins/ScrollTrigger.min.js"></script>
  <script src="assets/js/plugins/gsap.min.js"></script>
  <script src="assets/js/main.js"></script>
</body>

</html>
