windows-nt/Source/XPSP1/NT/inetsrv/iis/img/htmla/iichkpath.asp

51 lines
1 KiB
Plaintext
Raw Permalink Normal View History

2020-09-26 03:20:57 -05:00
<%@ LANGUAGE = VBScript %>
<% Option Explicit %>
<!-- #include file="directives.inc" -->
<!--#include file="iichkpath.str"-->
<%
Const DIR = "0"
Const FILE = "1"
Dim path, ptype, failed, FileSystem, errmsg, onfail, donext
path=Request.QueryString("path")
'Defaults to directory, if not passed in...
ptype=Request.QueryString("ptype")
onfail=Request.QueryString("onfail")
donext=Request.QueryString("donext")
failed = false
Set FileSystem=CreateObject("Scripting.FileSystemObject")
if ptype = FILE then
failed = not FileSystem.FileExists(path)
errmsg = L_THEFILE_TEXT & replace(path,"\","\\") & L_NOTEXIST_TEXT
else
failed = not FileSystem.FolderExists(path)
errmsg = L_THEPATH_TEXT & replace(path,"\","\\") & L_NOTEXIST_TEXT
end if
%>
<HTML>
<BODY>
<SCRIPT LANGUAGE="JavaScript">
<% if failed then %>
alert("<%= errmsg %>");
<% if onfail <> "" then %>
<%= onfail %>
<% end if %>
<% else %>
<% if donext <> "" then %>
<%= donext %>
<% end if %>
<% end if %>
</SCRIPT>
</BODY>
</HTML>