%
If Request.Cookies("Webmaster") <> "Validated" Then
Response.Redirect("/ctrfiles/stats/login.asp")
End if
Response.Buffer = True
Function ShowImageForType(strName)
Dim strTemp
strTemp = strName
If strTemp <> "dir" Then
strTemp = LCase(Right(strTemp, Len(strTemp) - InStrRev(strTemp, ".", -1, 1)))
End If
Select Case strTemp
Case "asp"
strTemp = "asp"
Case "dir"
strTemp = "dir"
Case "htm", "html"
strTemp = "htm"
Case "gif", "jpg"
strTemp = "img"
Case "txt"
strTemp = "txt"
Case "cnt"
strTemp = "txt"
Case Else
strTemp = "misc"
End Select
strTemp = ""
ShowImageForType = strTemp
End Function
%>
<%' Now to the Runtime code:
Dim strPath
Dim objFSO
Dim objFolder
Dim objItem
if Request.Querystring("PATH") = "" then
strPath = "/images/"
else
strPath = Request.Querystring("PATH")
end if
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(Server.MapPath(strPath))
%>