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.

533 lines
13 KiB

  1. <%@ LANGUAGE = VBScript %>
  2. <% Option Explicit %>
  3. <!-- #include file="directives.inc" -->
  4. <% if Session("FONTSIZE") = "" then %>
  5. <!--#include file="iito.inc"-->
  6. <% else %>
  7. <!--#include file="iimnu.str"-->
  8. <%
  9. Dim isAdmin,FTPObj, FTPINSTALLED
  10. isAdmin=Session("isAdmin")
  11. On Error Resume Next
  12. Set FTPObj = GetObject("IIS://localhost/MSFTPSVC")
  13. FTPINSTALLED = (err = 0)
  14. err.Clear
  15. Function MenuIcon(gif)
  16. if gif = "" then
  17. gif = "cube.gif"
  18. end if
  19. MenuIcon = "<img align='middle' src='images/" & gif & "' border='0'>&nbsp;"
  20. End Function
  21. %>
  22. <!--#include file="iisetfnt.inc"-->
  23. <html>
  24. <head>
  25. <script language="javascript">
  26. // set the default helpfile name...
  27. top.title.Global.helpFileName="iipxmain";
  28. // instance state constants
  29. START=2
  30. STOP=4
  31. PAUSE=6
  32. CONT=0
  33. <!--#include file="iijsfuncs.inc"-->
  34. function connect(){
  35. var theList=top.title.nodeList;
  36. //connect is a global function in iihd.asp
  37. theList[0].connect();
  38. }
  39. function master(){
  40. // loads the master www & ftp property pages (ie for the service).
  41. var path;
  42. var thetype=document.mnuform.MSvcType.options[document.mnuform.MSvcType.selectedIndex].value;
  43. var sel=0;
  44. top.body.iisstatus.location.href=("iistat.asp?thisState=Loading");
  45. path="stype=" + thetype;
  46. path=path + "&vtype=" + "svc"
  47. if (thetype == "www"){
  48. top.title.Global.selName="Master WWW Properties"
  49. path=path + "&title=" + escape("Master WWW Properties");
  50. path=path + "&dpath=" + escape("IIS://localhost/W3SVC");
  51. path=path + "&spath=" + escape("IIS://localhost/W3SVC");
  52. }
  53. if (thetype == "ftp"){
  54. top.title.Global.selName="Master FTP Properties"
  55. path=path + "&title=" + escape("Master FTP Properties");
  56. path=path + "&dpath=" + escape("IIS://localhost/MSFTPSVC");
  57. path=path + "&spath=" + escape("IIS://localhost/MSFTPSVC");
  58. }
  59. top.title.Global.selSType=thetype
  60. top.title.Global.selVType="svc"
  61. //set up our session variables...
  62. page="iiset.asp?"+path;
  63. top.connect.location.href=(page);
  64. }
  65. function add(){
  66. //add calls worker script iiaction.asp
  67. //which intern calls the global insertitem function
  68. //that inserts the new item in the cachedList
  69. theList=top.title.nodeList;
  70. gVars=top.title.Global;
  71. sel=gVars.selId;
  72. if (sel == -1)
  73. {
  74. alert("<%= L_MAKESELECTION_TEXT %>");
  75. }
  76. else
  77. {
  78. setPath("ParentADSPath",theList[sel].path, sel);
  79. popBox('CreateWizard', <%= Session("BrowserHScalePct")/100 * L_WIZWIDTH %>,<%= Session("BrowserHScalePct")/100 * L_WIZHEIGHT %>, 'iiwiznew', true);
  80. }
  81. }
  82. function cert(){
  83. //add calls worker script iiaction.asp
  84. //which intern calls the global insertitem function
  85. //that inserts the new item in the cachedList
  86. theList=top.title.nodeList;
  87. gVars=top.title.Global;
  88. sel=gVars.selId;
  89. if (sel == -1)
  90. {
  91. alert("<%= L_MAKESELECTION_TEXT %>");
  92. }
  93. else
  94. {
  95. setPath("ADSPath",theList[sel].path, sel);
  96. popBox('test', <%= Session("BrowserHScalePct")/100 * L_WIZWIDTH %>,<%= Session("BrowserHScalePct")/100 * L_WIZHEIGHT %>, 'iiwizcert', true);
  97. }
  98. }
  99. function sec(){
  100. //add calls worker script iiaction.asp
  101. //which intern calls the global insertitem function
  102. //that inserts the new item in the cachedList
  103. theList=top.title.nodeList;
  104. gVars=top.title.Global;
  105. sel=gVars.selId;
  106. if (sel == -1)
  107. {
  108. alert("<%= L_MAKESELECTION_TEXT %>");
  109. }
  110. else
  111. {
  112. if (theList[sel].vtype=="comp"){
  113. alert("<%= L_PERMWIZNOTALLOWED_TEXT %>");
  114. }
  115. else
  116. {
  117. setPath("ADSPath",theList[sel].path, sel);
  118. popBox('SecWizard', <%= Session("BrowserHScalePct")/100 * L_WIZWIDTH %>,<%= Session("BrowserHScalePct")/100 * L_WIZHEIGHT %>, 'iiwizsec', true);
  119. }
  120. }
  121. }
  122. function setPath(pathname,parentpath, selID)
  123. {
  124. var theList = top.title.nodeList;
  125. var loc = "iisess.asp?" + pathname + "=" + escape(parentpath);
  126. loc += "&ParentID=" + escape(selID);
  127. loc += "&stype=" + theList[selID].stype;
  128. loc += "&vtype=" + theList[selID].vtype;
  129. top.connect.location.href = loc;
  130. }
  131. function edit(){
  132. var theList=top.title.nodeList;
  133. //global function located in iihd.asp
  134. theList[0].openLocation();
  135. }
  136. function renameItem(){
  137. var theList=top.title.nodeList;
  138. gVars=top.title.Global;
  139. sel=gVars.selId;
  140. if (theList[sel].vtype=="comp"){
  141. alert("<%= L_RENAMENOTALLOWED_TEXT %>");
  142. }
  143. else{
  144. if (theList[sel].vtype=="dir"){
  145. alert("<%= L_NORENAME_TEXT %>");
  146. }
  147. else{
  148. nodename=prompt("<%= L_ENTERNEWNAME_TEXT %>",theList[sel].title);
  149. if( (nodename != "") && (nodename != null) && (nodename != theList[sel].title) ){
  150. thispath=escape(theList[sel].path);
  151. path = "sel=" + sel + "&path=" + thispath + "&nodename=" + escape(nodename);
  152. top.connect.location.href="iirename.asp?"+path;
  153. }
  154. }
  155. }
  156. }
  157. function deleteItem(){
  158. //delete item calls worker script iiaction.asp
  159. //which intern calls the global delete function
  160. //that marks the item in the cached list as deleted.
  161. theList=top.title.nodeList;
  162. gVars=top.title.Global;
  163. sel=gVars.selId;
  164. <% if Session("isAdmin") then %>
  165. if (theList[sel].vtype=="comp"){
  166. alert("<%= L_DELETENOTALLOWED_TEXT %>");
  167. }
  168. else{
  169. if (theList[sel].vtype=="server"){
  170. alerttext="<%= L_DELETESITE_TEXT %>";
  171. }
  172. <% else %>
  173. if (theList[sel].vtype=="server"){
  174. alert("<%= L_DELETENOTALLOWED_TEXT %>");
  175. }
  176. else{
  177. <% end if %>
  178. if (theList[sel].vtype=="vdir"){
  179. alerttext="<%= L_DELETEVDIR_TEXT %>";
  180. }
  181. if (theList[sel].vtype=="dir"){
  182. alerttext="<%= L_DELETEDIR_TEXT %>";
  183. }
  184. if (confirm(alerttext)){
  185. thispath=escape(theList[sel].path);
  186. path="a=del&path="+thispath+"&stype="+theList[sel].stype+"&vtype="+theList[sel].vtype+"&sel=" + sel;
  187. top.connect.location.href="iiaction.asp?"+path;
  188. }
  189. }
  190. }
  191. function SetState(x) {
  192. //setState calls worker script iiaction.asp
  193. //which calls the sets the state on the item in the cached list
  194. var theList=top.title.nodeList;
  195. var gVars=top.title.Global;
  196. var sel=gVars.selId;
  197. if (theList[sel].restricted != "")
  198. {
  199. alert(theList[sel].restricted);
  200. }
  201. else
  202. {
  203. if (theList[sel].vtype=="server"){
  204. if (theList[sel].state != x){
  205. if (theList[sel].isWorkingServer){
  206. alert("<%= L_WORKINGSERVER_TEXT %>");
  207. }
  208. else{
  209. doaction = true;
  210. if (x==START){
  211. if (theList[sel].state == PAUSE){
  212. x = CONT
  213. }
  214. else{
  215. parent.iisstatus.location.href="iistat.asp?thisState=" + escape("<%= L_STARTING_TEXT %>") + "&moving=yes";
  216. }
  217. }
  218. if (x==STOP){
  219. parent.iisstatus.location.href="iistat.asp?thisState=" + escape("<%= L_STOPPING_TEXT %>")+ "&moving=yes";
  220. }
  221. if (x==PAUSE){
  222. if (theList[sel].state == STOP){
  223. alert("<%= L_SERVICEALREADYSTOPPED_TEXT %>");
  224. doaction = false;
  225. }
  226. else{
  227. parent.iisstatus.location.href="iistat.asp?thisState=" + escape("<%= L_PAUSING_TEXT %>")+ "&moving=yes";
  228. }
  229. }
  230. if (x==CONT){
  231. if (theList[sel].state == START){
  232. alert("<%= L_SERVICEALREADYSTARTED_TEXT %>");
  233. doaction = false;
  234. }
  235. else{
  236. if (theList[sel].state == STOP){
  237. x=START
  238. }
  239. parent.iisstatus.location.href="iistat.asp?thisState=" + escape("<%= L_CONTING_TEXT %>")+ "&moving=yes";
  240. }
  241. }
  242. if (doaction){
  243. thispath=escape(theList[sel].path);
  244. path="a="+x+"&path="+thispath+"&stype="+theList[sel].stype+"&vtype="+theList[sel].vtype + "&sel=" + sel;
  245. top.connect.location.href="iiaction.asp?"+path
  246. }
  247. }
  248. }
  249. else{
  250. if (x==START)
  251. {
  252. alert("<%= L_SERVICEALREADYSTARTED_TEXT %>");
  253. }
  254. if (x==STOP)
  255. {
  256. alert("<%= L_SERVICEALREADYSTOPPED_TEXT %>");
  257. }
  258. if (x==CONT)
  259. {
  260. alert("<%= L_SERVICEALREADYSTARTED_TEXT %>");
  261. }
  262. if (x==PAUSE)
  263. {
  264. alert("<%= L_SERVICEALREADYPAUSED_TEXT %>");
  265. }
  266. }
  267. parent.list.location.href=parent.list.location.href;
  268. }
  269. else{
  270. alert("<%= L_ONLYSERVER_TEXT %>");
  271. }
  272. }
  273. }
  274. function backup(){
  275. popBox("Backup",<%= L_IIBKUP_W %>,<%= L_IIBKUP_H %>,"iibkup",true);
  276. }
  277. </script>
  278. </head>
  279. <%= Session("MENUBODY") %>
  280. <IMG SRC="images/Ism.gif" WIDTH=189 HEIGHT=55 BORDER=0>
  281. <form name="mnuform">
  282. <table border="0" cellpadding="0" cellspacing="0">
  283. <tr>
  284. <td width="50" valign="top" align="right">
  285. <a href="javascript:add();"><%= MenuIcon("new.gif") %></a>
  286. </td>
  287. <td valign="top">
  288. <%= sFont(Session("MENUFONTSIZE"),Session("MENUFONT"),"",True) %><b><a href="javascript:add();"><%= L_NEW_TEXT %></a></b></font>&nbsp;
  289. </td>
  290. </tr>
  291. <tr>
  292. <td valign="top" align="right">
  293. <a href="javascript:deleteItem();"><%= MenuIcon("remv.gif") %></a>
  294. </td>
  295. <td valign="top">
  296. <%= sFont(Session("MENUFONTSIZE"),Session("MENUFONT"),"",True) %><b><a href="javascript:deleteItem();"><%= L_DELETE_TEXT %></a></b></font>
  297. </td>
  298. </tr>
  299. <tr>
  300. <td valign="top" align="right">
  301. <a href="javascript:renameItem();"><%= MenuIcon("rename.gif") %></a>
  302. </td>
  303. <td valign="top">
  304. <%= sFont(Session("MENUFONTSIZE"),Session("MENUFONT"),"",True) %><b><a href="javascript:renameItem();"><%= L_RENAME_TEXT %></a></b></font>
  305. </td>
  306. </tr>
  307. <tr>
  308. <td valign="top" align="right">
  309. <a href="javascript:edit();"><%= MenuIcon("edit.gif") %></a>
  310. </td>
  311. <td valign="top">
  312. <%= sFont(Session("MENUFONTSIZE"),Session("MENUFONT"),"",True) %><b><a href="javascript:edit();"><%= L_PROPS_TEXT %></a></b></font>
  313. </td>
  314. </tr>
  315. <tr>
  316. <td colspan="2" valign="middle">
  317. <%= sFont(Session("MENUFONTSIZE"),Session("MENUFONT"),"",True) %><b>&nbsp;</b></font>
  318. </td>
  319. </tr>
  320. <% if isAdmin then %>
  321. <tr>
  322. <td valign="top" align="right">
  323. <a href="javascript:SetState(START);"><%= MenuIcon("next.gif") %></a>
  324. </td>
  325. <td valign="top">
  326. <%= sFont(Session("MENUFONTSIZE"),Session("MENUFONT"),"",True) %><b><a href="javascript:SetState(START);"><%= L_START_TEXT %></a></b></font>
  327. </td>
  328. </tr>
  329. <tr>
  330. <td valign="top" align="right">
  331. <a href="javascript:SetState(STOP);"><%= MenuIcon("stop.gif") %></a>
  332. </td>
  333. <td valign="top">
  334. <%= sFont(Session("MENUFONTSIZE"),Session("MENUFONT"),"",True) %><b><a href="javascript:SetState(STOP);"><%= L_STOP_TEXT %></a></b></font>
  335. </td>
  336. </tr>
  337. <tr>
  338. <td valign="top" align="right">
  339. <a href="javascript:SetState(PAUSE);"><%= MenuIcon("pause.gif") %></a>
  340. </td>
  341. <td valign="top">
  342. <%= sFont(Session("MENUFONTSIZE"),Session("MENUFONT"),"",True) %><b><a href="javascript:SetState(PAUSE);"><%= L_PAUSE_TEXT %></a></b></font>
  343. </td>
  344. </tr>
  345. <tr>
  346. <td valign="top" align="right">
  347. <a href="javascript:SetState(CONT);"><%= MenuIcon("roll.gif") %></a>
  348. </td>
  349. <td valign="top">
  350. <%= sFont(Session("MENUFONTSIZE"),Session("MENUFONT"),"",True) %><b><a href="javascript:SetState(CONT);"><%= L_RESUME_TEXT %></a></b></font>
  351. </td>
  352. </tr>
  353. <tr>
  354. <td colspan="2" valign="middle">
  355. <%= sFont(Session("MENUFONTSIZE"),Session("MENUFONT"),"",True) %><b>&nbsp;</b></font>
  356. </td>
  357. </tr>
  358. <tr>
  359. <td valign="top" align="right">
  360. <a href="javascript:sec();"><%= MenuIcon("perm.gif") %></a>
  361. </td>
  362. <td valign="top">
  363. <%= sFont(Session("MENUFONTSIZE"),Session("MENUFONT"),"",True) %><b><a href="javascript:sec();"><%= L_PERMWIZ_TEXT %></a></b></font>
  364. </td>
  365. </tr>
  366. <tr>
  367. <td colspan="2" valign="middle">
  368. <%= sFont(Session("MENUFONTSIZE"),Session("MENUFONT"),"",True) %><b>&nbsp;</b></font>
  369. </td>
  370. </tr>
  371. <tr>
  372. <td valign="top" align="right">
  373. <a href="javascript:master();"><%= MenuIcon("master.gif") %></a>
  374. </td>
  375. <td valign="top">
  376. <%= sFont(Session("MENUFONTSIZE"),Session("MENUFONT"),"",True) %><b><a href="javascript:master();"><%= L_MASTER_TEXT %></a></b></font>&nbsp;
  377. <TABLE CELLSPACING=0 CELLPADDING=0>
  378. <TR>
  379. <% if Session("IsIE") then %>
  380. <TD>
  381. <% else %>
  382. <TD BGCOLOR="Gray" ALIGN="Center" VALIGN="Center">
  383. <% end if %>
  384. <select name="MSvcType" size="1" style="color:black; font-family:<%=Session("MENUFONT")%>;font-size:10pt;">
  385. <option selected value="www"><%= L_WEB_TEXT %>...
  386. <% if FTPINSTALLED then %><option value="ftp"><%= L_FTP_TEXT %>...<% end if %>
  387. </select>
  388. </TD>
  389. </TR>
  390. </TABLE>
  391. </td>
  392. </tr>
  393. <tr>
  394. <td colspan="2" valign="middle">
  395. <%= sFont(Session("MENUFONTSIZE"),Session("MENUFONT"),"",True) %><b>&nbsp;</b></font>
  396. </td>
  397. </tr>
  398. <tr>
  399. <td valign="top" align="right">
  400. <a href="javascript:backup();"><%= MenuIcon("save.gif") %></a>
  401. </td>
  402. <td valign="top">
  403. <%= sFont(Session("MENUFONTSIZE"),Session("MENUFONT"),"",True) %><b><a href="javascript:backup();"><%= L_BACKUP_TEXT %></a></b></font>
  404. </td>
  405. </tr>
  406. <% if false then%>
  407. <tr>
  408. <td colspan="2" valign="middle">
  409. <%= sFont(Session("MENUFONTSIZE"),Session("MENUFONT"),"",True) %><b>&nbsp;</b></font>
  410. </td>
  411. </tr>
  412. <tr>
  413. <td colspan="2" valign="middle">
  414. <%= sFont(Session("MENUFONTSIZE"),Session("MENUFONT"),"",True) %><b>&nbsp;</b></font>
  415. </td>
  416. </tr>
  417. <tr>
  418. <td valign="top" align="right">
  419. <a href="javascript:backup();"><%= MenuIcon("save.gif") %></a>
  420. </td>
  421. <td valign="top">
  422. <%= sFont(Session("MENUFONTSIZE"),Session("MENUFONT"),"",True) %><b><a href="javascript:cert();">Certificate Wizard</a></b></font>
  423. </td>
  424. </tr>
  425. <% end if%>
  426. <% end if %>
  427. </table>
  428. </form>
  429. </body>
  430. </html>
  431. <% end if %>