%@ Language = VBScript %> <% Option Explicit %> <% 'James Barton 'secure_doc.asp ' %> <% Dim pdf_document, doc doc = Request.QueryString("doc") 'Add this code block to any asp pages that need protection '(from here to end of this asp block) if Session("logon_correct") <> True then 'Construct the URL for the current page. dim strURL strURL = "http://" strURL = strURL & Request.ServerVariables("HTTP_HOST") strURL = strURL & Request.ServerVariables("URL") if Request.QueryString.Count > 0 THEN strURL = strURL & "?" & Request.QueryString end if 'Redirect unauthorized users to the logon page. 'Response.Redirect "logon.asp?from=" &Server.URLEncode(strURL) 'Response.Redirect "logon.asp" End if %>