<%@ LANGUAGE = "VBScript" %> <% Response.AddHeader "Content-Disposition", "filename=""rss.xml""" Response.ContentType = "application/rss+xml" Function RSSDate(dtmDate) Dim strDate strDate = Left(WeekdayName(DatePart("w", dtmDate)), 3) & ", " & _ LeadingZero(DatePart("d", dtmDate)) strDate = strDate & _ " " & Left(MonthName(DatePart("m", dtmDate)), 3) & " " & _ DatePart("yyyy", dtmDate) & _ " " & LeadingZero(DatePart("h", dtmDate)) strDate = strDate & ":" & LeadingZero(DatePart("n", dtmDate)) & _ ":" & LeadingZero(DatePart("s", dtmDate)) & " GMT" RSSDate = strDate End Function Function LeadingZero(strText) If Len(strText) = 1 Then LeadingZero = "0" & strText Else LeadingZero = strText End If End Function strSQL = "SELECT blog_name, admin_email, blog_url FROM blog_settings" set dbRS = conn.execute(strSQL) dim blog_name blog_name = dbRS(0) admin_email = dbRS(1) blog_url = dbRS(2) set dbRS = nothing strSQL = "SELECT MAX(last_modified) FROM blog_contents" set dbRS = conn.execute(strSQL) dim last_modified last_modified = dbRS(0) set dbRS = nothing strSQL = "SELECT BC.blog_date, BC.blog_contents, BC.last_modified, BC.blog_user, BC.blog_id, BU.email "_ & "FROM blog_contents BC " _ & "INNER JOIN blog_users BU ON " _ & "BC.blog_user = BU.username " _ & "ORDER BY BC.blog_date DESC" set dbRS = conn.execute(strSQL) if not dbRS.eof then %> <%= blog_name %> <%= blog_url %> The RSS feed for <%= blog_name %> en <%= RSSDate(last_modified) %> ClickBlog 2.0 <%= admin_email %> http://blogs.law.harvard.edu/tech/rss 30 <% do while not dbRS.EOF %> <![CDATA[Modified on <%= dbRS("last_modified") %> by <%= dbRS("blog_user") %>]]> ]]> <%= blog_url %>/displayRecord.asp?id=<%= dbRS("blog_id") %> <%= RSSdate(revDate(dbRS("blog_date"))) %> <%= RSSdate(revDate(dbRS("blog_date"))) %> -- <%= RSSdate(dbRS("last_modified")) %> <%= dbRS("email") %> <% dbRS.movenext loop %> <% end if dbRS.close set dbRS = nothing %>