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.

54 lines
1.5 KiB

  1. <%@ LANGUAGE = VBScript %>
  2. <% Option Explicit %>
  3. <!-- #include file="directives.inc" -->
  4. <!--#include file="iirename.str"-->
  5. <HTML>
  6. <%
  7. On Error Resume Next
  8. Dim nodename, path, currentobj, newobj, sel,baseobj, basepath
  9. nodename=Request.QueryString("nodename")
  10. path=Request.QueryString("path")
  11. sel=Request.QueryString("sel")
  12. Set currentobj=GetObject(path)
  13. Response.write nodename & "<BR>"
  14. Response.write path & "<BR>"
  15. if Instr(currentobj.KeyType,"Server") then
  16. currentobj.ServerComment = nodename
  17. currentobj.SetInfo
  18. Set newobj = GetObject(path)
  19. elseif Instr(currentobj.KeyType,"VirtualDir") then
  20. Response.write currentobj.ADsPath & "<BR>"
  21. 'and cyle through the baseobj till we find the next whack,
  22. 'building up the path in new name as we go
  23. basepath = Mid(currentobj.ADsPath,1,InStrRev(currentobj.ADsPath,"/")-1)
  24. Response.write baseobj & "<BR>"
  25. Set baseobj=GetObject(basepath)
  26. Response.write nodename & "<BR>"
  27. Set newobj = baseobj.MoveHere(currentobj.Name,nodename)
  28. newobj.SetInfo
  29. Response.write err
  30. end if
  31. %>
  32. <BODY BGCOLOR="#000000" TEXT="#FFCC00" TOPMARGIN=0 LEFTMARGIN=0>
  33. <SCRIPT LANGUAGE="JavaScript">
  34. <% if err.Number = 0 then %>
  35. // Now that we've set it in the object, we need to update our client cachedList:
  36. top.title.nodeList[<%= sel %>].title = "<%= nodename %>";
  37. top.title.nodeList[<%= sel %>].path = "<%= newobj.ADsPath %>"
  38. top.body.list.location.href="iisrvls.asp";
  39. <% else %>
  40. alert("<%= L_RENAME_ERR %> (<%= err.description %>)");
  41. <% end if %>
  42. </SCRIPT>
  43. </BODY>
  44. </HTML>