<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% ' Title: printer_friendly.asp ' Description: Any 404 errors are directed here via IIS settings ' Original: Jacques Delsemmes ' Review: Andre Daniels 2008-05-07 %> [an error occurred while processing this directive] Currents: Print Friendly Version

Currents Online

<% 'Creates a file system object set fileobj = Server.CreateObject("Scripting.FileSystemObject") 'Opens the file, whose name is passed to it, for reading Dim filename filename=request.QueryString("url") if CheckFileName(CStr(filename)) then set openfile = fileobj.OpenTextFile(server.MapPath(fileName)) else DisplayInputError End if temp=trim(openfile.ReadAll) 'Displays the content in Print format in popup window if(Len(temp)>0) then pos_st=instr(temp,"BEGIN STORY") 'Starting index position pos_ed=instr(temp,"END STORY") Response.write(" "&mid(temp,pos_st - 5,(pos_ed - (pos_st - 5)) + 15 )) 'In the above print statement (pos_ed - (pos_st - 5)) + 15 ) is length of the story end if 'Closes opened file openfile.close() %>