<% response.buffer=true %> <% mySQL="SELECT * FROM ArticlesTB WHERE (ArticleID='" & Request.QueryString("articleid") &"')" Set query=Server.CreateObject("ADODB.Recordset") query.Open mySQL, Connect, adOpenStatic, adLockOptimistic %> <% ' PAGE VARIABLES title=query("Title") & " : Lake Magazine" prefix="/" bg="" ad="none" %> <%= title %> <% varSpaces=0 varTitle=query("Title") y=1 intSpace=1 For intCounter=1 to len(varTitle) +1 If mid(varTitle,intCounter,1)=" " Or intCounter=len(varTitle)+1 Then varSpaces=varSpaces+1 end if Next varSpaces=INT(varSpaces/2) For intCounter=1 to len(varTitle) +1 If mid(varTitle,intCounter,1)=" " Then varSpaceCount=varSpaceCount+1 if varSpaceCount=varSpaces then varUnboldTitle=left(varTitle,intCounter) varBoldTitle=mid(varTitle,intCounter,(len(varTitle)+1)-intCounter) end if end if Next %>
<%= UCASE(varTitle) %>

<% if query("Summary")<>"" then %>
<%= query("Summary") %>

<% end if %> By <%= query("Author") %> <% if query("Issue")<>"No-Issue" then %>

From the <%= query("Issue") %> Issue<% end if %>

<% mySQL="SELECT * FROM ArticlesTB WHERE (Issue='" & query("Issue") & "') AND (Category='" & query("Category") & "') AND (Status='Publish' OR Status='Featured' OR Status='Online Only') AND (ArticleID<>'" & query("ArticleID") & "')" if query("SpecialSection")<>"" then mySQL=mySQL & " AND (SpecialSection='" & query("SpecialSection") & "')" end if Set relatedarticle=Server.CreateObject("ADODB.Recordset") relatedarticle.Open mySQL, Connect, adOpenStatic, adLockOptimistic %> <% if query("Category")="Lyrics, Poetry, Prose" then %>Related Works<% else %>Related Articles<% end if %> <% do until relatedarticle.EOF or y=5 %>

><%= relatedarticle("Title") %> <%= relatedarticle("Summary") %>
<% relatedarticle.MoveNext if x=0 then x=1 else x=0 end if y=y+1 %> <% loop %>




Lake Magazine covers the hottest information on the Lake Michigan area.
<% mySQL="SELECT TOP 1 * FROM ads WHERE adZone = 2 AND adEndDate > GETDATE() ORDER BY NEWID()" Set adquery=Server.CreateObject("ADODB.Recordset") adquery.Open mySQL, Connect, adOpenStatic, adLockOptimistic if NOT adquery.EOF then %> " target="_blank">" border="0"> <% updateSQL="UPDATE ads SET adViews=adViews+1 WHERE adID = "&adquery("adID") Connect.Execute(updateSQL) end if%>
<% varArticle=query("Article") For intCounter=1 to len(varArticle) +1 If (intCounter>len(varArticle) OR varend=1) Then else If ((mid(varArticle,intCounter,1)=chr(13)) AND intCounter>400) Then varStartArticle=Left(varArticle,intCounter+2) varEndArticle=Mid(varArticle,intCounter+3,1000000000) varend=1 end if end if Next varStartArticle= replace(varStartArticle, chr(13), "

") varEndArticle= replace(varEndArticle, chr(13), "

") %> <%= varStartArticle %> <% mySQL="SELECT * FROM PhotoTB WHERE (ArticleID='" & query("ArticleID") &"')" Set subquery=Server.CreateObject("ADODB.Recordset") subquery.Open mySQL, Connect, adOpenStatic, adLockOptimistic if NOT subquery.EOF then %>

border=1>
<% if subquery("Caption")<>"" then %>
<%= subquery("Caption") %>
<% end if %>
<% end if %> <%= varEndArticle %>