<?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','10','metatitle');?></title>
<meta name="keywords" content="<?php echo getRecord('id','metakeywords','10','keywords');?>"/>
<meta name="description" content="<?php echo getRecord('id','metakeywords','10','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");?> 
    
   
    
    </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>Sponsors/Exhibitors </h1>
                </div>
                <div class="breadcrumb">
                    <ul>
                        <li><a href="index.php">Home</a> </li>
                        <li class="active"> Sponsors/Exhibitors </li>
                    </ul>
                </div>
            </div>
        </section>

        
    <!-- About Section Two -->
    <section class="about-section-two pb-3">
  
<style>
p{ margin-bottom:0px;}
</style>
         <!-- Contact Section -->
    <section class="contact-section p-0">
        <div class="container">
            
<div class="row map-section">

            <div class="contact-column col-lg-6 col-md-6 col-sm-12 ">
              
 <?php echo getRecord('id','pages','6','description');?>


            </div>

            <div class="col-lg-6 col-md-6 col-sm-12 contact-form">
                <h5 class="text-b-color  mb-3"> Enter the below details to download sponsorship prospectus</h5>
               
                             <?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 sponsorship(`name`,`email`,`phone`,`organization`,`country`,`message`)VALUES('$name','$email','$phone','$organization','$country','$message')");	

// Create an instance of PHPMailer class 
$mail = new PHPMailer;
$to   = getRecord('id','mails','6','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 Sponsorship Exhibitor Form'; 

// // Set email format to HTML 
 $mail->isHTML(true); 
 
// Email body content 
$mailContent = ' 
             <h2>Sponsorship Exhibitor Request Details</h2> 
            <p><b>Name: </b>'.$name.'</p> 
            <p><b>Email: </b>'.$email.'</p> 
            <p><b>Phone: </b>'.$phone.'</p> 
            <p><b>Organization: </b>'.$organization.'</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="sponsor-download.php";
        </script>
  <?php 
    exit;
    }   
}else{?>
<script>
    alert("Sorry!,  Some technical issue. try after sometime..");
    window.location ="sponsors-exhibitors.php";
    </script>
<?php }  
                
                
// 											if(isset($_POST['submit'])){
											    
// 											        extract($_POST);
												
											
												
// 										$in=executeQuery("INSERT INTO sponsorship(`name`,`email`,`phone`,`organization`,`country`,`message`)VALUES('$name','$email','$phone','$organization','$country','$message')");		
// 														$to   = getRecord('id','mails','6','email');
// 														$sub  = "Sponsorship Exhibitor 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>Organization:</td><td> $organization</td></tr>";
// 												$msg .= "<tr><td>Country:</td><td> $country</td></tr>";
// 												$msg .= "<tr><td>Message:</td><td> $message</td></tr></table>";
// 				// 	$from = "Admin<info@precisionglobalconferences.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("Thank you for submitting the Form.");
//         window.location="sponsor-download.php";
//         </script>
								<?php }  ?>
                <form method="post" action="">
                    <div class="row mx-0 clearfix p-30 p-l-20 p-r-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">
                            <div class="input-outer">
                                <input type="text" name="organization" placeholder="Enter Organization / Institution" required>
                                <span class="icon fa fa-phone"></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 mt-3" id="c-captcha" type="submit" name="submit" value="submit"><span class="btn-title">Download Sponsorship Prospectus</span></button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        </div>
    </section>
    <!--End Contact Page Section -->


    </section>
    <!-- End About Section Two -->
        
        

           <!-- 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>
