<%@ LANGUAGE = "VBScript" %> <% Response.AddHeader "Content-Disposition", "filename=""atom.xml""" Response.ContentType = "application/x.atom+xml" Function IsoDate(theDate) If IsDate(theDate) = True Then DIM theDay, theMonth, theYear theDay = Day(theDate) theMonth = Month(theDate) theYear = Year(theDate) IsoDate = theYear & _ "-" & Right(Cstr(theMonth + 100),2) & _ "-" & Right(Cstr(theDay + 100),2) Else IsoDate = Null End If End Function Function LeadingZero(strText) If Len(strText) = 1 Then LeadingZero = "0" & strText Else LeadingZero = strText End If End Function strSQL = "SELECT blog_name FROM blog_settings" set dbRS = conn.execute(strSQL) dim blog_name blog_name = dbRS(0) 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 %> <%= IsoDate(last_modified) %>T00:00:00-05:00 /clicktech/demo/clickblog2/" type="application/x.atom+xml" rel="service.feed" title="<%= blog_name %>"/> <%= blog_name %> /clicktech/demo/clickblog2/" rel="alternate" title="<%= blog_name %>" type="text/html"/> <% do while not dbRS.EOF %> http://<%= Request.ServerVariables("HTTP_HOST") %>/clicktech/demo/clickblog2/displayBlog.asp?id=<%= dbRS("blog_id") %> /clicktech/demo/clickblog2/displayBlog.asp?id=<%= dbRS("blog_id") %>" /> Modified on <%= dbRS("last_modified") %> by <%= dbRS("blog_user") %> <%= dbRS("blog_contents") %> <%= dbRS("blog_user") %> <%= dbRS("email") %> <%= dbRS("blog_date") %> <%= IsoDate(dbRS("last_modified")) %>T00:00:00-05:00 <% dbRS.movenext loop %> <% end if dbRS.close set dbRS = nothing %>