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.

393 lines
9.9 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="iivs.str"-->
  8. <!--#include file="iilog.str"-->
  9. <!--#include file="iimlti.str"-->
  10. <%
  11. Const DEFAULTPORT = 80
  12. Const DEFAULTMAXCONNECTIONS_NUM = 1000
  13. On Error Resume Next
  14. Dim blanks,path,currentobj, ipport, ipaddress, i, oWebService
  15. path=Session("spath")
  16. Session("path")=path
  17. Session("SpecObj")=path
  18. Session("SpecProps")="ServerBindings"
  19. Set currentobj=GetObject(path)
  20. blanks=""
  21. for i=0 to 23
  22. blanks=blanks & "&nbsp;"
  23. Next
  24. %>
  25. <!--#include file="iiset.inc"-->
  26. <!--#include file="iisetfnt.inc"-->
  27. <!--#include file="iibind.inc"-->
  28. <%
  29. function allBindings()
  30. dim sBinding,sBindingList
  31. sBindingList = ""
  32. for each sBinding in currentobj.ServerBindings
  33. sBindingList = sBindingList & sBinding & ","
  34. next
  35. ' Trim off the trailing ,
  36. if sBindingList <> "" then
  37. sBindingList = Left( sBindingList, Len(sBindingList) - 1 )
  38. end if
  39. allBindings = sBindingList
  40. end function
  41. function writeLogTypes(fieldname,value, id, adminonly)
  42. On Error Resume Next
  43. if id = currentobj.Get("LogPluginClsid") then
  44. writeLogTypes="<OPTION SELECTED VALUE='" & id & "'>" & value
  45. else
  46. writeLogTypes="<OPTION VALUE='" & id & "'>" & value
  47. end if
  48. end function
  49. %>
  50. <html>
  51. <head>
  52. <title></title>
  53. <script language="JavaScript">
  54. var Global=top.title.Global;
  55. Global.helpFileName="iipy";
  56. Global.siteProperties = true;
  57. <!--#include file="iijsfuncs.inc"-->
  58. function warnWrkingSite()
  59. {
  60. if (top.title.nodeList[Global.selId].isWorkingServer)
  61. {
  62. alert("<%= L_WORKINGSERVER_TEXT %>");
  63. }
  64. }
  65. function SetBinding(){
  66. if (top.title.nodeList[top.title.Global.selId].isWorkingServer){
  67. if (!confirm("<%= L_CHGBINDING_TEXT %>")){
  68. document.userform.hdnIPA.value=document.userform.hdnhdnIPA.value
  69. document.userform.hdnPort.value=document.userform.hdnhdnPort.value
  70. return;
  71. }
  72. }
  73. if (document.userform.hdnIPA.value == "<%= L_ALLUNASSIGNED_TEXT%>"){
  74. hdnIPA = "";
  75. }
  76. else{
  77. hdnIPA = document.userform.hdnIPA.value;
  78. }
  79. document.userform.ServerBindings.value=hdnIPA + ":" + document.userform.hdnPort.value + ":" + document.userform.hdnHost.value;
  80. document.userform.hdnhdnIPA.value=hdnIPA;
  81. document.userform.hdnhdnPort.value=document.userform.hdnPort.value;
  82. if (hdnIPA == "")
  83. {
  84. document.userform.hdnIPA.value = "<%= L_ALLUNASSIGNED_TEXT%>";
  85. }
  86. }
  87. function SetMaxConn(){
  88. curval=parseInt(document.userform.hdnMaxConnections.value);
  89. if (document.userform.rdoMaxConnections[0].checked){
  90. document.userform.MaxConnections.value=2000000000;
  91. }
  92. else{
  93. document.userform.MaxConnections.value=document.userform.hdnMaxConnections.value;
  94. }
  95. }
  96. function setLogType(logCntrl,hdncntrl){
  97. if (logCntrl.checked){
  98. hdncntrl.value = 1;
  99. }
  100. else{
  101. hdncntrl.value = 0;
  102. }
  103. }
  104. function setLogUIType(logCntrl){
  105. var logGuid = logCntrl.options[logCntrl.selectedIndex].value;
  106. var logType = "";
  107. if (logGuid == "{FF160663-DE82-11CF-BC0A-00AA006111E0}")
  108. {
  109. logType = "EXT";
  110. }
  111. if (logGuid == "{FF16065B-DE82-11CF-BC0A-00AA006111E0}")
  112. {
  113. logType = "ODBC";
  114. }
  115. top.connect.location.href = "iisess.asp?setLogUI=" + logType +"&LogName=" +escape( logCntrl.options[logCntrl.selectedIndex].text);
  116. }
  117. </script>
  118. </head>
  119. <body bgcolor="<%= Session("BGCOLOR") %>" topmargin="5" text="#000000">
  120. <TABLE WIDTH = 500 BORDER = 0>
  121. <TR>
  122. <TD>
  123. <%= sFont("","","",True) %>
  124. <B>
  125. <%= L_SITE_TEXT %>
  126. </B>
  127. <P>
  128. <form name="userform">
  129. <IMG SRC="images/hr.gif" WIDTH=5 HEIGHT=2 BORDER=0 ALIGN="middle">
  130. <%= L_VIRTUALSERVERID_TEXT %>
  131. <IMG SRC="images/hr.gif" WIDTH=<%= L_VIRTUALSERVERID_HR_W %> HEIGHT=2 BORDER=0 ALIGN="middle">
  132. <P>
  133. <table border="0" cellpadding="0">
  134. <tr>
  135. <td valign="middle">
  136. <%= sFont("","","",True) %>
  137. <%= L_DESCRIPTION_TEXT %>
  138. </font>
  139. </td>
  140. <td valign="middle" colspan="2">
  141. <%= sFont("","","",True) %>
  142. <%= text("ServerComment", L_DESCRIPTION_NUM ,"","","",false,false) %>
  143. </font>
  144. </td>
  145. </tr>
  146. <tr>
  147. <td colspan="2" height="4">&nbsp;</td>
  148. </tr>
  149. <tr>
  150. <td valign="bottom"><%= sFont("","","",True) %><%= L_IPADDRESS_TEXT %></font></td>
  151. <td valign="bottom">
  152. <%= sFont("","","",True) %>
  153. <%= writeBinding("IPAddress", L_IPADDRESS_NUM,"","","warnWrkingSite();SetBinding();",true,true) %>
  154. <input type="hidden" name="ServerBindings" value="<%= allBindings() %>">
  155. </font>
  156. </td>
  157. <td align="right" valign="bottom"><%= sFont("","","",True) %>&nbsp;&nbsp;
  158. <% if Session("vtype") <> "svc" then %>
  159. <% if Session("isAdmin") then %>
  160. <input type="button" name="hdnAdvanced" value="<%= L_ADVANCED_TEXT %>" onclick="popBox('Advanced', <%= L_IIMLTI_W %>, <%= L_IIMLTI_H %>, 'iimlti');">
  161. <% end if %>
  162. <% end if %>
  163. </font>
  164. </td>
  165. </tr>
  166. <tr>
  167. <td valign="bottom"><%= sFont("","","",True) %><%= L_TCPPORT_TEXT %></font></td>
  168. <td valign="bottom">
  169. <%= sFont("","","",True) %>
  170. <%= writeBinding("IPPort", L_TCPPORT_NUM,"","","warnWrkingSite();isNum(this,1,65535); SetBinding();",true,true) %>
  171. &nbsp;<%= writeBinding("Host",5,"","","warnWrkingSite();SetBinding();",true,true) %>
  172. </font>
  173. </td>
  174. </tr>
  175. <% if Session("isAdmin") then %>
  176. <% if multibind then %>
  177. <tr>
  178. <td valign="bottom" colspan="4">
  179. <%= sFont("","","",True) %>
  180. (<%= L_MULTIBINDING_TEXT %>)
  181. </font>
  182. </td>
  183. </tr>
  184. <% end if %>
  185. <% end if %>
  186. </table>
  187. <P>
  188. <%= sFont("","","",True) %>
  189. <IMG SRC="images/hr.gif" WIDTH=5 HEIGHT=2 BORDER=0 ALIGN="middle">
  190. <%= L_CONNPARAMS_TEXT %>
  191. <IMG SRC="images/hr.gif" WIDTH=<%= L_CONNPARAMS_HR_W %> HEIGHT=2 BORDER=0 ALIGN="middle">
  192. <P>
  193. <table border="0" cellpadding="0">
  194. <tr>
  195. <td colspan="2">
  196. <%= sFont("","","",True) %>
  197. <%= printradio("MaxConnections", (currentobj.MaxConnections >=2000000000), "SetMaxConn();setCntrlState(!this.checked,hdnMaxConnections);",true) %>
  198. <%= L_UNLIMITED_TEXT %>
  199. </font>
  200. </td>
  201. </tr>
  202. <tr>
  203. <td valign="middle">
  204. <%= sFont("","","",True) %>
  205. <%= printradio("MaxConnections", (currentobj.MaxConnections < 2000000000), "SetMaxConn();setCntrlState(this.checked,hdnMaxConnections);",true) %>
  206. <%= L_LIMITTO_TEXT %>
  207. <input type="hidden" name="MaxConnections" value="<%= currentobj.MaxConnections %>">
  208. </font>
  209. </td>
  210. <td valign="bottom">
  211. <%= sFont("","","",True) %>
  212. <% if (currentobj.MaxConnections < 2000000000) then %>
  213. <%= inputbox(0,"TEXT","hdnMaxConnections",currentobj.MaxConnections, L_MAXCONNECTIONS_NUM,"","", "isNum(this,1,2000000001);SetMaxConn();",false,True,False) %>
  214. <% else %>
  215. <%= inputbox(0,"TEXT","hdnMaxConnections",DEFAULTMAXCONNECTIONS_NUM, L_MAXCONNECTIONS_NUM,"","", "isNum(this,1,2000000001);SetMaxConn();",false,True,False) %>
  216. <% end if %>
  217. </td>
  218. <td valign="middle">
  219. <%= sFont("","","",True) %>
  220. &nbsp;<%= L_CONNECTIONS_TEXT %>
  221. </font>
  222. </td>
  223. </tr>
  224. <tr>
  225. <td> &nbsp;</td>
  226. </tr>
  227. <tr>
  228. <td valign="middle"><%= sFont("","","",True) %><%= L_CONNTIMEOUT_TEXT %>&nbsp;&nbsp;</font></td>
  229. <td valign="bottom">
  230. <%= text("ConnectionTimeout", L_CONNTIMEOUT_NUM,"","", "isNum(this,1,2147483646);",True,True) %>
  231. </td>
  232. <td valign="middle">
  233. <%= sFont("","","",True) %>
  234. &nbsp;<%= L_SECONDS_TEXT %>
  235. </font>
  236. </td>
  237. </tr>
  238. <tr>
  239. <td colspan="2" height="4"></td>
  240. </tr>
  241. <tr>
  242. <td COLSPAN = 2>
  243. <%= sFont("","","",True) %>
  244. <%= checkbox("AllowKeepAlive","",True) %>&nbsp;<%= L_KEEPALIVES_TEXT %>
  245. </FONT>
  246. </td>
  247. </tr>
  248. <tr>
  249. <td colspan="2" height="4"></td>
  250. </tr>
  251. </table>
  252. </blockquote>
  253. </font>
  254. <%= sFont("","","",True) %>
  255. <%
  256. On Error Resume Next
  257. Dim LoggingModules,noLogging, Module, InfoNode, AvailMods
  258. Set LoggingModules = GetObject("IIS://localhost/logging")
  259. Set InfoNode = GetObject("IIS://localhost/W3SVC/Info")
  260. AvailMods = InfoNode.LogModuleList
  261. if err <> 0 then
  262. noLogging = True
  263. end if
  264. %>
  265. <IMG SRC="images/hr.gif" WIDTH=5 HEIGHT=2 BORDER=0 ALIGN="middle">
  266. <% if noLogging then %>
  267. <img align="top" src="images/checkoff.gif" width="13" height="13">
  268. <% else %>
  269. <% if currentobj.LogType = 1 then %>
  270. <INPUT TYPE="checkbox" NAME="hdnLogType" checked OnClick = "setLogType(this,document.userform.LogType);setCntrlState(this.checked,document.userform.hdnBtnLogProps);setCntrlState(this.checked,document.userform.LogPlugInClsid);top.title.Global.updated=true;">
  271. <% else %>
  272. <INPUT TYPE="checkbox" NAME="hdnLogType" OnClick = "setLogType(this,document.userform.LogType);setCntrlState(this.checked,document.userform.hdnBtnLogProps);setCntrlState(this.checked,document.userform.LogPlugInClsid);top.title.Global.updated=true;">
  273. <% end if %>
  274. <INPUT TYPE="hidden" NAME="LogType" VALUE="<%= currentobj.LogType %>">
  275. <% end if %>
  276. <%= L_LOGGING_TEXT %>
  277. <IMG SRC="images/hr.gif" WIDTH=<%= L_LOGGING_HR_W %> HEIGHT=2 BORDER=0 ALIGN="middle">
  278. <P>
  279. <table border="0" cellpadding="0">
  280. <tr>
  281. <td colspan="1">
  282. <%= sFont("","","",True) %>
  283. <%= L_LOGFORMAT_TEXT %>
  284. <%= writeSelect("LogPlugInClsid", L_LOGFORMAT_NUM,"setLogUIType(this);", false) %>
  285. <%
  286. if noLogging then
  287. Response.write "<OPTION>" & L_NONEINSTALLED_TEXT & "</OPTION>"
  288. else
  289. For Each Module in LoggingModules
  290. If InStr(AvailMods, Module.Name) Then
  291. Response.write writeLogTypes("LogPluginClsid", Module.Name, Module.LogModuleId,false)
  292. End If
  293. Next
  294. end if
  295. %>
  296. </select>
  297. </font>
  298. </td>
  299. <td><%= sFont("","","",True) %>
  300. <% if not noLogging then %>
  301. <input type="button" name="hdnBtnLogProps" value="<%= L_EDIT_TEXT %>" onclick="popBox('LogDetail',<%= L_IILOG_W %>,<%= L_IILOG_H %>,'iilog');">
  302. <%end if %>
  303. </FONT>
  304. </td>
  305. </tr>
  306. </table>
  307. </form>
  308. </font>
  309. </TD>
  310. </TR>
  311. </TABLE>
  312. <script language="JavaScript">
  313. <% if Session("IsAdmin") then %>
  314. setCntrlState(document.userform.rdoMaxConnections[1].checked,document.userform.hdnMaxConnections);
  315. <% end if %>
  316. <% if not noLogging then %>
  317. setCntrlState(document.userform.hdnLogType.checked,document.userform.LogPlugInClsid);
  318. setCntrlState(document.userform.hdnLogType.checked,document.userform.hdnBtnLogProps)
  319. setLogUIType(document.userform.LogPlugInClsid)
  320. </script>
  321. <% end if %>
  322. </body>
  323. </html>
  324. <% end if %>