0 then Call GetArticle Else Call GetRandom end if Sub GetArticle '***************************************************************** ' Get recordset and set paging information '***************************************************************** set ArticleRs = Server.CreateObject("ADODB.Recordset") ArticleSql = "SELECT HEADER1, HEADER2, URL, AUTHOR, IMAGE, THUMBNAIL1, THUMBNAIL2, THUMBNAIL3, FILENAME FROM CONTENT WHERE PK_CONTENT = " & REQUEST.QUERYSTRING("ID") ArticleRs.Open ArticleSql, Conn, 1, 1 if ArticleRs.RecordCount <> 0 then HEADER1 = ArticleRs("HEADER1") HEADER2 = ArticleRs("HEADER2") WEBSITE = ArticleRs("URL") AUTHOR = ArticleRs("AUTHOR") IMAGE = "uploads/" & ArticleRs("IMAGE") FILENAME = ArticleRs("FILENAME") THUMBNAIL1 = ArticleRs("THUMBNAIL1") THUMBNAIL2 = ArticleRs("THUMBNAIL2") THUMBNAIL3 = ArticleRs("THUMBNAIL3") Set ArticleRs = nothing end if '******************************************************************* 'Get Content from text file '******************************************************************* set fso= server.CreateObject ("scripting.filesystemobject") set file_load = fso.GetFile(Server.Mappath("content/" & FILENAME)) set filetext = file_load.OpenAsTextStream(1) Do While Not filetext.atendofstream strText = strText & filetext.ReadLine Loop filetext.Close '******************************************************************* End Sub %>

Starry Constellation Magazine