<?php 
require_once 'admin-neuro/lib/Config.php';
?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><?php echo getRecord('id','metakeywords','15','metatitle');?></title>
<meta name="keywords" content="<?php echo getRecord('id','metakeywords','15','keywords');?>"/>
<meta name="description" content="<?php echo getRecord('id','metakeywords','15','description');?>"/>
<link rel="shortcut icon" href="<?php echo getRecord('id','settings','1','image1');?>" type="image/x-icon">
    <!-- Stylesheets & Fonts -->
    <link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,800,700,600|Montserrat:400,500,600,700|Raleway:100,300,600,700,800" rel="stylesheet" type="text/css" />
    <link href="css/plugins.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">
    <link href="css/btn-styles.css" rel="stylesheet">
    <link href="css/responsive.css" rel="stylesheet"> 
    
    <link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet"> 
    
    
    <!-- Event styles -->
    <link href="css/event-styles.css" rel="stylesheet"> 
    <link href="css/pgc.css" rel="stylesheet"> 
    
     <script type="text/javascript" src="js/countrycodes.js"></script>
    
    <?php include("script.php");?> 
    
   
    
    <style> 
.contact-box {
    display: block;
    margin-bottom: 20px;
    border: 1px #CCC solid;    background: #f2f2f2;
}
.contact-heading {
    border-bottom: solid 3px #f7f7f7;
    padding: 7px 15px;
}
.contact-heading p {
    margin-bottom: 0px !important;
    font-size: 14px !important;
    color: #111;
}
.contact-text {
    background: #fff;
    margin-bottom: 2px;
    padding: 7px 15px;
}
.contact-text p {
    margin-bottom: 0px !important;
    font-size: 14px !important;
    color: #111;
}
</style>
    
    </head>

<body class="no-page-loader">


    <!-- Wrapper -->
    <div id="wrapper">
    

		<!-- Header -->
<?php include("links/menu.php");?>
		<!-- end: Header -->
        
        
<section id="page-title" class=""style="background-image: url(images/background/11.jpg);">
    <div class="bg-overlay"></div>
            <div class="container">
                <div class="page-title">
                    <h1>Contact Us</h1>
                </div>
                <div class="breadcrumb">
                    <ul>
                        <li><a href="index.html">Home</a> </li>
                        <li class="active"><a href="#">Contact Us</a> </li>
                    </ul>
                </div>
            </div>
        </section>

        
        <!-- Contact Section -->
    <section class="contact-section pb-1">
        <div class="container">
            
<div class="row map-section p-b-0">
    <div class="sec-title text-center mb-4">
                        <span class="sub-title"> “DIDN'T FIND WHAT YOU WERE LOOKING FOR?” </span>
                       
                       
                       
                    </div>
            <div class="contact-column col-lg-4 col-md-4 col-sm-12 ">
                <div class="inner-column">
                    
                    <div class="row">
<!--<div class="col-md-12">-->
<!--<div class="contact-box">-->
<!--<div class="contact-heading">-->
<!--<p> General Queries </p>-->
<!--</div>-->
<!--<div class="contact-text">-->
<!--<p>Email: <a href="mailto:shirley@infocongress.com" title="General Queries"> shirley@infocongress.com</a></p>-->
<!--<p>Phone: +1 732 526 1166	</p>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<div class="col-md-12">
<div class="contact-box">
<div class="contact-heading">
<p> <?php echo getrecord('id','pages','8','title');?></p>
</div>
<div class="contact-text">
<p>Email: <a href="mailto:<?php echo getrecord('id','pages','8','email');?>" title="Program Enquiry"> <?php echo getrecord('id','pages','8','email');?></a></p>
<p>Phone:<?php echo getrecord('id','pages','8','phone');?></p>
</div>
</div>
</div>
<div class="col-md-12">
<div class="contact-box">
<div class="contact-heading">
<p> <?php echo getrecord('id','pages','9','title');?> </p>
</div>
<div class="contact-text">
<p>Email: <a href="mailto:<?php echo getrecord('id','pages','9','email');?>" title="Finance"><?php echo getrecord('id','pages','9','email');?></a></p>
<p>Phone: <?php echo getrecord('id','pages','9','phone');?></p>
</div>
</div>
</div>
<div class="col-md-12">
<div class="contact-box">
<div class="contact-heading">
<p> <?php echo getrecord('id','pages','10','title');?> </p>
</div>
<div class="contact-text">
 <p>Email: <a href="mailto:<?php echo getrecord('id','pages','10','email');?>" title="Sponsors/Exhibitions"><?php echo getrecord('id','pages','10','email');?></a></p>
