home *** CD-ROM | disk | FTP | other *** search
Wrap
<%@ LANGUAGE=VBScript %> <%Option Explicit %> <% Const L_NOTIMPLEMENTED_ERRORMESSAGE="This feature is not yet implemented." Const L_WORKINGSERVER_TEXT="You cannot change the status of the web server you are currently connected to." Const L_NORENAME_TEXT="Please use the windows explorer or the MMC snapin to rename physical directories." Const L_ONLYSERVER_TEXT="Only Web Sites and FTP Sites may be started and stopped." Const L_DELETEDIR_TEXT="WARNING!\rDeleting a directory permanently removes that directory, \rand all of it's subdirectories and files. \r\rAre you sure you want to continue?" Const L_DELETEVDIR_TEXT="Deleting a virtual directory removes all associated configuration information. \rThe physical directory structure is not affected. \r\rAre you sure you want to continue?" Const L_DELETESITE_TEXT="Deleting a site removes all associated configuration information \rincluding all virtual directories associated with the site. \rThe physical directory structure is not affected. \r\rAre you sure you want to continue?" Const L_CONNECT_TEXT="Connect..." Const L_NEW_TEXT="New" Const L_RENAME_TEXT="Rename" Const L_DELETE_TEXT="Delete" Const L_PROPS_TEXT="Properties" Const L_BROWSE_TEXT="Browse" Const L_BACKUP_TEXT = "Backup Configuration" Const L_START_TEXT="Start" Const L_STOP_TEXT="Stop" Const L_PAUSE_TEXT="Pause" Const L_RESUME_TEXT="Resume" Const L_STARTING_TEXT="Starting service..." Const L_STOPPING_TEXT="Stopping service..." Const L_PAUSING_TEXT="Pausing service..." Const L_CONTING_TEXT="Resuming service..." Const L_REFRESH_TEXT="Refresh" Const L_RELEASE_TEXT="Release" Const L_ENTERNAME_TEXT="Enter a name for the new" Const L_ENTERNEWNAME_TEXT="Enter a new name." Const L_NEWWEB_TEXT="New FTP" Const L_NEWFTP_TEXT="New Web" Const L_WEBSITE_TEXT="Site" Const L_VDIR_TEXT="Virtual Directory" Const L_DIR_TEXT="Directory" Const L_WEB_TEXT="Web" Const L_FTP_TEXT="FTP" Const L_MASTER_TEXT="Master Properties" Const L_NEWPATH_TEXT="" Const L_ENTERPATH_TEXT="Please enter a path for the virtual directory before adding subdirectories." Const L_DELETENOTALLOWED_TEXT = "Deleting the server node is not allowed." Const L_RENAMENOTALLOWED_TEXT = "Renaming the server node is not allowed." Const L_SERVICEALREADY_TEXT = "This site has already been " Dim isAdmin isAdmin=Session("isAdmin") %> <html> <head> <script language="javascript"> // set the default helpfile name... top.head.Global.helpFileName="iipxmain"; // instance state constants START=2 STOP=4 PAUSE=6 CONT=0 function connect(){ var theList=top.head.nodeList; //connect is a global function in iihd.asp theList[0].connect(); } function master(){ // loads the master www & ftp property pages (ie for the service). var path; var thetype=document.mnuform.MSvcType.options[document.mnuform.MSvcType.selectedIndex].value; var sel=0; top.body.iisstatus.location.href=("iistat.asp?thisState=Loading"); path="stype=" + thetype; path=path + "&vtype=" + "svc" if (thetype == "www"){ top.head.Global.selName="Master WWW Properties" path=path + "&title=" + escape("Master WWW Properties"); path=path + "&dpath=" + escape("IIS://localhost/W3SVC"); path=path + "&spath=" + escape("IIS://localhost/W3SVC"); } if (thetype == "ftp"){ top.head.Global.selName="Master FTP Properties" path=path + "&title=" + escape("Master FTP Properties"); path=path + "&dpath=" + escape("IIS://localhost/MSFTPSVC"); path=path + "&spath=" + escape("IIS://localhost/MSFTPSVC"); } top.head.Global.selSType=thetype top.head.Global.selVType="svc" //set up our session variables... page="iiset.asp?"+path; top.connect.location.href=(page); } function add(){ //add calls worker script iiaction.asp //which intern calls the global insertitem function //that inserts the new item in the cachedList theList=top.head.nodeList; gVars=top.head.Global; sel=gVars.selId; <% if isAdmin then %> thetype=document.mnuform.SvcType.options[document.mnuform.SvcType.selectedIndex].value; if (theList[sel].vtype=="comp"){ nodetype=thetype + " <%= L_WEBSITE_TEXT %>"; vtype="server"; } else{ if (theList[sel].stype=="www"){ thetype="<%= L_WEB_TEXT %>"; document.mnuform.SvcType.selectedIndex=0; } if (theList[sel].stype=="ftp"){ thetype="<%= L_FTP_TEXT %>"; document.mnuform.SvcType.selectedIndex=1; } } if (theList[sel].vtype=="server"){ nodetype=thetype + " <%= L_VDIR_TEXT %>"; vtype="vdir"; } if (theList[sel].vtype=="vdir"){ nodetype="<%= L_DIR_TEXT %>"; vtype="dir"; } if (theList[sel].vtype=="dir"){ nodetype="<%= L_DIR_TEXT %>"; vtype="dir"; } if (thetype=="Web"){ stype="www" } else{ stype="ftp" } <% else %> nodetype="<%= L_DIR_TEXT %>"; vtype="dir"; stype = theList[sel].stype <% end if %> nodename=prompt("<%= L_ENTERNAME_TEXT %> "+nodetype+".","<%= L_NEW_TEXT %> " +nodetype); <% if Session("Browser") = "IE3" then %> if (nodename != ""){ <% else %> if (nodename != null){ <% end if %> parentpath=escape(theList[sel].path +"/"+nodename); path="a=add&path="+parentpath+"&stype="+stype+"&vtype="+vtype+"&sel=" + sel; top.connect.location.href="iiaction.asp?"+path; } } function edit(){ var theList=top.head.nodeList; //global function located in iihd.asp theList[0].openLocation(); } function renameItem(){ var theList=top.head.nodeList; gVars=top.head.Global; sel=gVars.selId; if (theList[sel].vtype=="comp"){ alert("<%= L_RENAMENOTALLOWED_TEXT %>"); } else{ if (theList[sel].vtype=="dir"){ alert("<%= L_NORENAME_TEXT %>"); } else{ nodename=prompt("<%= L_ENTERNEWNAME_TEXT %>",theList[sel].title); <% if Session("Browser") = "IE3" then %> if (nodename != ""){ <% else %> if (nodename != null){ <% end if %> thispath=escape(theList[sel].path); path = "sel=" + sel + "&path=" + thispath + "&nodename=" + nodename; top.connect.location.href="iirename.asp?"+path; } } } } function deleteItem(){ //delete item calls worker script iiaction.asp //which intern calls the global delete function //that marks the item in the cached list as deleted. theList=top.head.nodeList; gVars=top.head.Global; sel=gVars.selId; <% if Session("isAdmin") then %> if (theList[sel].vtype=="comp"){ alert("<%= L_DELETENOTALLOWED_TEXT %>"); } else{ if (theList[sel].vtype=="server"){ alerttext="<%= L_DELETESITE_TEXT %>"; } <% else %> if (theList[sel].vtype=="server"){ alert("<%= L_DELETENOTALLOWED_TEXT %>"); } else{ <% end if %> if (theList[sel].vtype=="vdir"){ alerttext="<%= L_DELETEVDIR_TEXT %>"; } if (theList[sel].vtype=="dir"){ alerttext="<%= L_DELETEDIR_TEXT %>"; } if (confirm(alerttext)){ thispath=escape(theList[sel].path); path="a=del&path="+thispath+"&stype="+theList[sel].stype+"&vtype="+theList[sel].vtype+"&sel=" + sel; top.connect.location.href="iiaction.asp?"+path; } } } function SetState(x) { //setState calls worker script iiaction.asp //which calls the sets the state on the item in the cached list var theList=top.head.nodeList; var gVars=top.head.Global; var sel=gVars.selId; if (theList[sel].vtype=="server"){ if (theList[sel].state != x){ if (theList[sel].isWorkingServer){ alert("<%= L_WORKINGSERVER_TEXT %>"); } else{ doaction = true; if (x==START){ if (theList[sel].state == PAUSE){ x = CONT } else{ parent.iisstatus.location.href="iistat.asp?thisState=" + escape("<%= L_STARTING_TEXT %>") + "&moving=yes"; } } if (x==STOP){ parent.iisstatus.location.href="iistat.asp?thisState=" + escape("<%= L_STOPPING_TEXT %>")+ "&moving=yes"; } if (x==PAUSE){ if (theList[sel].state == STOP){ alert("<%= L_SERVICEALREADY_TEXT %>"+gVars.state[STOP]+"."); doaction = false; } else{ parent.iisstatus.location.href="iistat.asp?thisState=" + escape("<%= L_PAUSING_TEXT %>")+ "&moving=yes"; } } if (x==CONT){ if (theList[sel].state == START){ alert("<%= L_SERVICEALREADY_TEXT %>"+gVars.state[START]+"."); doaction = false; } else{ if (theList[sel].state == STOP){ x=START } parent.iisstatus.location.href="iistat.asp?thisState=" + escape("<%= L_CONTING_TEXT %>")+ "&moving=yes"; } } if (doaction){ thispath=escape(theList[sel].path); path="a="+x+"&path="+thispath+"&stype="+theList[sel].stype+"&vtype="+theList[sel].vtype + "&sel=" + sel; top.connect.location.href="iiaction.asp?"+path } } } else{ alert("<%= L_SERVICEALREADY_TEXT %>"+gVars.state[x]+"."); } parent.list.location.href=parent.list.location.href; } else{ alert("<%= L_ONLYSERVER_TEXT %>"); } } function backup(){ popBox("Backup",405,300,"iibkup"); } function popBox(title, width, height, filename){ thefile=(filename + ".asp"); thefile="iipop.asp?pg="+thefile+"&tools=no"; <% if Session("Browser") <> "IE3" then %> width=width +25; height=height + 50; <% end if %> popbox=window.open(thefile,title,"toolbar=no,scrollbars=yes,directories=no,menubar=no,width="+width+",height="+height); if(popbox !=null){ if (popbox.opener==null){ popbox.opener=self; } } } </script> </head> <body background="images/iisnav.gif" bgcolor="#000000" link="#FFFFFF" vlink="#FFFFFF" alink="#FFCC00" topmargin="0" leftmargin="0" style="font-face: Verdana; font-size: 10pt;"> <% if Session("IsIE") then %> <br> <% end if %> <img src="images/ism.gif" border="0" alt width="160" height="76"><form name="mnuform"> <table border="0" cellpadding="4" cellspacing="0"> <tr> <td width="50" valign="top" align="right"> <a href="javascript:add();"><img height="16" width="16" hspace="2" align="middle" src="images/new.gif" border="0" alt="<%= L_NEW_TEXT %>"></a> </td> <td valign="top"> <% if isAdmin then %> <font face="ARIAL" size="2"><b><a href="javascript:add();"><%= L_NEW_TEXT %></a></b></font> <select name="SvcType" size="1"> <option selected value="Web"><%= L_WEB_TEXT %>...<option value="FTP"><%= L_FTP_TEXT %>...</select> <% else %> <font face="ARIAL" size="2"><b><a href="javascript:add();"><%= L_NEW_TEXT %></a></b></font> <% end if %> </td> </tr> <tr> <td valign="top" align="right"> <a href="javascript:deleteItem();"><img height="16" width="16" hspace="2" align="top" src="images/remv.gif" border="0" alt="<%= L_DELETE_TEXT %>"></a> </td> <td valign="top"> <font face="ARIAL" size="2"><b><a href="javascript:deleteItem();"><%= L_DELETE_TEXT %></a></b></font> </td> </tr> <tr> <td valign="top" align="right"> <a href="javascript:renameItem();"><img height="16" width="16" hspace="2" align="top" src="images/rename.gif" border="0" alt="<%= L_RENAME_TEXT %>"></a> </td> <td valign="top"> <font face="ARIAL" size="2"><b><a href="javascript:renameItem();"><%= L_RENAME_TEXT %></a></b></font> </td> </tr> <tr> <td valign="top" align="right"> <a href="javascript:edit();"><img height="16" width="16" hspace="2" align="top" src="images/edit.gif" border="0" alt="<%= L_PROPS_TEXT %>"></a> </td> <td valign="top"> <font face="ARIAL" size="2"><b><a href="javascript:edit();"><%= L_PROPS_TEXT %></a></b></font> </td> </tr> <tr> <td colspan="2" valign="middle"> <font face="ARIAL" size="2"><b> </b></font> </td> </tr> <% if isAdmin then %> <tr> <td valign="top" align="right"> <a href="javascript:SetState(START);"><img height="16" width="16" hspace="2" align="top" src="images/Next.gif" border="0" alt="<%= L_START_TEXT %>"></a> </td> <td valign="top"> <font face="ARIAL" size="2"><b><a href="javascript:SetState(START);"><%= L_START_TEXT %></a></b></font> </td> </tr> <tr> <td valign="top" align="right"> <a href="javascript:SetState(STOP);"><img height="16" width="16" hspace="2" align="top" src="images/stop.gif" border="0" alt="<%= L_STOP_TEXT %>"></a> </td> <td valign="top"> <font face="ARIAL" size="2"><b><a href="javascript:SetState(STOP);"><%= L_STOP_TEXT %></a></b></font> </td> </tr> <tr> <td valign="top" align="right"> <a href="javascript:SetState(PAUSE);"><img height="16" width="16" hspace="2" align="top" src="images/pause.gif" border="0" alt="<%= L_PAUSE_TEXT %>"></a> </td> <td valign="top"> <font face="ARIAL" size="2"><b><a href="javascript:SetState(PAUSE);"><%= L_PAUSE_TEXT %></a></b></font> </td> </tr> <tr> <td valign="top" align="right"> <a href="javascript:SetState(CONT);"><img height="16" width="16" hspace="2" align="top" src="images/cont.gif" border="0" alt="<%= L_RESUME_TEXT %>"></a> </td> <td valign="top"> <font face="ARIAL" size="2"><b><a href="javascript:SetState(CONT);"><%= L_RESUME_TEXT %></a></b></font> </td> </tr> <tr> <td colspan="2" valign="middle"> <font face="ARIAL" size="2"><b> </b></font> </td> </tr> <tr> <td valign="top" align="right"> <a href="javascript:master();"><img height="16" width="16" hspace="2" align="top" src="images/master.gif" border="0" alt="<%= L_BACKUP_TEXT %>"></a> </td> <td valign="top"> <font face="ARIAL" size="2"><b><a href="javascript:master();"><%= L_MASTER_TEXT %></a></b></font> <select name="MSvcType" size="1"> <option selected value="www"><%= L_WEB_TEXT %>...<option value="ftp"><%= L_FTP_TEXT %>...</select> </td> </tr> <tr> <td valign="top" align="right"> <a href="javascript:backup();"><img height="16" width="16" hspace="2" align="top" src="images/save.gif" border="0" alt="<%= L_BACKUP_TEXT %>"></a> </td> <td valign="top"> <font face="ARIAL" size="2"><b><a href="javascript:backup();"><%= L_BACKUP_TEXT %></a></b></font> </td> </tr> <% end if %> </table> </form> </body> </html>