<?php 	
	include_once("../view/header-footer/header.php");     
	
?> 
<script> 
$(document).ready(function(){	  
	
	$("#password_message").hide();
	
	$("#resetform").validate({
		
		errorElement:'div',
		rules:{ 
			password:{
				required:true,
				minlength:5,
			},
			confirm_password:{
				required:true
			} 
		},
		messages:{	
			password:{
				required:"Please enter password",
				minlength:"Enter minimum 5 characters"
			},
			confirm_password:{
				required:"Please enter confirm password"
			} 
		}
	});
	
	$("body").click(function(e) 
	{
		$("#password_message").hide();
	});
	
	
	$("#new_pwd").click(function() 
	{
    	if($(this).hasClass('fa fa-eye-slash'))
    	{           
    		$(this).removeClass('fa fa-eye-slash');
    		$(this).addClass('fa fa-eye');
    		$('#new_password').attr('type','text');        
    	}
    	else
    	{ 
    	  $(this).removeClass('fa fa-eye');  
    	  $(this).addClass('fa fa-eye-slash');  
    	  $('#new_password').attr('type','password');
    	}
    });
    
    $("#show_confirm_pwd").click(function() 
	{
    	if($(this).hasClass('fa fa-eye-slash'))
    	{           
    		$(this).removeClass('fa fa-eye-slash');
    		$(this).addClass('fa fa-eye');
    		$('#confirm_password').attr('type','text');          
    	}
    	else
    	{ 
    	  $(this).removeClass('fa fa-eye');  
    	  $(this).addClass('fa fa-eye-slash');  
    	  $('#confirm_password').attr('type','password');
    	}
    });
	
});   
</script>   
<?php include_once(ABS_PATH."/all-ajax/mini-inner.php");?>
<div id="body">
<h3 class="postJob pdlr7">Reset Password </h3>
<div class="wrapper"> 
		
<div class="white-bg  pdlr7"> 
<div id="dataRight" class="noRightBor pdlr7">
    	<ul class="resList white-box">
<li>    

	<h2 class="center"><?php //if($msg1)echo $msg1; else if($msg2)echo $msg2;else if($msg3)echo $msg3;else if($msg4)echo $msg4;
	if($_SESSION['update_pwd_msg1']) {  echo $_SESSION['update_pwd_msg1']; }
	else if($_SESSION['update_pwd_msg2']) { echo $_SESSION['update_pwd_msg2']; unset($_SESSION['update_pwd_msg2']); }
	else if($_SESSION['update_pwd_msg3']) { echo $_SESSION['update_pwd_msg3']; unset($_SESSION['update_pwd_msg3']); }
	else if($_SESSION['update_pwd_msg4']) { echo $_SESSION['update_pwd_msg4']; unset($_SESSION['update_pwd_msg4']); }
	?></h2>
	<form method="post"  id="resetform" autocomplete="off" enctype="multipart/form-data" action="<?php echo ROOTPATH;?>/custom_function/EmailConfigure.php">  <br>
	<div class="row postJobForm">
	    <?php if(!isset($_SESSION['update_pwd_msg1'])) { ?>
		<div class="col-lg-3 eye-icon-password">
			<label>New Password</label>
			<a href="javascript:void(0);"><i id="new_pwd" class="fa fa-eye-slash" aria-hidden="true"></i></a> 
			<input type="password"  name="password" id="new_password"  maxlength="30"  class="inputText"><!-- placeholder="New Password"-->
			<!--<span id="password_message">
			<h5>Password must contain the following:</h5>
			<span id="password_letter" class="invalid">A <b>lowercase</b> letter</span>&nbsp;&nbsp;&nbsp;&nbsp;
			<span id="password_capital" class="invalid">A <b>uppercase</b> letter</span>&nbsp;&nbsp;&nbsp;&nbsp;
			<span id="password_number" class="invalid">A <b>number</b></span>&nbsp;&nbsp;&nbsp;&nbsp;
			<span id="password_length" class="invalid">Minimum <b>6 characters</b></span><br>
			<span id="password_special_character" class="invalid">A <b>special character</b></span>
		     </span>
		     <br><br>-->
		</div>

        <div class="col-lg-3 eye-icon1-password">
			<label>Confirm Password</label>
			<a href="javascript:void(0);"><i id="show_confirm_pwd" class="fa fa-eye-slash" aria-hidden="true"></i></a> 
			<input type="password"  name="confirm_password"  maxlength="30"  id="confirm_password" class="inputText"><!-- placeholder="Confirm Password"-->
		</div>		
		
		<div class="clear"></div>
		<div class="col-lg-3"> 
		   <ul class="innUl-update">   
		    <li>
			  <input type="submit" name="update_pwd_submit"  value="Submit" class="btn btn-update_pwd_submit">
			  <input name="valid_id" id="valid_id" placeholder="" type="hidden" value="<?php if($_REQUEST['valid_id']!='')echo $_REQUEST['valid_id']; else echo '';?>">
		    </li>
		   </ul>
		</div> 
		<?php } else {?>
		<div class="col-lg-3"> 
		   <ul class="innUl-update">   
                <li>
                <a href="<?php echo ROOTPATH;?>/" class="btn btn-update_pwd_submit"><!-- class="btn applyButt"-->Please Login To Continue</a>
                <?php unset($_SESSION['update_pwd_msg1']);  ?>
                </li>
		   </ul>
		</div> 
		<?php } ?>
	</div>
	</form>
	<div class="clear"></div>	
