<?xml version="1.0" encoding="iso-8859-1"?>
<% Response.Buffer = true
   Response.ContentType = "text/xml"
   
Function ApplyXMLFormatting(strInput)
  strInput = Replace(strInput,"&", "&amp;")
  strInput = Replace(strInput,"'", "&apos;")
  strInput = Replace(strInput,"""", "&quot;")
  strInput = Replace(strInput, ">", "&gt;")
  strInput = Replace(strInput,"<","&lt;")
  
  ApplyXMLFormatting = strInput
End Function   
    %>

<rss version="2.0">
<channel>
<title>life from the motor city</title>
<link>http://www.shananegins.com/blog</link>
<description>Helping to keep you better informed... About me!</description>
<language>en-us</language>
<copyright>2008</copyright>

<% 
CurrDate = Now()
CurrHour = Hour(CurrDate)
CurrHour = CurrHour-1
if CurrHour < 10 then CurrHour = "0" & CurrHour
CurrMin = Minute(CurrDate)
if CurrMin < 10 then CurrMin = "0" & CurrMin
CurrSec = Second(CurrDate)
if CurrSec < 10 then CurrSec = "0" & CurrSec

CurrDateT = WeekdayName(Weekday(CurrDate), TRUE) & ", " & Day(CurrDate) & " " & _
MonthName(Month(CurrDate), TRUE) & " " & Year(CurrDate) & " " & _
CurrHour & ":" & CurrMin & ":" & CurrSec & " EST"
%>

<lastBuildDate><%=CurrDateT%></lastBuildDate>
<ttl>240</ttl>
<image>
<url>http://www.shananegins.com/blog/lftmc.gif</url>
<title>Life from the Motor City</title>
<link>http://www.shananegins.com/blog</link>
</image>

<%
Set FeatSiteConn = Server.CreateObject("ADODB.Connection")
FeatSiteConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=e:\shananegins.com\blog\blog.mdb"
Set FeatSite = Server.CreateObject("ADODB.RECORDSET")
FeatSite.CursorType = 1
FeatSite.LockType = 2
SQLText="SELECT TOP 5 entryName, pubPriv, entryText, entryDate, entryTime, a.entryID, (SELECT COUNT(commentID) FROM tblComment b WHERE a.entryID = b.entryID) AS comCount, catType FROM tblShowEntries a WHERE entryDate <= #" & Now() & "# ORDER BY entryDate DESC, entryTime DESC"
FeatSite.Open SQLText, FeatSiteConn

'response.write SQLText

FeatCt = 1
do while not FeatSite.EOF and FeatCt < 6

ArtDesc = Replace(FeatSite("entryText"), chr(180), "'")
ArtDesc = Replace(ArtDesc, "´", "'")
ArtDesc = Replace(ArtDesc, "&", "&amp;")
ArtDesc = Replace(ArtDesc, "&amp;nbsp;", " ")
ArtDesc = Replace(ArtDesc, "<BR>", "<BR />")
ArtDesc = Replace(ArtDesc, "<P>", "<BR /><BR />")
ArtDesc = Replace(ArtDesc, "</P>", "<BR />")
ArtDesc = """" & ArtDesc & """"

if FeatSite("pubPriv")=1 then
ArtDesc = ArtDesc
elseif FeatSite("pubPriv")=2 then
ArtDesc = "This is a private entry.  If you know the password you can login to view it!"
end if

ArtTitle = Replace(FeatSite("entryName"), chr(180), "'")
ArtTitle = Replace(ArtTitle, "´", "'")
ArtTitle = Replace(ArtTitle, "&", "&")

ArtDate = FeatSite("entryDate")
ArtTime = FeatSite("entryTime")

ArtHour = Hour(ArtTime)
ArtHour = ArtHour - 1
if ArtHour < 10 then ArtHour = "0" & ArtHour
ArtMin = Minute(ArtTime)
if ArtMin < 10 then ArtMin = "0" & ArtMin
ArtSec = Second(ArtTime)
if ArtSec < 10 then ArtSec = "0" & ArtSec

ArtDateT = WeekdayName(Weekday(ArtDate), TRUE) & ", " & Day(ArtDate) & " " & _
MonthName(Month(ArtDate), TRUE) & " " & Year(ArtDate) & " " & _
ArtHour & ":" & ArtMin & ":" & ArtSec & " EST"
%>
<item>
<title><%=ArtTitle%></title>
<link>http://www.shananegins.com/blog/index.asp?entryID=<%=FeatSite("entryID")%>&amp;selectedDate=<%=FeatSite("entryDate")%></link>
<description>
	<%=ArtDesc%>
</description>
<pubDate><%=ArtDateT%></pubDate>
</item>
<%
FeatSite.MoveNext
FeatCt = FeatCt + 1
loop
FeatSite.close()
set FeatSite = Nothing
%>

</channel>
</rss>