<% ' FileName="Connection_ado_conn_string.htm" ' Type="ADO" ' DesigntimeType="ADO" ' HTTP="true" ' Catalog="" ' Schema="" MM_webblogmanager_STRING = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("/databases/WebBlogManager.mdb") & ";" %> <% Function return_RFC822_Date(myDate, offset) Dim myDay, myDays, myMonth, myYear Dim myHours, myMonths, mySeconds myDate = CDate(myDate) myDay = WeekdayName(Weekday(myDate),true) myDays = Day(myDate) myMonth = MonthName(Month(myDate), true) myYear = Year(myDate) myHours = zeroPad(Hour(myDate), 2) myMinutes = zeroPad(Minute(myDate), 2) mySeconds = zeroPad(Second(myDate), 2) return_RFC822_Date = myDay&", "& _ myDays&" "& _ myMonth&" "& _ myYear&" "& _ myHours&":"& _ myMinutes&":"& _ mySeconds&" "& _ offset End Function Function zeroPad(m, t) zeroPad = String(t-Len(m),"0")&m End Function %> <% Response.Buffer = true Response.ContentType = "text/xml" Function ApplyXMLFormatting(strInput) strInput = Replace(strInput,"&", "&") strInput = Replace(strInput,"'", "'") strInput = Replace(strInput,"""", """) strInput = Replace(strInput, ">", ">") strInput = Replace(strInput,"<","<") ApplyXMLFormatting = strInput End Function %> <% Dim rsItems_RSS Dim rsItems_RSS_numRows Set rsItems_RSS = Server.CreateObject("ADODB.Recordset") rsItems_RSS.ActiveConnection = MM_webblogmanager_STRING rsItems_RSS.Source = "SELECT tblItems_Category_1.CategoryValue AS ParentCategoryValue, tblItems_Category.*, tblItems.* FROM (tblItems_Category RIGHT JOIN tblItems ON tblItems_Category.CategoryID = tblItems.CategoryIDkey) LEFT JOIN tblItems_Category AS tblItems_Category_1 ON tblItems_Category.ParentCategoryID = tblItems_Category_1.CategoryID WHERE tblItems.Activated = 'True' ORDER BY tblItems.SortOrder, tblItems_Category_1.CategoryValue, tblItems_Category.CategoryValue, tblItems.DateAdded DESC, tblItems.ItemID DESC" rsItems_RSS.CursorType = 0 rsItems_RSS.CursorLocation = 2 rsItems_RSS.LockType = 1 rsItems_RSS.Open() rsItems_RSS_numRows = 0 %> <% Dim rsConfig_RSS Dim rsConfig_RSS_numRows Set rsConfig_RSS = Server.CreateObject("ADODB.Recordset") rsConfig_RSS.ActiveConnection = MM_webblogmanager_STRING rsConfig_RSS.Source = "SELECT * FROM tblConfig" rsConfig_RSS.CursorType = 0 rsConfig_RSS.CursorLocation = 2 rsConfig_RSS.LockType = 1 rsConfig_RSS.Open() rsConfig_RSS_numRows = 0 %> <% 'XML OUTPUT Dim fldF Response.ContentType = "text/xml" Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & (rsConfig_RSS.Fields.Item("General_AppName").Value) & "" & vbCrlf Response.Write "" & "http://www." & (Request.ServerVariables("SERVER_NAME")) & "" & vbCrlf Response.Write "" & "This is DMXReady's Blog" & "" & vbCrlf Response.Write "" & return_RFC822_Date(Now(), "GMT") & "" & vbCrlf Response.Write "" & "en-us" & "" & vbCrlf 'A loop to collect all the articles do while not rsItems_RSS.EOF Response.Write "" & vbCrlf Response.Write "" & rsItems_RSS("ItemName").Value & "" & vbCrlf Response.Write "" & "http://www." & (Request.ServerVariables("SERVER_NAME")) & "/index.asp?ItemID=" & rsItems_RSS("ItemID").Value& "" & vbCrlf Response.Write "" & "http://www." & (Request.ServerVariables("SERVER_NAME")) & "/index.asp?ItemID=" & rsItems_RSS("ItemID").Value& "" & vbCrlf Response.Write "" & return_RFC822_Date((rsItems_RSS.Fields.Item("LastEditDate").Value), "GMT") & "" & vbCrlf Response.Write "" & ApplyXMLFormatting(rsItems_RSS.Fields.Item("ItemMemo").Value) & "" & vbCrlf Response.Write "" & vbCrlf rsItems_RSS.MoveNext Loop Response.Write "" & vbCrlf Response.Write "" & vbCrlf %> <% rsItems_RSS.Close() Set rsItems_RSS = Nothing %> <% rsConfig_RSS.Close() Set rsConfig_RSS = Nothing %>