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.

77 lines
1.6 KiB

  1. <%@ LANGUAGE = VBScript %>
  2. <% Option Explicit %>
  3. <!-- #include file="directives.inc" -->
  4. <!--#include file="iichknname.str"-->
  5. <%
  6. On Error Resume Next
  7. Const SERVERTYPE = "Server"
  8. Const SITE = 0
  9. Const VDIR = 1
  10. Const DIR = 2
  11. Dim nname, nntype,ppath, failed, cntrl,ParentObj, node, onfail, donext
  12. nname=lcase(Request.QueryString("nname"))
  13. nntype = cInt(Request.QueryString("nntype"))
  14. ppath=Request.QueryString("ppath")
  15. cntrl=Request.QueryString("cntrl")
  16. onfail=Request.QueryString("onfail")
  17. donext=Request.QueryString("donext")
  18. Response.write nntype & "<BR>"
  19. failed = false
  20. Set ParentObj=GetObject(ppath)
  21. Dim FileSystem, f, folder
  22. if nntype = DIR then
  23. Response.write ParentObj.Path
  24. Set FileSystem=CreateObject("Scripting.FileSystemObject")
  25. if FileSystem.FolderExists(ParentObj.Path) then
  26. Set f=FileSystem.GetFolder(ParentObj.Path)
  27. For Each folder In f.SubFolders
  28. if nname = lcase(folder.name) then
  29. failed = true
  30. exit for
  31. end if
  32. Next
  33. end if
  34. else
  35. for each node in ParentObj
  36. if InStr(node.KeyType,SERVERTYPE) then
  37. Response.write node.ServerComment & "<BR>"
  38. if nname = lcase(node.ServerComment) then
  39. failed = true
  40. exit for
  41. end if
  42. else
  43. Response.write node.name & "<BR>"
  44. if nname = lcase(node.name) then
  45. failed = true
  46. exit for
  47. end if
  48. end if
  49. next
  50. end if
  51. Response.write err
  52. %>
  53. <HTML>
  54. <BODY>
  55. <SCRIPT LANGUAGE="JavaScript">
  56. <% if failed then %>
  57. alert("<%= L_SELECTUNIQUENAME_TEXT %>");
  58. <% if onfail <> "" then %>
  59. <%=onfail%>
  60. <% end if %>
  61. <% else %>
  62. <% if donext <> "" then %>
  63. <%= donext %>
  64. <% end if %>
  65. <% end if %>
  66. </SCRIPT>
  67. </BODY>
  68. </HTML>