  <?php

use App\Libraries\ejLib;
$var = ejLib::getInstance();
$soapclient = $var->getWs();
$wsClave = $var->get_wsClave();

?>

  <!-- Modal -->
  <div class="modal fade" id="agregarCon" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog modal-lg" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
          <h4 class="modal-title" id="myModalLabel">AGREGAR CONSULTORIO</h4>
        </div>
        <div class="modal-body">
          <form>
            Consultorio:
              <select id="consultorio">
                <option value="2000">2</option>
                <option value="3000">3</option>
                <option value="4000">4</option>
                <option value="5000">5</option>
              </select> 
            Especialidad:
              <select id="especialidad">
                <option value="1">Familiar</option>
                <option value="2">Dermatologo</option>
                <option value="3">Alergologo</option>
                <option value="4">Cirujano Plastico</option>
              </select>
            Tiempo de Consulta:
              <select id="tiempoConsulta">
                <option value="15">15 minutos</option>
                <option value="20">20 minutos</option>
                <option value="25">25 minutos</option>
                <option value="30">30 minutos</option>
                <option value="35">35 minutos</option>
                <option value="40">40 minutos</option>
                <option value="45">45 minutos</option>
                <option value="50">50 minutos</option>
                <option value="55">55 minutos</option>
                <option value="60">60 minutos</option>
              </select><br>
            Fecha Inicio: <input type="date" id="fechaInicio">
            Fecha Termino:<input type="date" id="fechaTermino"><br><br>
            <?php  
              $diaSemana = array("DO" => "Domingo", "LU" => "Lunes", "MA" => "Martes", "MI" => "Miercoles", "JU" => "Jueves", "VI" => "Viernes", "SA" => "Sabado");
            ?>
            <table  width="480" class="form-group-sm ">
              <tr>
                <th class="col-sm-2 text-center">Dia</th><th class="col-sm-3 text-center">Hora de Inicio</th>
                <th class="col-sm-3 text-center">Hora de Termino</th><th class="col-sm-1 text-center"></th>
              </tr>
              <?php 
                foreach ($diaSemana as $inicialDia => $dia){
              ?>

              <tr>
                <td><div class="checkbox_table"><label><input data-dia="<?=$inicialDia ?>" type="checkbox" value=""><?=$dia ?></label></div></td>
                <td>
                  <div class="col-1">
                    <input type="number" id="<?=$inicialDia ?>_hora_i_h" name="<?=$inicialDia ?>_hora_i_h"  class="form-control timeInput"  min="0" max="23">
                  </div> :
                  <div class="col-1">
                    <input type="number" id="<?=$inicialDia ?>_hora_i_m" name="<?=$inicialDia ?>_hora_i_m" class="form-control" min="0" max="59">
                  </div>
                </td>
                <td>
                  <div class="col-1">
                    <input type="number" id="<?=$inicialDia ?>_hora_t_h" name="<?=$inicialDia ?>_hora_t_h" class="form-control" min="0" max="23">
                  </div> :
                  <div class="col-1">
                    <input type="number" id="<?=$inicialDia ?>_hora_t_m" name="<?=$inicialDia ?>_hora_t_m" class="form-control" min="0" max="59">
                  </div>
                </td>
                <td><button type="submit"  id="btn_todos">Todos</button></td>
              </tr>
              <?php } ?>
            </table>
          </form>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
          <button type="button" class="agregarConsultorio btn btn-primary">Agregar</button>
        </div>
      </div>
    </div>
  </div>

  




