<!DOCTYPE html>
<html lang="en">


<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<?php include("head-tag.php");?>

<!--[if lt IE 9]>
		<script src="assets/js/html5shiv.min.js"></script>
		<script src="assets/js/respond.min.js"></script>
		<![endif]-->
<body>

<div class="inner-wrapper login-body">
<div class="login-wrapper">
<div class="container">
<div class="loginbox shadow-sm">
<div class="login-left">
<?php echo $companylogo;?>
</div>
<div class="login-right">
<div class="login-right-wrap">
<h1><?php echo $companylogosmall;?> </h1>    
<h1>Forgot Password?</h1>
<p class="account-subtitle">Enter your email to get a reset link</p>

<form action="recoverpassword.php" method="POST">
<div class="form-group">
<input name="Email" id="Email" class="form-control" type="Email" placeholder="Email">
<span id='message1'></span>
</div>
<div class="form-group mb-0">
<button class="btn btn-theme button-1 ctm-border-radius text-white btn-block" type="submit">Get Password</button>
</div>
</form>

<div class="text-center dont-have">Remember your password? <a href="login.php">Login</a></div>
</div>
</div>
</div>
</div>
</div>
</div>


<?php include("scripts.php");?>
<script>
var email_state = false;
    $('#Email').on('input', function(){
 	var email = $('#Email').val();
 	if (email == '') {
 		email_state = false;
 		return;
 	}
 	$.ajax({
      url: 'recoverpassword.php',
      type: 'post',
      data: {
      	'email_check' : 1,
      	'email' : email,
      },
      success: function(response){
      	if (response == 'taken' ) {
          email_state = false;
        $('#message1').html('Your Email is registred').css('color', 'green');
      	}else if (response == 'not_taken') {
      	  email_state = true;
      	 $('#message1').html('Email NOT Registered').css('color', 'red');
      	}
      }
 	});
 });
    
</script>
</body>

</html>