<?php
  include ("forms/dbcnct.php");

  $FName = $_REQUEST['fname'];
  $LName = $_REQUEST['lname'];
  $FromEmail = $_REQUEST['email'];
  $Mobile = $_REQUEST['number'];
  $Subject = $_REQUEST['subject'];
  $Comments = $_REQUEST['message'];
  
  $deliveryemail = 'editoricelj@gmail.com';
  $to = $_REQUEST['email'];

  $date = date_default_timezone_set('Asia/Kolkatta');
  $today = date("F j, Y, g:i a T");
    
  $VerfiyEmail = $_REQUEST['vemail'];
    
  if($VerfiyEmail == '' && $FName!='' && $FromEmail!='' && $Mobile!='' && $Subject!='' && $Comments!='' ) {
    
    
    $query = mysqli_query($db_connect, 
    "INSERT into ICELA (UserTime,FirstName,LastName,Email,Mobile,Subject,Comments) values ('$today','$FName','$LName','$FromEmail','$Mobile','$Subject','$Comments')") or die(mysqli_error($db_connect));

 
   	$headers = 'MIME-Version: 1.0' . "\r\n";
	$headers .= "From: " . $deliveryemail . "\r\n"; // Sender's E-mail
	$headers .= "Cc:". $deliveryemail . "\r\n"; // Carbon copy to Sender
	$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
	
    $Message ='
    <div class="row MailForm" style="box-shadow: 4px 2px 4px 4px solid #8295ff;width:700px;margin:auto;display:block;border:1px solid #bfbc00;">
        <div class="container">
            <div class="Mail_Header" style="background:#7da108;border-bottom:1px solid #d4d4d6;padding:5px;">
                <p><img src="http://icelj.com/assets/img/icna.png" style="height:120px;width:120px;margin:auto;display:block;" /></p>
                <p style="color:#fff;">Hello Respected User,</p>
                <p style="color:#fff;">This is an Automatic mail from ICELJ, we have received your information from our website.</p>
            </div>
            <div class="Mail_Body" style="background:#fff;border-bottom:1px solid #2206bf;color:#000;">
        	    <p>Thank you for Contacting us. We received your Details as</p>
        		<table class="Tb_Border" border="1" style="min-width:100%;padding:5px;color:#000;">
        		    <tr style="padding:5px;">
        		        <td>First Name</td>
        		        <td style="color:#000;">'.$FName.' </td>
        		    </tr>
        		    <tr>
        		        <td>Last Name</td>
        		        <td style="color:#000;">'.$LName.' </td>
        		    </tr>
        		    <tr>
        		        <td>Organisation Name</td>
        		        <td style="color:#000;">'.$Mobile.' </td>
        		    </tr>
        		    <tr>
        		        <td>Job Title</td>
        		        <td style="color:#000;">'.$Subject.' </td>
        		    </tr>
        		    <tr>
        		        <td>Email Id</td>
        		        <td style="color:#000;">'.$to.'</td>
        		    </tr>
        		    <tr>
        		        <td>Mobile</td>
        		        <td style="color:#000;">'.$Comments.'</td>
        		    </tr>
        		</table>
    	    </div>
    	    <div class="Mail_Footer" style="background:#085200;color:#fff;padding:10px;">
        		<p>For further details please share your words with us on <b style="color:#fff;">editoricelj@gmail.com</b>.
        		<br>
        		Regards,
        		<br>
        		ICELJ.</p>
    		</div>
        </div>
    </div>
    ';
	

   if(@mail($to, $deliveryemail, $Message, $headers)){
		$return= "We've received your query, we will get back to you soon.";
	}
	else{
		$return= "Ohh !!! An error occurred, Please try again. Incovience regreeted.";
	}
    }
    else{
        $return= "Fill All Mandatory Fields !";
    }
