<?php
//activamos almacenamiento en el buffer
//ob_start();
//session_start();
if (!isset($_SESSION['nombre'])) {
  header("Location: login");
}else{

  if ($_SESSION['almacen']==1) {
     ?>
    <!-- Main content -->
      <section class="content">
        <!-- Default box -->
        <div class="row">
          <div class="col-md-12">
            <div class="box">
                <div class="box-header with-border">
                  <!-- <button class="btn bg-green btn-app" onclick="mostrarform(true)" id="btnagregar"><i class="fa fa-plus-circle"></i> Agregar</button></h1> -->
                  <div class="box-tools pull-right">
                    <h1 class="box-title">Procesos\Citas 
                  </div>
                </div>
                <!--box-header-->
                <!--centro-->
                  <div class="panel-body table-responsive" id="listadoregistros">
                    <!-- <table id="tbllistado" class="table table-striped table-bordered table-condensed table-hover">
                      <thead>
                        <th>Opciones</th>
                        <th>Nombre</th>
                        <th>Descripcion</th>
                        <th>Estado</th>
                      </thead>
                      <tbody>
                      </tbody>
                      <tfoot>
                        <th>Opciones</th>
                        <th>Nombre</th>
                        <th>Descripcion</th>
                        <th>Estado</th>
                      </tfoot>   
                    </table> -->
                  </div>
                
                  <div class="panel-body" style="height: 800px;" id="formularioregistros">
                    <!-- <form action="" name="formulario" id="formulario" method="POST"> 
                      <div class="form-group col-lg-6 col-md-6 col-xs-12">
                        <label for="">Nombre</label>
                        <input class="form-control" type="hidden" name="idalmacen" id="idalmacen">
                        <input class="form-control" type="hidden" name="validado" id="validado">
                        <input class="form-control" type="text" name="nombre" id="nombre" maxlength="50" placeholder="Nombre" required>
                      </div>
                      <div class="form-group col-lg-6 col-md-6 col-xs-12">
                        <label for="">Descripcion</label>
                        <input class="form-control" type="text" name="descripcion" id="descripcion" maxlength="256" placeholder="Descripcion">
                      </div>
                    </form> -->
                    <div id='calendar' style="width:95%"></div>
                  </div>
                <!--fin centro-->
                  <div class="box-footer" id="formularioregistros1">
                    <!-- <button class="btn bg-blue btn-app pull-right" type="submit" id="btnGuardar"><i class="fa fa-save"></i>  Guardar</button> -->
                    <button class="btn bg-red btn-app pull-right" onclick="cancelarform()" type="button"><i class="fa fa-arrow-circle-left"></i> Cancelar</button>
                  </div>
                  <!-- Modal -->
                <div class="modal fade" id="ModalEventos" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <form action="" name="formularioevento" id="formularioevento" method="POST">	
                                <div class="modal-header">
                                    <h5 class="modal-title" id="tituloEvento"></h5>
                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                    <span aria-hidden="true">&times;</span>
                                    </button>
                                </div>
                                <div class="modal-body">
                                    <div id="descripcionEvento"></div>
                                    <dl class="row">
                                        <!-- <dt class="col-sm-3">Id</dt>
                                        <dd class="col-sm-9">
                                            <input type="text" id="id" name="id">
                                        </dd> -->
                                        <input type="hidden" id="start1" name="start1">
                                        <input type="hidden" id="id" name="id">  
                                        <input type="hidden" id="title" name="title" value="">
                                        <input type="hidden" id="descripcion" name="descripcion" value="">
                                        <input type="hidden" id="textColor" name="textColor" value="#000000">
                                        <input type="hidden" id="backgroundColor" name="backgroundColor" value="#0a1da5">
                                        <input type="hidden" id="horaf" name="horaf">
                                        <input type="hidden" id="hora1" name="hora1">
                                        <input type="hidden" id="hora2" name="hora2">
                                        <input type="hidden" id="idcubiculo1" name="idcubiculo1">
                                        <input type="hidden" id="idcama1" name="idcama1">
                                        <input type="hidden" id="idcamarahiperbarica1" name="idcamarahiperbarica1">
                                        <input type="hidden" id="ruta" name="ruta" value="<?php echo SERVERURL ?>">
                                        
                                        <div class="form-group col-lg-6 col-md-6 col-xs-12">
                                            <label for="">Fecha</label>
                                            <input class="form-control" type="text" name="start" id="start" maxlength="20"  required>
                                            
                                        </div>
                                        <div class="form-group col-lg-6 col-md-6 col-xs-12">
                                            <label for="">Hora</label>
                                            <select name="horai" id="horai" class="form-control selectpicker" data-live-search="true" required>
                                              
                                            </select>
                                        </div>
                                        <div class="form-group col-lg-6 col-md-6 col-xs-12">
                                            <label for="">Paciente</label>
                                            <select name="idpaciente" id="idpaciente" class="form-control selectpicker" data-live-search="true" required>
                                            </select>
                                        </div>
                                        <div class="form-group col-lg-6 col-md-6 col-xs-12">
                                            <label for="">Fisioterapeuta</label>
                                            <select name="idfisioterapeuta" id="idfisioterapeuta" class="form-control selectpicker" data-live-search="true" required>
                                            </select>
                                        </div>
                                        <div class="form-group col-lg-6 col-md-6 col-xs-12">
                                            <label for="">Servicio</label>
                                            <select name="idservicio" id="idservicio" class="form-control selectpicker" data-live-search="true" required>
                                            </select>
                                        </div>
                                        <div class="form-group col-lg-6 col-md-6 col-xs-12">
                                            <label for="">Espacio</label>
                                            <select name="espacio" id="espacio" class="form-control selectpicker" data-live-search="true" required>
                                              <option value="nada"></option>
                                              <option value="cama">CamillaGym</option>
                                              <option value="cubiculo">Cubículo</option>
                                              <option value="camarahiperbarica">Cámara Hiperbárica</option>
                                              
                                            </select>
                                        </div>

                                        <div class="form-group col-lg-6 col-md-6 col-xs-12" id="cubiculo">
                                            <label for="">Cubículo</label>
                                            <select name="idcubiculo" id="idcubiculo" class="form-control selectpicker" data-live-search="true" required>
                                            </select>
                                        </div>
                                        <div class="form-group col-lg-6 col-md-6 col-xs-12" id="cama">
                                            <label for="">Camilla Gym</label>
                                            <select name="idcama" id="idcama" class="form-control selectpicker" data-live-search="true" required>
                                            </select>
                                        </div>
                                        <div class="form-group col-lg-6 col-md-6 col-xs-12" id="camarahiperbarica">
                                            <label for="">Cámara Hiperbárica</label>
                                            <select name="idcamarahiperbarica" id="idcamarahiperbarica" class="form-control selectpicker" data-live-search="true" required>
                                            </select>
                                        </div>
                                        <div class="form-group col-lg-6 col-md-6 col-xs-12" id="estado1">
                                            <label for="">Status</label>
                                            <select name="estado" id="estado" class="form-control selectpicker" data-live-search="true" required>
                                                <option value="disponible">Disponible</option>
                                                <option value="realizada">Realizada</option>
                                                <option value="cobrada">Cobrada</option>
                                                <option value="cancelada">Cancelada</option>
                                                <option value="notshown">Not Shown</option>
                                                <option value="borrada">Deshabilitar</option>
                                               
                                            </select>
                                        </div> 
                                                                                                                    
                                        <!-- <dt class="col-sm-3">Descripción</dt>
                                        <dd class="col-sm-9">
                                            <input type="text" id="descripcion" name="descripcion">
                                        </dd>
                                        <dt class="col-sm-3">Color</dt>
                                        <dd class="col-sm-9">
                                            <input type="color" id="backgroundColor" name="backgroundColor">
                                        </dd> -->
                                    </dl>
                                </div>
                                <div class="modal-footer">
                                    <button type="submit" id="btnAgregar" name="btnAgregar" class="btn btn-primary">Guardar</button>
                                    <!-- <button type="button" class="btn btn-danger">Borrar</button> -->
                                    <button type="button" class="btn btn-default" id="btnClose" name="btnClose">Close</button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
                
              <!-- /.box-footer -->
            </div>
          </div>
        </div>
        <!-- /.box -->
      </section>
      <!-- /.content -->
      </div>
         
  <?php 
  }else{
    require 'vistas/contenidos/noacceso-view.php'; 
  }
  ?>
          <!-- Main Footer -->
          <?php include "vistas/modulos/mainfooter.php";?>
      </div>

      <!-- ./wrapper -->
      <!-- REQUIRED JS SCRIPTS -->
      <?php include "vistas/modulos/script.php";?>
      <script src="vistas/scripts/cita.js"></script>
  </body>
  </html> 
<?php  
}
  ob_end_flush();
?>

