<?php 
    session_start();
    include '../layout/header.php';
    include '../validacion.php';
    include '../siguientedia.php';
    include "../conexion/conexion.php";
    
if (isset($_SESSION['start'])) {
?>
<!DOCTYPE html>
<html lang="en">

<head>
  <title>Agendar - Recursos Humanos</title>
</head>

<body class="inner_page general_elements">
  <div class="full_container">
    <div class="inner_container">
      <!-- MENÚ  -->
      <?php include '../layout/menu.php'; ?>
      <!-- FIN DEL MENÚ -->
      <!-- right content -->
      <div id="content">
        <!-- SUBMENÚ  -->
        <?php include '../layout/submenu.php'; ?>
        <!-- FIN DEL SUBMENU -->
        <!-- dashboard inner -->
        <div class="midde_cont">
          <div class="container-fluid">
            <div class="row column_title">
              <div class="col-md-12">
                <div class="card-title">
                  <br>
                  <h2>Agendar Postulante</h2>
                  <br>
                </div>
              </div>
            </div>
            <!-- row -->
            <form action="validaragendar.php" method="POST">
              <div class="row column4 graph">
                <!-- tab style 1 -->
                <div class="col-md-12">
                  <!-- CUADRO DE CLIENTE-->
                  <div class="card">
                    <div class="card-header" style="background-color:#111638; color:white; font-weight:bold;">
                      <h3 class="card-title">Datos Personales del Postulante</h3>
                    </div>

                    <div class="card-body row">
                      <div class="form-group col-md-2">
                        <label for="exampleInputEmail1">Celular</label>
                        <input type="text" class="form-control" name="txtcelular" placeholder="Celular" maxlength="15" onKeypress="if (event.keyCode < 45 || event.keyCode > 57) event.returnValue = false;">
                      </div>
                      <div class="form-group col-md-2">
                        <label for="exampleInputEmail1">Contacto</label>
                        <input type="text" class="form-control" name="txtcelular2" placeholder="Celular 2" maxlength="12" onKeypress="if (event.keyCode < 45 || event.keyCode > 57) event.returnValue = false;">
                      </div>
                      <div class="form-group col-md-4">
                        <label for="exampleInputEmail1">Nombres y Apellidos</label>
                        <input type="text" class="form-control" id="txtnombresyapellidos" name="txtpostulante" required placeholder="Nombres y Apellidos" onkeyup="mayus(this)">
                        <input type="text" class="form-control" name="txtsedeprincipal" value="<?php echo $sede_sesion;?>" style="display:none;">
                      </div>
                      <div class="form-group col-md-2">
                        <label for="exampleSelectBorderWidth2">Doc. Identidad</label>
                        <select class="form-control rounded-2" name="cbotipodocumento">
                          <option value="DNI" selected>DNI</option>
                          <option value="CE">CARNET.EXT</option>
                          <option value="PASAPORTE">PASAPORTE</option>
                        </select>
                      </div>
                      <div class="form-group col-md-2">
                        <label for="exampleInputEmail1">DNI/C.E/PASAPORTE</label>
                        <input type="text" class="form-control" name="txtnumerodocumento" required placeholder="12345678" onkeyup="mayus(this)" maxlength="10">
                      </div>
                      <div class="form-group col-md-2">
                        <label for="exampleSelectBorderWidth2">Edad</label>
                        <select class="form-control rounded-2" name="cboedad">
                          <option value="" selected>Seleccionar</option>
                          <?php for ($i = 18; $i <= 40; $i++) { ?>
                            <option value="<?php echo $i; ?>"><?php echo $i; ?></option>
                          <?php } ?>
                        </select>
                      </div>
                      <div class="form-group col-md-3">
                        <label for="exampleSelectBorderWidth2">Distrito</label>
                        <select class="form-control rounded-2" name="cbodistrito">
                          <!--<option value="ANCON">Ancón</option>-->
                          <!--<option value="ATE VITARTE">Ate Vitarte</option>-->
                          <option value="BARRANCO">Barranco</option>
                          <!--<option value="BREÑA">Breña</option>-->
                          <!--<option value="CARABAYLLO">Carabayllo</option>-->
                          <!--<option value="CHACLACAYO">Chaclacayo</option>-->
                          <option value="CHORRILLOS">Chorrillos</option>
                          <!--<option value="CIENEGUILLA">Cieneguilla</option>-->
                          <!--<option value="COMAS">Comas</option>-->
                          <!--<option value="EL AGUSTINO">El Agustino</option>-->
                          <!--<option value="INDEPENDENCIA">Independencia</option>-->
                          <!--<option value="JESUS MARIA">Jesús María</option>-->
                          <!--<option value="LA MOLINA">La Molina</option>-->
                          <!--<option value="LA VICTORIA">La Victoria</option>-->
                          <!--<option value="LIMA">Lima</option>-->
                          <!--<option value="LINCE">Lince</option>-->
                          <!--<option value="LOS OLIVOS">Los Olivos</option>-->
                          <!--<option value="LURIGANCHO">Lurigancho</option>-->
                          <option value="LURIN">Lurín</option>
                          <!--<option value="MAGDALENA DEL MAR">Magdalena del Mar</option>-->
                          <!--<option value="MIRAFLORES">Miraflores</option>-->
                          <!--<option value="PACHACAMAC">Pachacamac</option>-->
                          <!--<option value="PUCUSANA">Pucusana</option>-->
                          <!--<option value="PUEBLO LIBRE">Pueblo Libre</option>-->
                          <!--<option value="PUENTE PIEDRA">Puente Piedra</option>-->
                          <!--<option value="PUNTA HERMOSA">Punta Hermosa</option>-->
                          <!--<option value="PUNTA NEGRA">Punta Negra</option>-->
                          <!--<option value="RIMAC">Rímac</option>-->
                          <!--<option value="SAN BARTOLO">San Bartolo</option>-->
                          <!--<option value="SAN BORJA">San Borja</option>-->
                          <!--<option value="SAN ISIDRO">San Isidro</option>-->
                          <!--<option value="SAN JUAN DE LURIGANCHO">San Juan de Lurigancho</option>-->
                          <option value="SAN JUAN DE MIRAFLORES">San Juan de Miraflores</option>
                          <!--<option value="SAN LUIS">San Luis</option>-->
                          <!--<option value="SAN MARTIN DE PORRES">San Martín de Porres</option>-->
                          <!--<option value="SAN MIGUEL">San Miguel</option>-->
                          <!--<option value="SANTA ANITA">Santa Anita</option>-->
                          <!--<option value="SANTA MARIA DEL MAR">Santa María del Mar</option>-->
                          <!--<option value="SANTA ROSA">Santa Rosa</option>-->
                          <option value="SANTIAGO DE SURCO">Santiago de Surco</option>
                          <!--<option value="SURQUILLO">Surquillo</option>-->
                          <option value="VILLA MARIA DEL TRIUNFO">Villa María del Triunfo</option>
                          <option value="VILLA EL SALVADOR">Villa El Salvador</option>
                        </select>
                      </div>
                      <div class="form-group col-md-3">
                        <label for="exampleSelectBorderWidth2">Fuente</label>
                        <select class="form-control rounded-2" name="cbofuente">
                          <!--<option value="" selected>Seleccionar</option>-->
                          <option value="FACEBOOK" selected>FACEBOOK</option>
                          <option value="COMPUTRABAJO">COMPUTRABAJO</option>
                          <option value="INSTAGRAM">INSTAGRAM</option>
                          <option value="TIKTOK">TIKTOK</option>
                          <option value="VOLANTES">VOLANTES</option>
                          <option value="REFERIDO">REFERIDO</option>
                          <option value="BUMERAN">BUMERAN</option>
                          <option value="VOLANTEO">VOLANTEO</option>
                          <option value="OTROS">OTROS</option>
                        </select>
                      </div>
                      <div class="form-group col-md-3">
                        <label>Fecha Agenda:</label>
                        <div class="input-group date" id="txtfechanacimiento" data-target-input="nearest">
                          <input type="date" class="form-control datetimepicker-input" value="<?php echo $next; ?>" name="txtfechaagenda" data-target="#reservationdate" required/>
                        </div>
                      </div>
                      <div class="form-group col-md-3">
                        <label for="exampleSelectBorderWidth2">Turno</label>
                        <select class="form-control rounded-2" name="cboturno">
                          <option value="MANANA">MAÑANA</option>
                          <option value="TARDE">TARDE</option>
                        </select>
                      </div>
                      <div class="form-group col-md-3">
                        <label for="exampleSelectBorderWidth2">Sede</label>
                        <select class="form-control rounded-2" name="cbosede">
                            <option value="VALLE SHARON" <?php if($sede_sesion == "VALLE SHARON"){ echo "selected";} ?>>VALLE SHARON</option>
                          <option value="VILLA MARIA" <?php if($sede_sesion == "VILLA MARIA"){ echo "selected";} ?>>VILLA MARÍA</option>
                          <option value="SAN JUAN" <?php if($sede_sesion == "SAN JUAN"){ echo "selected";}  ?>>SAN JUAN</option>
                        </select>
                      </div>
                      <div class="form-group col-md-12" id="adicional1">
                        <label for="exampleInputEmail1" id="lbladicional1">Observaciones</label>
                        <textarea type="textarea" rows="5" cols="10" class="form-control" name="txtobservaciones" placeholder="Observaciones" onkeyup="mayus(this)"></textarea>
                      </div>
                    </div>

                  </div>

                  <div class="card-body row">
                    <div class="col-md-12 mb-3">
                      <a href="" class="btn btn-default">Cancelar</a>
                      <input type="submit" class="btn btn-primary ml-3" value="Continuar">
                    </div>
                  </div>
                </div>
              </div>
            </form>
          </div>
          <!-- FOOTER -->
          <?php include '../layout/footer.php' ?>
          <!-- FIN DEL FOOTER -->
        </div>
        <!-- end dashboard inner -->
      </div>
    </div>
  </div>
  <!-- INCLUYENDO JS. -->
  <?php include '../layout/pie.php' ?>
</body>
</html>
<?php
} else {
  echo'<script type="text/javascript">alert("Inicie Sesión Nuevamente");window.location.href="../login/login.php";</script>';
}
?>