?>
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta content="width=device-width, initial-scale=1.0" name="viewport">

  <title>International Council of English and Literature Journal</title>
  
  <meta content="International Council of English and Literature Journal (ICELJ)" name="title">
  <meta content="https://www.icelj.com/assets/img/icna.png" name="og:image">
  <meta content="ICELJ" name="author">
  <meta content="International Council of English and Literature Journal (ICELJ) aims to advance knowledge of and to develop expertise in critical and scientific inquiry in English, Literature and teaching. The journal is intended for academics, researchers, teacher educators and graduate students who are involved in research and dissemination of knowledge in the field." name="descriptison">
  <meta content="International Council of English and Literature Journal (ICELJ), English Journal" name="keywords">

  <!-- Favicons -->
  <link href="assets/img/icna.png" rel="icon">
  <link href="assets/img/icna.png" rel="apple-touch-icon">

  <!-- Google Fonts - ->
  <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,500,500i,600,600i,700,700i|Satisfy" rel="stylesheet">

  <!-- Vendor CSS Files -->
  <link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
  <link href="assets/vendor/icofont/icofont.min.css" rel="stylesheet">
  <link href="assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
  <link href="assets/vendor/owl.carousel/assets/owl.carousel.min.css" rel="stylesheet">
  <link href="assets/vendor/venobox/venobox.css" rel="stylesheet">

  <!-- Template Main CSS File -->
  <link href="assets/css/style.css" rel="stylesheet">
  <link href="assets/css/added.css" rel="stylesheet">
</head>

