
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>SIE Gomez Plata</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="../lib/plugins/fontawesome-free/css/all.min.css">
  <!-- Ionicons -->
  <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
  <!-- Tempusdominus Bbootstrap 4 -->
  <link rel="stylesheet" href="../lib/plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css">
  <!-- iCheck -->
  <link rel="stylesheet" href="../lib/plugins/icheck-bootstrap/icheck-bootstrap.min.css">
  <!-- JQVMap -->
  <link rel="stylesheet" href="../lib/plugins/jqvmap/jqvmap.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="../lib/dist/css/adminlte.min.css">
  <!-- overlayScrollbars -->
  <link rel="stylesheet" href="../lib/plugins/overlayScrollbars/css/OverlayScrollbars.min.css">
  <!-- Daterange picker -->
  <link rel="stylesheet" href="../lib/plugins/daterangepicker/daterangepicker.css">
  <!-- summernote -->
  <link rel="stylesheet" href="../lib/plugins/summernote/summernote-bs4.css">
  <!-- Google Font: Source Sans Pro -->
  <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
  <script src="https://www.google.com/recaptcha/api.js"></script>
</head>
<body class="hold-transition sidebar-mini layout-fixed text-sm">
        <!-- Content Wrapper. Contains page content -->

          <div class="container-fluid">
            <div class="row">
              <div class="col-12">
                <!-- Default box -->
                <div class="card">
                  <div class="card-header">
                    <h1 class="card-title">Restablecer contraseña</h1>

                    <!-- <div class="card-tools">
                      <button type="button" class="btn btn-tool" data-card-widget="collapse" data-toggle="tooltip" title="Collapse">
                        <i class="fas fa-minus"></i></button>
                      <button type="button" class="btn btn-tool" data-card-widget="remove" data-toggle="tooltip" title="Remove">
                        <i class="fas fa-times"></i></button>
                    </div> -->
                  </div>
                  <div class="card-body">
                    <p>
                      Por favor ingresar su correo electronico para recuperar su contraseña.
                    </p>
                    <form class="form-horizontal" action="" method="post">
                      <div class="form-group">
                        <label>Correo</label>
                        <input type="email" class="form-control" name="email" id="email" placeholder="Correo electronico" required="">
                        <input type="hidden" name="reset_c" id="reset_c" value="reset_clave">
                      </div>
                      <div class="g-recaptcha" data-sitekey="6LenyGkaAAAAAAFkMhB_Ko5_HQG3TmFZ25dFkmqT"></div>
                        <div class="row">
                          <div class="col-sm-12">
                          </div>
                          <!-- /.col -->
                        </div>
                        <button type="submit" class="btn btn-success mt-3">Confirmar</button> 

                        <?php

                          if(isset($_POST['email'])){
                            $captcha = $_POST['g-recaptcha-response'];
                            $secret  = '6LenyGkaAAAAAOwKpiKssKsRkxWrIjMnNm6HsDCU';

                            if(!$captcha){
                              echo "<br><div class='alert alert-danger p-3 mt-1'>Por favor verifica el captcha</div>";
                            }else{

                              require_once "../../controlador/administador.controlador.php";

                              $controladorAdministrador = new ControladorAdministrador();
                              
                              echo $controladorAdministrador->ctrEnvioCorreoRestableceContrasena();

                            }  

                          }  
                            ?>   
                    </form>
                  </div>
                  <!-- /.card-body -->
                  <div class="card-footer">
                    ¿ Ya tienes cuenta ? 
                    <a href="http://alejoposada.info/sie/index.php">Inicia sesión</a>
                  </div>
                  <!-- /.card-footer-->
                </div>
                <!-- /.card -->
              </div>
            </div>
          </div>
    <!-- /.content -->

      <!-- Control Sidebar -->
      <aside class="control-sidebar control-sidebar-dark">
        <!-- Control sidebar content goes here -->
      </aside>
      <!-- /.control-sidebar -->
    </div>
    <!-- ./wrapper -->
    
<!-- jQuery -->
<script src="../lib/plugins/jquery/jquery.min.js"></script>
<!-- jQuery UI 1.11.4 -->
<script src="../lib/plugins/jquery-ui/jquery-ui.min.js"></script>
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
<script>
  $.widget.bridge('uibutton', $.ui.button)
</script>
<!-- Bootstrap 4 -->
<script src="../lib/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- ChartJS -->
<script src="../lib/plugins/chart.js/Chart.min.js"></script>
<!-- Sparkline -->
<script src="../lib/plugins/sparklines/sparkline.js"></script>
<!-- JQVMap -->
<script src="../lib/plugins/jqvmap/jquery.vmap.min.js"></script>
<script src="../lib/plugins/jqvmap/maps/jquery.vmap.usa.js"></script>
<!-- jQuery Knob Chart -->
<script src="../lib/plugins/jquery-knob/jquery.knob.min.js"></script>
<!-- daterangepicker -->
<script src="../lib/plugins/moment/moment.min.js"></script>
<script src="../lib/plugins/daterangepicker/daterangepicker.js"></script>
<!-- Tempusdominus Bootstrap 4 -->
<script src="../lib/plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
<!-- Summernote -->
<script src="../lib/plugins/summernote/summernote-bs4.min.js"></script>
<!-- overlayScrollbars -->
<script src="../lib/plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js"></script>
<!-- AdminLTE App -->
<script src="../lib/dist/js/adminlte.js"></script>
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
<script src="../lib/dist/js/pages/dashboard.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="../lib/dist/js/demo.js"></script>
</body>
</html>
