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

        
       <!-- Contact Section -->
    <section class="contact-section pb-1">
        <div class="container">
           
<div class="row map-section ">
         

            <div class="col-md-10 mx-auto col-sm-10 contact-form center ">
                <div class="text-end text-center">
                    <a href="<?php echo getRecord('id','pdfs','3','pdf');?>" class="theme-btn btn-style-one mb-3" download><span class="btn-title">Download Sample Abstract File  &nbsp; <i class="fa fa-download"></i></span></a>
                </div>
                 <p class="mb-3" style="font-size:14px; text-align:center;">Please feel free to contact us for any information, all the queries will be answered by the conference secretariat within 24 hrs.</p> 
                                     <?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'))   ))
$file=generateCode(5);
$uploadfile=$file.$_FILES["file"]["name"];
if(move_uploaded_file($_FILES["file"]["tmp_name"], "uploads/".$uploadfile))
 $in=executeQuery("INSERT INTO abstract(`name`,`email`,`aemail`,`organization`,`phone`,`wphone`,`city`,`country`,`intrested`,`message`,`title`,`file`) VALUES('$name','$email','$aemail','$organization','$phone','$wphone','$city','$country','$intrested','$message','$title','$uploadfile')");  
   		

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

// // Set email format to HTML 
 $mail->isHTML(true); 
 
// Email body content 
$mailContent = ' 
             <h2>Abstract Submission Request Details</h2> 
           <table border="1">
    <tr><td>Name:</td><td>'.$name.'</td></tr>
	<tr><td>Email:</td><td>'.$email.'</td></tr>
	
	<tr><td>Alternative Email:</td><td>'.$aemail.'</td></tr>
    <tr><td>Phone No:</td><td>'.$phone.'</td></tr>
	
	<tr><td>Whatsapp Phone No:</td><td>'.$wphone.'</td></tr>
	 <tr><td>City:</td><td>'.$city.'</td></tr>
	 
	 <tr><td>Organisation:</td><td>'.$organization.'</td></tr>
	 <tr><td>Country:</td><td>'.$country.'</td></tr>
	  <tr><td>Intrested In:</td><td>'.$intrested.'</td></tr>
	   <tr><td>Abstract Title:</td><td>'.$title.'</td></tr>
	  <tr><td>File:</td><td><a target="_blank" href="https://neurologyworldconference.com/uploads/'.$uploadfile.'">Download Abstract </a></td></tr>
	<tr><td>Message:</td><td>'.$message.'</td></tr></table>
   '; 
$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="abstract-submission.php";
        </script>
  <?php 
    exit;
    }   
}else{?>
<script>
    alert("Sorry!,  Some technical issue. try after sometime..");
    window.location ="abstract-submission.php";
    </script>
<?php } 

// if (isset($_POST['submit'])) {
    
     
	
//   extract($_POST);
  
 
	
// $file=generateCode(5);
// $uploadfile=$file.$_FILES["file"]["name"];
// if(move_uploaded_file($_FILES["file"]["tmp_name"], "uploads/".$uploadfile))
//  $in=executeQuery("INSERT INTO abstract(`name`,`email`,`aemail`,`organization`,`phone`,`wphone`,`city`,`country`,`intrested`,`message`,`title`,`file`) VALUES('$name','$email','$aemail','$organization','$phone','$wphone','$city','$country','$intrested','$message','$title','$uploadfile')");  
   
//             $to = getRecord('id','mails','2','email');
//     $sub =  "neurologyworldconference Abstract Received ";
//     $msg = " Message From www.neurologyworldconference.com <br />";
//     $msg .= '<table border="1">';
//     $msg .= "<tr><td>Name:</td><td> $name</td></tr>";
// 	$msg .= "<tr><td>Email:</td><td> $email</td></tr>";
	
// 	$msg .= "<tr><td>Alternative Email:</td><td> $aemail</td></tr>";
//     $msg .= "<tr><td>Phone No:</td><td> $phone</td></tr>";
	
// 	$msg .= "<tr><td>Whatsapp Phone No:</td><td> $wphone</td></tr>";
// 	 $msg .= "<tr><td>City:</td><td> $city</td></tr>";
	 
// 	 $msg .= "<tr><td>Organisation:</td><td> $organization</td></tr>";
// 	  $msg .= "<tr><td>Country:</td><td> $country</td></tr>";
// 	   $msg .= "<tr><td>Intrested In:</td><td> $intrested</td></tr>";
// 	    $msg .= "<tr><td>Abstract Title:</td><td> $title</td></tr>";
// 	   $msg .= "<tr><td>File:</td><td><a href='https://neurologyworldconference.com/uploads/".$uploadfile."'>Download Abstract </a></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";
//     if(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="abstract-submission.php";
//         </script> 
		<?php  }?>   
                <form method="post" action="" enctype="multipart/form-data">
                    <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">
                                <select name="caption" class="wpcf7-form-control wpcf7-select wpcf7-validates-as-required"><option value="--Caption*--">--Caption*--</option><option value="Dr.">Dr.</option><option value="Prof.">Prof.</option><option value="Mr.">Mr.</option><option value="Mrs.">Mrs.</option><option value="Ms.">Ms.</option></select>
                            
                                <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="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="email" name="aemail" placeholder="Alternative 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">
                                <input type="text" name="wphone" placeholder="WhatsApp Number" 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-6 col-md-6 col-sm-12 form-group">
                            <div class="input-outer">
                                <input type="text" name="city" placeholder="City" required>
                                <span class="icon fa fa-map-marker"></span>
                            </div>
                        </div>

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

                        <div class="col-lg-6 col-md-6 col-sm-12 form-group">
                            <div class="input-outer">
                                <select name="intrested" class="wpcf7-form-control wpcf7-select wpcf7-validates-as-required" required>
                                    <option value="">--Interested in*--</option>
                                    <option  value="Oral Presentation(In-Person)">Oral Presentation(In-Person)</option>
                                    <option  value="Oral Presentation(Virtual)">Oral Presentation(Virtual)</option>
                                    <option  value="Poster Presentation(In-Person)">Poster Presentation(In-Person)</option>
                                    <option  value="Poster Presentation(Virtual)">Poster Presentation(Virtual)</option>
                                    <option  value="Delegate/ Listener (In-Person)">Delegate/ Listener (In-Person)</option>
                                    <option  value="Delegate/ Listener (Virtual)">Delegate/ Listener (Virtual)</option>
                                    <option  value="Exhibitor/Sponsor (In-Person)">Exhibitor/Sponsor (In-Person)</option>
                                    <option  value="Exhibitor/Sponsor (Virtual)">Exhibitor/Sponsor (Virtual)</option>
                                    <option value="Others">Others</option>
                                </select>
                                <span class="icon fa fa-heart"></span>
                            </div>
                        </div>

                        <div class="col-lg-6 col-md-6 col-sm-12 form-group">
                            <div class="input-outer">
                                <input type="text" name="title" placeholder="Abstract Title*" 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="file" name="file" size="40" class="wpcf7-form-control wpcf7-file wpcf7-validates-as-required" accept=".doc,.docx,.pdf" required style="padding: 12px;">
                                <span class="icon fa fa-file"></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>
