<%@LANGUAGE="VBSCRIPT"%> <% Dim rsBlogSite Dim rsBlogSite_numRows Set rsBlogSite = Server.CreateObject("ADODB.Recordset") rsBlogSite.ActiveConnection = MM_blog_STRING rsBlogSite.Source = "SELECT * FROM tblBlogRSS" rsBlogSite.CursorType = 0 rsBlogSite.CursorLocation = 2 rsBlogSite.LockType = 1 rsBlogSite.Open() rsBlogSite_numRows = 0 %> <% if request("layout") <> "" and len(request("layoit")) < 5 then layout = request("layout") else layout = (rsBlogSite.Fields.Item("blogLayout").Value) end if Dim rsLayout Dim rsLayout_numRows Set rsLayout = Server.CreateObject("ADODB.Recordset") rsLayout.ActiveConnection = MM_blog_STRING rsLayout.Source = "SELECT * from tblLayout WHERE layoutid = " & layout rsLayout.CursorType = 0 rsLayout.CursorLocation = 2 rsLayout.LockType = 1 rsLayout.Open() rsLayout_numRows = 0 %> <% Dim rsArticles Dim rsArticles_numRows Set rsArticles = Server.CreateObject("ADODB.Recordset") rsArticles.ActiveConnection = MM_blog_STRING rsArticles.Source = "SELECT *, (SELECT COUNT(*) FROM tblComment WHERE tblComment.BlogID = tblBlog.BlogID AND tblComment.CommentInclude = 1) as CommentCount, (SELECT COUNT(*) FROM tblBlog WHERE BlogCat = CatID) as CategoryCount FROM tblBlog, tblCat, tblAuthor WHERE BlogCat = CatID AND tblBlog.BlogAuthor = tblAuthor.fldAuthorID AND tblBlog.BlogDraft <> 1 ORDER BY BlogDate DESC" rsArticles.CursorType = 0 rsArticles.CursorLocation = 2 rsArticles.LockType = 1 rsArticles.Open() rsArticles_numRows = 0 %> <% Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = -1 Repeat1__index = 0 rsBlogSite_numRows = rsBlogSite_numRows + Repeat1__numRows %> <% Dim Repeat3__numRows Dim Repeat3__index Repeat3__numRows = rsBlogSite.Fields.Item("BlogPosts").Value Repeat3__index = 0 rsArticles_numRows = rsArticles_numRows + Repeat3__numRows %> <% FUNCTION CropSentence(strText, intLength, strTrial) Dim wsCount Dim intTempSize Dim intTotalLen Dim strTemp wsCount = 0 intTempSize = 0 intTotalLen = 0 intLength = intLength - Len(strTrial) strTemp = "" IF Len(strText) > intLength THEN arrTemp = Split(strText, " ") FOR EACH x IN arrTemp IF Len(strTemp) <= intLength THEN strTemp = strTemp & x & " " END IF NEXT CropSentence = Left(strTemp, Len(strTemp) - 1) & strTrial ELSE CropSentence = strText END IF END FUNCTION %> Judy Dawn - blog

Judy Dawn

Action Romance with a Biochemical Twist

Welcome to my blog.

<% While ((Repeat3__numRows <> 0) AND (NOT rsArticles.EOF)) %> <% if lastdate <> DoDateTime((rsArticles.Fields.Item("BlogDate").Value), 1, 1033) then%>

<%= DoDateTime((rsArticles.Fields.Item("BlogDate").Value), 1, 1033) %>

<%end if%>

"><%=(rsArticles.Fields.Item("BlogHeadline").Value)%>" id='<%=(rsArticles.Fields.Item("BlogID").Value)%>0'>

<% if (rsArticles.Fields.Item("BlogReadMore").Value) = 1 Then %>

<%=CropSentence(CI_StripHTML(rsArticles.Fields.Item("BlogHTML").Value), 500, "...")%>

<% Else %> <%=(rsArticles.Fields.Item("BlogHTML").Value)%> <% End If %>

<% Repeat3__index=Repeat3__index+1 Repeat3__numRows=Repeat3__numRows-1 lastdate = DoDateTime((rsArticles.Fields.Item("BlogDate").Value), 1, 1033) rsArticles.MoveNext() Wend %>