<% 'Creamos recordset set rs=server.createobject("ADODB.Recordset") misql="select * from aulas" Set rs.ActiveConnection = Conn rs.CursorType = 2 rs.LockType = 3 rs.Open misql,Conn edificios=extrae_edificios(session("edificio")) where="(" for i=1 to edificios(0) where=where&"id="&edificios(i)&" or " next where=where&" id=0)" %> <% validado=validar() set anio=request("year") set dia=request("day") set mes=request("month") set key=request("key") set cal=request("cal") set origen=request("origen") set accion=request("accion") if request("dataArea0")<>"" and request("dataArea1")<>"" then Session("finicio")=request("dataArea0") Session("ffin")=request("dataArea1") else Session("finicio")=day(date)&"/"&month(date)&"/"&year(date) Session("ffin")=day(date)&"/"&month(date)&"/"&year(date) end if hora=request("h1") hora2=request("h2") if hora="" then hora="8:00:00" if mes="" then mes = Month(Date) end if if anio="" then anio = Year(Date) end if if dia="" then dia = Day(Date) end if function comprueba_fecha(dia,mes,anio) hoy=Date fecha=dia&"/"&mes&"/"&anio if datediff("d",hoy,fecha)<0 then comprueba_fecha=false else comprueba_fecha=true end if end function %> Creacion de informe
<%if not Session("finicio")="" and not Session("ffin")="" and datediff("d",Session("finicio"),Session("ffin"))>=0 then%> <%end if%> <%if not Session("finicio")="" and not Session("ffin")="" and datediff("d",Session("finicio"),Session("ffin"))>=0 then%>
<%call cuadro3_ini("Seleccione fechas de la reserva")%>
El sistema comprobará que aulas hay disponibles
Seleccione fecha de inicio:
Seleccione fecha de fin:
<%call cuadro3_fin()%>
<%call cuadro_ini("Edificio/s","center")%> <% misql="select * from edificios where "&where set rs=conn.execute(misql) while not rs.eof c="" if request("ed_"&rs("id"))="on" then c="checked" %> <% rs.movenext wend %>
<%=rs("nombre")%> >
<%call cuadro_fin()%>
<% if datediff("d",Session("ffin"),session("finicio"))>0 then aux=session("finicio") Session("finicio")=Session("ffin") Session("ffin")=aux end if %> <%call cuadro3_ini("Configuración de la reserva")%>
<%call cuadro_ini("Horario","center")%>
Hora de inicio
Hora de finalización
<%call cuadro_fin()%>
<%call cuadro_ini("Días de la semana a reservar","center")%>
LMXJVSD
Ver aulas libres
<%call cuadro_fin()%> <%call cuadro3_fin()%>
<%end if%>
<%if origen="error1" then%>

No pueden realizarse reservas para fechas anteriores al día de hoy

<%end if%>