
<!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">
</head>
<body class="hold-transition sidebar-mini layout-fixed text-sm">

    <div class="wrapper">

      <script src="https://www.google.com/recaptcha/api.js"></script>
      <script type="text/javascript" src="./vista/lib/js/jquery-3.4.1.min.js"></script>
      <div class="hold-transition login-page" style="background-image: url(vista/lib/dist/img/img_sgi.jpg); background-repeat: no-repeat;">
        <div class="login-box">
            
          <!-- /.login-logo -->
          <div class="card">
            <div class="card-body login-card-body">
              <!-- <p class="login-box-msg">Iniciar sesión</p> -->
              <form action="" method="post" id="frm_clave">

                <input type="hidden" name="correo" id="correo" value="<?php echo $_GET['c'] ?>">

                <input type="hidden" name="codigo" id="codigo" value="<?php echo $_GET['codigo'] ?>">

                <div class="input-group mb-3">
                  <input type="password" class="form-control" id="clave1" name="clave1" placeholder="Nueva clave" required="">
                  <div class="input-group-append">
                    <div class="input-group-text">
                      <span class="fas fa-lock"></span>
                    </div>
                  </div>
                </div>
                <div class="input-group mb-3">
                  <input type="password" class="form-control" id="clave2" name="clave2" placeholder="Digita la clave nuevamente" required="">
                  <input type="hidden" name="reset_c" id="reset_c" value="reset_clave">
                  <div class="input-group-append">
                    <div class="input-group-text">
                      <span class="fas fa-lock"></span>
                    </div>
                  </div>
                </div>
                <div class="g-recaptcha container-fluid" data-sitekey="6LenyGkaAAAAAAFkMhB_Ko5_HQG3TmFZ25dFkmqT"></div>
                <div class="row">
                  <div class="col-sm-12">
                    <button type="submit" class="btn btn-success btn-block mt-3">Confirmar</button>
                  </div>
                  <!-- /.col -->
                </div>
                <br>
                <div id="msj">
                  
                </div>
                <?php 
                  if(isset($_POST['clave1']) && isset($_POST['clave2'])){
                    
                    $captcha = $_POST['g-recaptcha-response'];
                    $secret  = '6LenyGkaAAAAAOwKpiKssKsRkxWrIjMnNm6HsDCU';

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

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

                      $controladorAdministrador = new ControladorAdministrador();
                      
                      echo $controladorAdministrador->ctrRestableceContrasena();
                      
                    }
                  }  
                 ?>

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

      <!-- Control Sidebar -->
      <aside class="control-sidebar control-sidebar-dark">
        <!-- Control sidebar content goes here -->
      </aside>
      <!-- /.control-sidebar -->
    </div>
    <!-- ./wrapper -->
<!-- jQuery -->
<script src="./vista/lib/plugins/jquery/jquery.min.js"></script>
<!-- jQuery UI 1.11.4 -->
<script src="./vista/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>
