<% Sub zFile_HTML(SaveHtmlTo,ByVal IncludeComments) 'include comments is a number If SaveHtmlTo = "" Then 'no filename given to save to Exit Sub End If If IncludeComments = 0 Then IncludeComments = 1000 End If Dim zobjFSO,zobjTS Set zobjFSO = CreateObject("Scripting.FileSystemObject") Set zobjTS = zobjFSO.CreateTextFile(Server.MapPath("/kaos/generated/" & SaveHtmlTo & ".htm")) 'Set zobjTS = zobjFSO.CreateTextFile(Server.MapPath(SaveHtmlTo & ".htm")) Dim i,zLimit zLimit = UBound(zobjRS,2) For i = 0 To zLimit '-- write news post -- zobjTS.Write "
" & zWrite_News(i,IncludeComments) & "
" '-- write comments for post -- If IncludeComments <> -1 And zobjRS(4,i) > 0 Then 'if comments exist, and to be written zobjRS1.Filter = "PostID LIKE '" & zobjRS(0,i) & "' " 'get comments collection zobjTS.Write "" End If Next '-- close down -- zobjTS.Close Set zobjTS = Nothing Set zobjFSO = Nothing End Sub %>