</li> 
        </ul>
    </div>
<div class="clear"></div>
</div>
<br>
</div>
</div> 

<script>
/*var myInput = document.getElementById("new_password");
var letter = document.getElementById("password_letter");
var capital = document.getElementById("password_capital");
var number = document.getElementById("password_number");
var length = document.getElementById("password_length");
var special_character=document.getElementById("password_special_character");

document.getElementById("password_message").style.display = "none";

// When the user clicks on the password field, show the message box
myInput.onfocus = function() {
  document.getElementById("password_message").style.display = "block";
}

// When the user clicks outside of the password field, hide the message box
myInput.onblur = function() {
  document.getElementById("password_message").style.display = "none";
}

// When the user starts to type something inside the password field
myInput.onkeyup = function() {
   $("#password_message").show();	
	
  // Validate lowercase letters
  var lowerCaseLetters = /[a-z]/g;
  if(myInput.value.match(lowerCaseLetters)) {  
    letter.classList.remove("invalid");
    letter.classList.add("correct");
  } else {
    letter.classList.remove("correct");
    letter.classList.add("invalid");
  }
  
  // Validate capital letters
  var upperCaseLetters = /[A-Z]/g;
  if(myInput.value.match(upperCaseLetters)) {  
    capital.classList.remove("invalid");
    capital.classList.add("correct");
  } else {
    capital.classList.remove("correct");
    capital.classList.add("invalid");
  }

  // Validate numbers
  var numbers = /[0-9]/g;
  if(myInput.value.match(numbers)) {  
    number.classList.remove("invalid");
    number.classList.add("correct");
  } else {
    number.classList.remove("correct");
    number.classList.add("invalid");
  }
  
  // Validate length
  if(myInput.value.length >= 6) {
    length.classList.remove("invalid");
    length.classList.add("correct");
  } else {
    length.classList.remove("correct");
    length.classList.add("invalid");
  }
  
  // Validate special character
   var Spaecialcharacters = /[!@#\$%\^\&*]/g;
  if(myInput.value.match(Spaecialcharacters)) {  
    special_character.classList.remove("invalid");
    special_character.classList.add("correct");
  } else {
    special_character.classList.remove("correct");
    special_character.classList.add("invalid");
  }
}
    */
var confirmInput = document.getElementById("confirm_password");
confirmInput.onkeyup = function() 
{
   $("#password_message").hide();
}

</script>
<?php include_once("../view/header-footer/footer.php");  