<p>Phone: <?php echo getrecord('id','pages','10','phone');?></p>
</div>
</div>
</div>
<!--<div class="col-md-12">-->
<!--<div class="contact-box">-->
<!--<div class="contact-heading">-->
<!--<p> Organizer </p>-->
<!--</div>-->
<!--<div class="contact-text">-->
<!--<p>Email: <a href="mailto:info@precisionglobal.com" title="Organizer"> info@precisionglobal.com</a></p>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--<div class="col-md-12">-->
<!--<div class="contact-box">-->
<!--<div class="contact-heading">-->
<!--<p> Conference Secretariet </p>-->
<!--</div>-->
<!--<div class="contact-text">-->
<!--<p>Email: <a href="mailto:shirley@infocongress.com" title="Conference Secretariet"> shirley@infocongress.com</a></p>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
</div>
                </div>
            </div>

            <div class="col-md-8 col-sm-12 contact-form">
             
                   <?php
			// Import PHPMailer classes into the global namespace 
use PHPMailer\PHPMailer\PHPMailer; 
use PHPMailer\PHPMailer\SMTP; 
use PHPMailer\PHPMailer\Exception; 

// Include PHPMailer library files 
require 'PHPMailer/Exception.php';  
require 'PHPMailer/PHPMailer.php'; 
require 'PHPMailer/SMTP.php'; 	
 
	if(isset($_POST['submit'])){
	 extract($_POST);
	 if ($email && ( empty(stripos(strtolower($email), '@example'))   ))
	    $in=executeQuery("INSERT INTO contact(`name`,`email`,`phone`,`country`,`message`)VALUES('$name','$email','$phone','$country','$message')");		
    
// Create an instance of PHPMailer class 
$mail = new PHPMailer;
$to   = getRecord('id','mails','3','email');
// SMTP configuration
// $mail->isSMTP();
$mail->Host     = 'smtp.neurologyworldconference.com';
$mail->SMTPAuth = true;
$mail->Username = 'info@neurologyworldconference.com';
$mail->Password = 'addiction@123';
$mail->SMTPSecure = 'tls';
$mail->Port     = 25;

// Sender info 
$mail->setFrom('info@neurologyworldconference.com', 'Admin'); 
//$mail->addReplyTo('reply@example.com', 'SenderName');  

// Add a recipient 
$mail->addAddress($to); 

// // Add cc or bcc  
// $mail->addCC('cc@example.com'); 
// $mail->addBCC('bcc@example.com'); 
 
// Email subject 
$mail->Subject = 'Neurology World Conference Contact Form'; 

// // Set email format to HTML 
 $mail->isHTML(true); 
 
// Email body content 
$mailContent = ' 
             <h2>Contact Request Details</h2> 
            <p><b>Name: </b>'.$name.'</p> 
            <p><b>Email: </b>'.$email.'</p> 
            <p><b>Phone: </b>'.$phone.'</p> 
            <p><b>Country: </b>'.$country.'</p>
            <p><b>Message: </b>'.$message.'</p> 
   '; 
$mail->Body = $mailContent; 

// // Add attachments
// $mail->addAttachment('files/codexworld.pdf');
// $mail->addAttachment('images/codexworld.png', 'new-name.png'); //set new name
 
// Send email 
if ($email && ( empty(stripos(strtolower($email), '@example'))   )){
   
    if(!$mail->send()){ 
        echo 'Message could not be sent. Mailer Error: '.$mail->ErrorInfo; 
    }else{
   ?>
   <script>
        alert("Thanks!,  your message has been sent successfully. We will get back to you with in 24 hrs.");
        window.location="contact.php";
        </script>
  <?php 
    exit;
    }   
}else{?>
<script>
    alert("Sorry!,  Some technical issue. try after sometime..");
    window.location ="contact.php";
    </script>
<?php } 
             
// 											if(isset($_POST['submit'])){
											    
// 											    extract($_POST);
											
// 					$in=executeQuery("INSERT INTO contact(`name`,`email`,`phone`,`country`,`message`)VALUES('$name','$email','$phone','$country','$message')");		
// 							$to   = getRecord('id','mails','3','email');
// 							$sub  = "neurologyworldconference Contact Form";
														
// 					$msg = "Dear Admin, Message From www.neurologyworldconference.com<br />";
// 						$msg .= '<table border="1">';
// 					$msg .= "<table><tr><td>Name:</td><td> $name</td></tr>";
// 					$msg .= "<tr><td>Email Id:</td><td> $email</td></tr>";
// 				$msg .= "<tr><td>Phone No:</td><td> $phone</td></tr>";
// 				$msg .= "<tr><td>Country:</td><td> $country</td></tr>";
// 			$msg .= "<tr><td>Message:</td><td> $message</td></tr></table>";
// // 		$from = "Admin<info@neurologyworldconference.com >";
// // 		$headers = "content-type: text/html"."\r\n"."from: $from";

// $headers = "MIME-Version: 1.0" . "\r\n";
// $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
// $headers .= 'From: Admin <info@neurologyworldconference.com>' . "\r\n";

// 						mail($to, $sub, $msg, $headers);?>
//                                                 <script>
//         alert("Thanks!,  your message has been sent successfully. We will get back to you with in 24 hrs.");
//         window.location="contact.php";
//         </script>
												
								<?php } ?>
                <form method="post" action="">
                    <div class="row clearfix p-t-20 p-b-20" style="background: #f1f1f1;">
                        <div class="col-lg-6 col-md-6 col-sm-12 form-group">
                            <div class="input-outer">
                                <input type="text" name="name" placeholder="Name" required>
                                <span class="icon fa fa-user"></span>
                            </div>
                        </div>
                        
                        <div class="col-lg-6 col-md-6 col-sm-12 form-group">
                            <div class="input-outer">
                                <input type="email" name="email" placeholder="Email" required>
                                <span class="icon fa fa-envelope"></span>
                            </div>
                        </div>

                        <div class="col-lg-6 col-md-6 col-sm-12 form-group">
                            <div class="input-outer">
                                <input type="text" name="phone" placeholder="Phone" required>
                                <span class="icon fa fa-phone"></span>
                            </div>
                        </div>

                        <div class="col-lg-6 col-md-6 col-sm-12 form-group">
                            <div class="input-outer">
                                <select name="country" class="wpcf7-form-control wpcf7-select wpcf7-validates-as-required" required>
                                    <script type="text/javascript" language="javascript">
                                     document.write( getCountryOptionsListHtml( "" ) );
                                   </script>
                                   </select>
                                <span class="icon fa fa-globe"></span>
                            </div>
                        </div>
                        
                        <div class="col-lg-12 col-md-12 col-sm-12 form-group">
                            <textarea name="message" placeholder="Message" required></textarea>
                        </div>
                        
                        <div class="col-lg-12 col-md-12 col-sm-12 form-group123">
                            Captcha Code: <span id="error-captcha" class="demo-error error"></span>
                            <div class="input-group">
                                <span class="input-group-addon" id="input-group-addon" style="padding-left: 10px;padding-right: 10px;background: #734dbc;border-radius: 10px  0 0 10px;color: #fff;">
                                    <?php echo getCaptchaCode(6);?></span>
                                <input name="captcha_code" type="text" id="captcha-input" placeholder="Enter Captcha Here" class="captcha-box">
                            </div>
                        </div>
                    
                        <div class="col-lg-12 col-md-12 col-sm-12 form-group text-center">
                            <button class="theme-btn btn-style-one" id="c-captcha" type="submit" name="submit" value="submit"><span class="btn-title">Submit Now</span></button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        </div>
    </section>
    <!--End Contact Page Section -->
            
            
            
           <!-- FOOTER -->
            <?php include("links/footer.php");?> 
    		<!-- end: FOOTER -->
        
      
 
    </div>    
    <!-- end: Wrapper -->

    <!--Plugins-->
<script src="js/jquery.js"></script>
<script src="js/plugins.js"></script>

<!--Template functions-->
<script src="js/functions.js"></script> 


<script>
$(document).ready(function(){
  $("#c-captcha").click(function(){
      var cap=$('#input-group-addon').text().trim();
      var in_cap=$('#captcha-input').val().trim();
      $('#error-captcha').text('');
      if(cap!==in_cap){
          $('#error-captcha').text('Captch Invalid');
          return false;
      }
  });
});
</script>


<script>
$(document).ready(function(){
  $("#c-captcha1").click(function(){
      var cap=$('#input-group-addon1').text().trim();
      var in_cap=$('#captcha-input1').val().trim();
      $('#error-captcha1').text('');
      if(cap!==in_cap){
          $('#error-captcha1').text('Captch Invalid');
          return false;
      }
  });
});
</script>

</body>

</html>
