<?php
include("connection.php");
if (isset($_POST['submit'])) {
  $pass = $_POST['pass'];
  $cpass = $_POST['cpass'];
  if ($pass === $cpass) {
    $pass = $_POST['pass'];
    $sql = "UPDATE `login` set `pass` = '$pass' WHERE id='1'";


    $query = mysqli_query($con, $sql);
    if ($query) {
      header("location: login.php");
    }
  }
}
?>

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

<head>

  <meta charset="utf-8" />
  <title>Reset password</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta content="Premium Multipurpose Admin & Dashboard Template" name="description" />
  <meta content="Themesbrand" name="author" />
  <!-- App favicon -->
  <link rel="shortcut icon" href="assets/logo/fav-icon.jpg">

  <!-- Bootstrap Css -->
  <link href="assets/css/bootstrap.min.css" id="bootstrap-style" rel="stylesheet" type="text/css" />
  <!-- Icons Css -->
  <link href="assets/css/icons.min.css" rel="stylesheet" type="text/css" />
  <!-- App Css-->
  <link href="assets/css/app.min.css" id="app-style" rel="stylesheet" type="text/css" />
  <!-- App js -->
  <script src="assets/js/plugin.js"></script>
  <style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }
    body{
      background: linear-gradient(0deg, #0000006e 0%, #00000063 20%), url(./assets/logo/banner.jpg);
      background-size: cover;
      background-position: center;
      background-repeat: no-repeat;
      height: 100vh;
      overflow-y: hidden;
      overflow-x: hidden;
    }
    </style>
</head>

<body>
  <div class="account-pages my-5 pt-sm-5">
    <div class="container">
      <div class="row justify-content-center">
        <div class="col-md-8 col-lg-6 col-xl-5">
          <div class="card overflow-hidden">
            <div class="bg-primary-subtle">
              <div class="row">
                <div class="col-12 text-center">
                  <div class="text-primary p-4">
                    <h5 class="text-primary"> Reset Password</h5>
                    <!-- <p>Reset Password with Skote.</p> -->
                  </div>
                </div>
                <!-- <div class="col-5 align-self-end">
                                    <img src="assets/images/profile-img.png" alt="" class="img-fluid">
                                </div> -->
              </div>
            </div>
            <div class="card-body pt-0">
              <div>
                <a href="index.html">
                  <div class="avatar-md profile-user-wid mb-4">
                    <span class="avatar-title  bg-light">
                      <img src="assets/logo/shaurya-logo.jpg" alt=""  height="60">
                    </span>
                  </div>
                </a>
              </div>

              <div class="p-2">
                <!-- <div class="alert alert-success text-center mb-4" role="alert">
                  Enter your user name instructions will be sent to you!
                </div> -->
                <form class="form-horizontal" method="post">

                  <div class="mb-3">
                    <label for="useremail" class="form-label">New Password</label>
                    <input type="text" class="form-control" id="username" name="pass" placeholder="Enter New Password">
                  </div>
                  <div class="input-group auth-pass-inputgroup">
                    
                    <input type="password" class="form-control" name="cpass" placeholder="Enter Confirm Password" aria-label="Password" aria-describedby="password-addon" required>
                    <button class="btn btn-light " type="button" id="password-addon"><i class="mdi mdi-eye-outline"></i></button>
                  </div>

                  <div class="text-end mt-3">
                    <button class="btn btn-primary w-md waves-effect waves-light" type="submit" name="submit" 
                    style="background: black;border:1px solid black;">Submit</button>
                  </div>

                </form>
              </div>

            </div>
          </div>


        </div>
      </div>
    </div>
  </div>

  <!-- JAVASCRIPT -->
  <script src="assets/libs/jquery/jquery.min.js"></script>
  <script src="assets/libs/bootstrap/js/bootstrap.bundle.min.js"></script>
  <script src="assets/libs/metismenu/metisMenu.min.js"></script>
  <script src="assets/libs/simplebar/simplebar.min.js"></script>
  <script src="assets/libs/node-waves/waves.min.js"></script>

  <!-- App js -->
  <script src="assets/js/app.js"></script>
</body>

<!-- Mirrored from themesbrand.com/skote/layouts/auth-recoverpw.html by HTTrack Website Copier/3.x [XR&CO'2014], Thu, 22 Feb 2024 09:29:58 GMT -->

</html>