<% Function Lead(s) if Len(s)=1 then s = "0" & s Lead = s End Function Function FormTime(tim) s = FormatDateTime(tim,4) s = Replace(s,":","") FormTime = s & "00Z" End Function Response.Expires = 0 Q = Request.QueryString("Q") Table = Request.QueryString("T") Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open DB Set RS = Conn.Execute("SELECT * FROM " & Table & " WHERE ID=" & Q) Von = RS(1) Bis = RS(2) if IsNull(Bis) or Bis="" then Bis = Von Title = RS(3) Tex = RS(4) Ort = RS(5) ST = RS(6) if Table="Seminar" then if not IsDate(ST) then ST = CDate("09:00") ET = ST Link = RS(8) else if IsNull(ST) or ST="" then ST = CDate("09:00") ET = RS(7) if IsNull(ET) or ET="" then ET = CDate("17:00") Link = RS(9) end if RS.Close Set RS = Nothing Conn.Close Set Conn = Nothing Response.Buffer = True Response.Clear Response.contentType = "text/plain" response.write "BEGIN: VCALENDAR" & VBCRLF response.write "VERSION: 1.0" & VBCRLF response.write "BEGIN: VEVENT" & VBCRLF response.write "DTSTART: " & Year(Von) & Lead(Month(Von)) & Lead(Day(Von)) & "T" & FormTime(ST) & VBCRLF response.write "DTEND: " & Year(Bis) & Lead(Month(Von)) & Lead(Day(Bis)) & "T" & FormTime(ET) & VBCRLF ' response.write "DCREATED: 20000216T175006Z" & VBCRLF ' response.write "LAST_MODIFIED: 20010216T175125Z" & VBCRLF response.write "STATUS: BUSY" & VBCRLF response.write "SUMMARY: " & Language(Title) & VBCRLF if tex<>"" then tex = StripTag(tex,"<",">") tex = Replace(tex,"ü","ue") tex = Replace(tex,"ä","ae") tex = Replace(tex,"ö","oe") tex = Replace(tex,VBCrLf,"\n") tex = Replace(tex," "," ") response.write "DESCRIPTION: " & MemoLanguage(Tex) & VBCRLF end if if Link<>"" then if Left(Link,3)="www" or Left(Link,4)="http" then response.write "URL: " & Link & VBCRLF end if response.write "LOCATION: " & Ort & VBCRLF response.write "END: VEVENT" & VBCRLF response.write "END: VCALENDAR" & VBCRLF Response.End %>