Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.0 KiB

  1. <%@ LANGUAGE = VBScript %>
  2. <% Option Explicit %>
  3. <!-- #include file="directives.inc" -->
  4. <!--#include file="iichkpath.str"-->
  5. <%
  6. Const DIR = "0"
  7. Const FILE = "1"
  8. Dim path, ptype, failed, FileSystem, errmsg, onfail, donext
  9. path=Request.QueryString("path")
  10. 'Defaults to directory, if not passed in...
  11. ptype=Request.QueryString("ptype")
  12. onfail=Request.QueryString("onfail")
  13. donext=Request.QueryString("donext")
  14. failed = false
  15. Set FileSystem=CreateObject("Scripting.FileSystemObject")
  16. if ptype = FILE then
  17. failed = not FileSystem.FileExists(path)
  18. errmsg = L_THEFILE_TEXT & replace(path,"\","\\") & L_NOTEXIST_TEXT
  19. else
  20. failed = not FileSystem.FolderExists(path)
  21. errmsg = L_THEPATH_TEXT & replace(path,"\","\\") & L_NOTEXIST_TEXT
  22. end if
  23. %>
  24. <HTML>
  25. <BODY>
  26. <SCRIPT LANGUAGE="JavaScript">
  27. <% if failed then %>
  28. alert("<%= errmsg %>");
  29. <% if onfail <> "" then %>
  30. <%= onfail %>
  31. <% end if %>
  32. <% else %>
  33. <% if donext <> "" then %>
  34. <%= donext %>
  35. <% end if %>
  36. <% end if %>
  37. </SCRIPT>
  38. </BODY>
  39. </HTML>