<body>
	<div class="top-header">
		<div class="innner">
			<div class="row">
				<!--
				<div class="col-2">
					<img src="assets/img/icna.png" class="logo" alt="Logo" />
				</div>
				-->
				<div class="col-9">
					<p class="sub-title">Delmon Publications</p>
					<h2 class="title">International Council of English and Literature Journal (ICELJ)</h2>
					<h3 class="caption">An International Peer-Reviewed English Journal</h3>
				</div>
				<div class="col-3 right">
					<h6 class="issn">ISSN : Applied</h6>
					<h6 class="issn">Submission : editoricelj@gmail.com</h6>
					<h6 class="issn">Contact : 7993394447</h6>
				</div>
			</div>
		</div>
	</div>
  <header id="header" class="d-flex justify-content-center align-items-center">
	<div class="header-menu">
		<nav class="nav-menu d-none d-lg-block">
		  <ul>
			<li><a href="index.php">Home</a></li>
			<li><a href="Archives.php">Archives</a></li>
			<li><a href="Submit+Paper.php">Submit Paper</a></li>
			<li><a href="Editorial+Board.php">Editorial Board</a></li>
			<li><a href="Ethics.php">Ethics</a></li>
			<li><a href="Review.php">Review</a></li>
			<li><a href="FAQ.php">FAQ</a></li>
			<li><a href="Submission+Guidelines.php">Submission Guidelines</a></li>
			<li class="active"><a href="Contact.php">Contact</a></li>

		  </ul>
		</nav><!-- .nav-menu -->
	</div>
  </header><!-- End Header -->

  <main id="main">
	
    <!-- ======= Contact Me Section ======= -->
    <section id="contact" class="contact">
      <div class="container">

        <div class="section-title">
          <span>Contact Us</span>
          <h2>Contact Us</h2>
          <p>Use these contact methods to get in touch with us for your queries.</p>
        </div>

        <div class="row">

          <div class="col-lg-6">

            <div class="row">
              <div class="col-md-12">
                <div class="info-box">
                  <i class="bx bx-map-alt"></i>
                  <h3>Our Address</h3>
                  <div class="social-links">
                    <p class="desc">Delmon Publications,
					P.Nainavaram,Ambapuram post,
					Vijayawada Rural, Vijayawada, Krishna district
					Andhra Pradesh, India.
					Pin Code: 520012
					</p>
                  </div>
                </div>
              </div>
              <div class="col-md-6">
                <div class="info-box mt-4">
                  <i class="bx bx-envelope"></i>
                  <h3>E-MAIL US</h3>
                  <p><a href="mailto:editoricelj@gmail.com">editoricelj@gmail.com</a></p>
                </div>
              </div>
              <div class="col-md-6">
                <div class="info-box mt-4">
                  <i class="bx bx-phone-call"></i>
                  <h3>CALL US</h3>
                  <p><a href="tel:+91-7993394447">+91-7993394447</a></p>
                </div>
              </div>
            </div>

          </div>

          <div class="col-lg-6">
            <form method="post" role="form" class="php-email-form">
              <div class="form-row">
                <div class="col-md-6 form-group">
                  <input type="text" name="fname" class="form-control" id="fname" placeholder="Type First Name" data-rule="required" data-msg="Please enter at least 4 chars" />
                  <div class="validate"></div>
                </div>
				<div class="col-md-6 form-group">
                  <input type="text" name="lname" class="form-control" id="lname" placeholder="Type Last Name" data-rule="required" data-msg="Please enter at least 4 chars" />
                  <div class="validate"></div>
                </div>
				
                <div class="col-md-6 form-group">
                  <input type="email" class="form-control" name="email" id="email" placeholder="Give Your Email" data-rule="email" data-msg="Please enter a valid email" />
                  <div class="validate"></div>
                </div>
				
                <div class="col-md-6 form-group">
                  <input type="number" class="form-control" name="number" id="number" placeholder="Give Contact Number" data-rule="required" data-msg="Please enter a valid mobile number" />
                  <div class="validate"></div>
                </div>
				
                <div class="col-md-6 form-group" style="display:none;">
                  <input type="email" class="form-control" name="vemail" id="email" placeholder="Your Email" data-rule="email" data-msg="Please enter a valid email" />
                  <div class="validate"></div>
                </div>
              </div>
              <div class="form-group">
                <input type="text" class="form-control" name="subject" id="subject" placeholder="Subject" data-rule="required" data-msg="Please enter your query heading" />
                <div class="validate"></div>
              </div>
              <div class="form-group">
                <textarea class="form-control" name="message" rows="6" data-rule="required" data-msg="Please write something for us" placeholder="Message"></textarea>
                <div class="validate"></div>
              </div>
              <div class="mb-3">
                <div id="return"><?php print_r($return); ?></div>
                <div class="loading">Loading</div>
                <div class="error-message"></div>
                <div class="sent-message">Your message has been sent. Thank you!</div>
              </div>
              <div class="text-center"><button type="submit">Send Message</button></div>
            </form>
          </div>

        </div>

      </div>
    </section><!-- End Contact Me Section -->

  </main>
    <footer class="footer">
	<div class="container">
		<div class="row">
			<div class="col-lg-3 col-md-3 col-xs-12">
				<h5 class="footer-heading">Contact Us</h5>
				<p class="desc">Delmon Publications,
				P.Nainavaram,Ambapuram post,
				Vijayawada Rural, Vijayawada, Krishna district
				Andhra Pradesh, India.
				Pin Code: 520012
				</p>
			</div>
			<div class="col-lg-2 col-md-3 col-xs-12">
				<h5 class="footer-heading">Talk to Us</h5>
				<p class="desc"><a href="tel:+91-7993394447">+91-7993394447</a></p>
			</div>
			<div class="col-lg-2 col-md-2 col-xs-12">
				<h5 class="footer-heading">Email Us</h5>
				<p class="desc"><a href="mailto:editoricelj@gmail.com">editoricelj@gmail.com</a></p>
			</div>
			<div class="col-lg-5 col-md-4 col-xs-12">
				<h5 class="footer-heading">Quick Links</h5>
				<div class="row">
					<div class="col-lg-6 col-md-6 col-xs-12">
						<p class="desc"><a href="Archives.php">Archives</a></p>
						<p class="desc"><a href="Submit+Paper.php">Submit Paper</a></p>
						<p class="desc"><a href="Editorial+Board.php">Editorial Board</a></p>
					</div>
					<div class="col-lg-6 col-md-6 col-xs-12">
						<p class="desc"><a href="FAQ.php">FAQ</a></p>
						<p class="desc"><a href="Ethics.php">Ethics</a></p>
						<p class="desc"><a href="Review.php">Review</a></p>
						<p class="desc"><a href="Submission+Guidelines.php">Submission Guidelines</a></p>
						<p class="desc"><a href="Contact.php">Contact</a></p>
					</div>
				</div>
			</div>
		</div>		
	</div>	
  </footer>
  <div class="dev-note">
		Copyrights For <script type="text/javascript">var today = new Date();var year = today.getFullYear();document.write(year);</script> Registered by Delmon Publications
		<br>
		Developed & Maintained By BVS Infotech.
  </div>
  <a href="#" class="back-to-top"><i class="icofont-simple-up"></i></a>

  <!-- Vendor JS Files -->
  <script src="assets/vendor/jquery/jquery.min.js"></script>
  <script src="assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
  <script src="assets/vendor/jquery.easing/jquery.easing.min.js"></script>
  <!-- <script src="assets/vendor/php-email-form/validate.js"></script> -->
  <script src="assets/vendor/waypoints/jquery.waypoints.min.js"></script>
  <script src="assets/vendor/counterup/counterup.min.js"></script>
  <script src="assets/vendor/owl.carousel/owl.carousel.min.js"></script>
  <script src="assets/vendor/isotope-layout/isotope.pkgd.min.js"></script>
  <script src="assets/vendor/venobox/venobox.min.js"></script>

  <!-- Template Main JS File -->
  <script src="assets/js/main.js"></script>

</body>

</html>