<% Option Explicit %> <% Session.LCID = 1030 %> <% ' Sæt siden til at expire for en dags siden for at sikre at de seneste nyheder med Response.ExpiresAbsolute = Now - 1 Dim strVisDato strVisDato = Request("Dato") If Len(strVisDato) = 0 then strVisDato = date() End If DIM objRS, strSQL ' strSQL = "SELECT * FROM Kalender WHERE (Maaned BETWEEN " & Month(strVisDato) & " AND " &_ ' Month(strVisDato)+2 & ") AND (Aar = " & Year(strVisDato) & ") ORDER BY " & _ ' "Dag + Maaned*31 + Aar*430" strSQL = "SELECT * FROM Kalender WHERE (Maaned BETWEEN " & Month(strVisDato) & " AND " &_ Month(Now)+12 & ") AND (Aar = " & Year(Now) & ") ORDER BY " & _ "Dag + Maaned*31 + Aar*430" Set objRS = Server.CreateObject("ADODB.Recordset") objRS.open strSQL, objConnection %> Sønderjysk Flyveklub
 
SFK-kalenderen
     
<% ShowCalendar DateAdd("m",0,strVisDato), -1, 0, "viskalendermaaned.asp", "visredigerkalenderdag1.asp" %> <% ShowCalendar DateAdd("m",1,strVisDato), 0, 0, "viskalendermaaned.asp", "visredigerkalenderdag1.asp" %> <% ShowCalendar DateAdd("m",2,strVisDato), 0, -1, "viskalendermaaned.asp", "visredigerkalenderdag1.asp" %>
<% Dim intRowCount, strBgColor(2) intRowCount = 0 strBgColor(0) = "'#F4F6F7'" strBgColor(1) = "'#D3D9E1'" strBgColor(2) = "'#91D0E6'" While NOT objRS.EOF Response.Write "" ' Vis gamle events i grålig font. Vis nye events i skiftende lyse toner. If DateSerial(objRS("Aar"),objRS("Maaned"),objRS("Dag")) < Date Then Response.Write "" Response.Write "" Else Response.Write "" Response.Write "" End If Response.Write "" intRowCount = intRowCount + 1 ObjRS.MoveNext Wend %>
" & _ objRS("Dag") & ". " & GetMonthName(objRS("Maaned")) & " " & objRS("Aar") & "" & _ objRS("Tekst") & "" & objRS("Dag") & ". " & _ GetMonthName(objRS("Maaned")) & " " & objRS("Aar") & "" & objRS("Tekst") & "
   
 
     
<% ' Husk at lukke objRS (recordsettet) før objConnectionen!! objRS.Close Set objRS = Nothing objConnection.Close Set objConnection = Nothing %>