<% Option explicit %> New Document <% Dim writerchoice, collectionchoice, lineno writerchoice = Request.querystring("writerchoice") collectionchoice = Request.querystring("collectionchoice") lineno = CInt(Request.querystring("lineno")) Const ForReading = 1', ForWriting = 2, ForAppending = 3 Const TristateUseDefault = -2', TristateTrue = -1, TristateFalse=0 dim strPathInfo, strPhysicalPath, strLevelPath, strDownloadPath, strinternetDownloadPath strLevelPath = Server.MapPath("Writers/" & writerchoice & "/levels/" & collectionchoice & ".kye") strInternetDownloadPath = "Writers/" & writerchoice & "/download/" & collectionchoice & ".zip" strDownloadPath = Server.MapPath(strInternetDownloadPath) Dim objFSO, objFile Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.GetFile(strLevelPath) Dim objFileTextStream Set objFileTextStream = objFile.OpenAsTextStream(ForReading,TristateUseDefault) dim number, levelname, hint, message, s, t, str number=Server.HTMLEncode(objFileTextStream.ReadLine) Response.Write "" & vbcrlf Response.Write "" Response.Write "" & vbcrlf dim objDownloadfile, downloadFile Set objDownloadfile = CreateObject("Scripting.FileSystemObject") if objDownloadfile.FileExists(strDownloadPath) then Set downloadFile = objDownloadfile.GetFile(strDownloadPath) Response.write " " & vbcrlf else Response.write " " & vbcrlf end if Response.write "" & vbcrlf Response.write "" & vbcrlf Response.write " " & vbcrlf Response.write "" & vbcrlf Response.write "
Author of levels: " & ReplaceUnderscore(writerchoice) & "
Collectionname: " & collectionchoice & "Download " & collectionchoice & " (" & downloadFile.Size & " bytes)not available for download
Level in collection: " & (lineno+21)/23 & " of " & number & " 
" & vbcrlf Response.write "
" & vbcrlf Dim strLine, no no = 2 Do While objFileTextStream.AtEndOfStream <> True if (no = lineno) then levelname=Server.HTMLEncode(objFileTextStream.ReadLine) no= no +1 hint=Server.HTMLEncode(objFileTextStream.ReadLine) no= no +1 message=Server.HTMLEncode(objFileTextStream.ReadLine) no= no +1 Response.Write "Levelname: " & LCASE(levelname) & "
" & vbcrlf Response.Write "Hint: " & hint & "
" & vbcrlf Response.Write "
" & vbcrlf For s=1 To 20 strLine = objFileTextStream.ReadLine no= no +1 Str="" For t=1 To Len(strLine) Str = Str & "" Next Response.Write Str & "
" + vbCrLf Next Response.Write "
" Response.Write "Message: " & message & "
" & vbcrlf else For s=1 to 23 objFileTextStream.ReadLine no = no + 1 next end if Loop objFileTextStream.Close %>