<?php 
include 'admin/includes/config.php';
if(isset($_POST['send']))
{
$femail=$_POST['email'];

$row1=mysqli_query($con,"select email,password,ppono,mobile from users where email='$femail'");
$row2=mysqli_fetch_array($row1);
if($row2>0)
{
$email = $row2['email'];
$subject = "Information about your password";
$password=base64_decode($row2['password']);
$userid=$row2['ppono'];
$message = "Your password is ".$password." And PPO/PF No. is ".$userid;
mail($email, $subject, $message, "From: noreply@ressgov.co.in");

// $textMessage="Recovery Credentials Of Your myoffersclub Account. Your User Id is ".$userid." And Password is ".$password;

    

   
 
echo  "<script>alert('Your Password has been sent Successfully');</script>";
}
else
{
echo "<script>alert('Email not register with us');</script>";   
}
}
 ?>

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="robots" content="noindex">
<meta name="googlebot" content="noindex">
	<title>RESS Forgot Your Password page</title>

	<link rel="stylesheet" href="css/bootstrap.css" crossorigin="anonymous">
	<style type="text/css">
		.logo {
  border-radius: 50%;
}
.login-card {
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    transition: 0.3s;
}
.card:hover {
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
}

.form-signin {
    width: 100%;
    max-width: 430px;
    padding: 15px;
    margin: 0 auto;
}

.form-signin .form-control {
    position: relative;
}

.form-signin .form-control:focus {
    z-index: 2;
}

#mid {
  text-align: center;
}
	</style>
</head>
<body class="bg-primary">

<div class="container pt-5">
	<div class="row">
		<div class="col-md-8 offset-md-2">
			<h3>Employee Self Service</h3>
		</div>
	</div>
  <div class="mx-auto card login-form" style="width: 450px">
    <div class="card-body">
      <form class="form-signin" action="" method="POST">
        <img class="mb-4 mx-auto d-block logo" src="img/logo.png" alt="Logo" width="90" height="90">
  
        <h3 id="mid" class="mb-3 font-weight-normal">Forgot Your Password</h3>
       
        
        <div class="form-group">
          <label >Enter Your Email</label>
          <input type="email" class="form-control" id="email" name="email" placeholder="Enter Email">
        </div>
        
        <button type="submit" class="btn btn-block btn-primary" name="send">Verify</button>
        <p class="text-center mt-2"><a href="index.php#login">Login</a></p>
        <p class="text-center"><a href="forgot-password.php">Forgot Password</a></p>
        <p class="text-center"><a href="mailto:info@ressgov.co.in">Contact us</a> | <a href="#">Version 3</a></p>
        <p id="mid" class="text-muted pt-5">Copy right @2024 and designed by CIRS</p>
      </form>
    </div>
  </div>
</div>


<script src="js/jquery.js" ></script>
<script src="js/popper.min.js"  ></script>
<script src="js/bootstrap.min.js" ></script>
</body>
</html>