home *** CD-ROM | disk | FTP | other *** search
- <%@ LANGUAGE=VBScript %>
- <% Option Explicit %>
-
- <%
- Const L_RENAME_ERR="The node could not be renamed."
- %>
-
- <HTML>
-
- <%
- 'On Error Resume Next
-
- Dim nodename, path, currentobj, newobj, sel,baseobj, basepath
-
- nodename=Request.QueryString("nodename")
- path=Request.QueryString("path")
- sel=Request.QueryString("sel")
- Set currentobj=GetObject(path)
-
- if Instr(currentobj.KeyType,"Server") then
- currentobj.ServerComment = nodename
- currentobj.SetInfo
- elseif Instr(currentobj.KeyType,"VirtualDir") then
-
- Response.write currentobj.ADsPath & "<BR>"
-
- 'and cyle through the baseobj till we find the next whack,
- 'building up the path in new name as we go
- basepath = Mid(currentobj.ADsPath,1,InStrRev(currentobj.ADsPath,"/")-1)
- Response.write baseobj & "<BR>"
- Set baseobj=GetObject(basepath)
-
- Response.write nodename & "<BR>"
- Set newobj = baseobj.MoveHere(currentobj.Name,nodename)
- newobj.SetInfo
- end if
-
- %>
-
- <BODY BGCOLOR="#000000" TEXT="#FFCC00" TOPMARGIN=0 LEFTMARGIN=0>
- <SCRIPT LANGUAGE="JavaScript">
- <% if err.Number = 0 then %>
- // Now that we've set it in the object, we need to update our client cachedList:
- top.head.nodeList[<%= sel %>].title = "<%= nodename %>";
- top.head.nodeList[<%= sel %>].path = "<%= newobj.ADsPath %>"
- top.body.list.location.href=top.body.list.location.href;
- <% else %>
- alert("<%= L_RENAME_ERR %> (<%= err.description %>)");
- <% end if %>
- </SCRIPT>
- </BODY>
- </HTML>