<%
if session("login")=true then
z= split(Request.Servervariables("HTTP_X_ORIGINAL_URL"),"/")
Response.buffer = TRUE
Response.ContentType = "application/pdf"
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open
objStream.Type = 1
file=server.mappath(".")+"/pdf/"+z(ubound(z))
objStream.LoadFromFile file
Response.BinaryWrite objStream.Read
else
%>
<h1 align="center">Access denied!</h1>
<%
end if
%>