Leaked source code of windows server 2003
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.

779 lines
25 KiB

  1. <%
  2. '
  3. ' Copyright (c) Microsoft Corporation. All rights reserved.
  4. '
  5. '-------------------------------------------------------------------------
  6. 'Modify Site Property page
  7. '-------------------------------------------------------------------------
  8. '-------------------------------------------------------------------------
  9. ' Start of declaring form variables
  10. '-------------------------------------------------------------------------
  11. Dim F_strSiteID 'holds siteidentifier value
  12. Dim F_strDir 'holds site directory path
  13. Dim F_strAdminName 'holds admin name value
  14. Dim F_strAdminPswd 'holds admin password
  15. Dim F_strConfirmPswd 'holds Confirm password value
  16. Dim F_strPswdChanged 'holds a value whether Admin password is changed
  17. Dim F_strUserLocation 'holds the location of user
  18. 'init the checkbox
  19. '-------------------------------------------------------------------------
  20. ' Start of Error content
  21. '-------------------------------------------------------------------------
  22. '-------------------------------------------------------------------------
  23. ' End of declaring form variables
  24. '-------------------------------------------------------------------------
  25. %>
  26. <!-- #include file="inc_wsa.js" -->
  27. <script language="Javascript">
  28. function GenInit()
  29. {
  30. //do all the init
  31. }
  32. function GenValidatePage()
  33. {
  34. //do all the validation and return false if data is invalid
  35. // validate site identifier values
  36. var strID;
  37. var strDir;
  38. var strIndex;
  39. //validate site ID
  40. strID= document.frmTask.txtSiteID.value;
  41. if(document.frmTask.txtSiteID.value=="")
  42. {
  43. DisplayErr("<%= Server.HTMLEncode(L_ID_NOTEMPTY_ERROR_MESSAGE)%>");
  44. document.frmTask.txtSiteID.focus();
  45. return false;
  46. }
  47. if (!(checkKeyforValidCharacters(strID,"id")))
  48. return false;
  49. // validate directory
  50. strDir = document.frmTask.txtDir.value;
  51. if(strDir=="")
  52. {
  53. document.frmTask.onkeypress = ClearErr;
  54. DisplayErr("<%=Server.HTMLEncode(L_DIR_NOTEMPTY_ERROR_MESSAGE)%>");
  55. document.frmTask.txtDir.focus();
  56. document.frmTask.onkeypress = ClearErr;
  57. return false;
  58. }
  59. if (!(checkKeyforValidCharacters(strDir,"dir")))
  60. return false;
  61. strIndex = strID.indexOf("\\\\");
  62. if (strIndex > 0)
  63. {
  64. DisplayErr("<%= Server.HTMLEncode(L_INVALID_DIR_ERRORMESSAGE) %>");
  65. document.frmTask.txtDir.focus();
  66. return false;
  67. }
  68. // Check whether Admin text is null
  69. if(document.frmTask.txtSiteAdmin.value == "")
  70. {
  71. DisplayErr("<%=Server.HTMLEncode(L_ADMIN_NOTEMPTY_ERROR_MESSAGE)%>");
  72. document.frmTask.txtSiteAdmin.focus();
  73. document.frmTask.onkeypress = ClearErr;
  74. return false;
  75. }
  76. // Check for Admin Password
  77. if (document.frmTask.txtAdminPwd.value != document.frmTask.txtConfirmPswd.value)
  78. {
  79. document.frmTask.txtAdminPwd.value="";
  80. document.frmTask.txtConfirmPswd.value="";
  81. DisplayErr("<%=Server.HTMLEncode(L_PWD_MISMATCH_ERROR_MESSAGE)%>");
  82. document.frmTask.txtAdminPwd.focus();
  83. return false;
  84. }
  85. return true;
  86. }
  87. function GenSetData()
  88. {
  89. return true;
  90. }
  91. function PasswordChanged()
  92. {
  93. document.frmTask.hdnPswdChanged.value = 1
  94. }
  95. </script>
  96. <%
  97. '-------------------------------------------------------------------------
  98. 'Function name :Generalviewtab
  99. 'Description :Serves in getting the general properties page
  100. 'Input Variables :None
  101. 'Output Variables :None
  102. 'Returns :(True / Flase )
  103. 'Global Variables :None
  104. ' in :L_*
  105. '--------------------------------------------------------------------------
  106. Function Generalviewtab()
  107. On Error Resume Next
  108. Err.Clear
  109. Call GetDomainRole( G_strDirRoot, G_strSysName )
  110. %>
  111. <TABLE WIDTH=518 VALIGN=middle ALIGN=left BORDER=0 CELLSPACING=0 CELLPADDING=2 class="TasksBody" >
  112. <TR>
  113. <TD class="TasksBody" nowrap>
  114. <%=L_GEN_SITE_ID_TEXT%>
  115. </TD>
  116. <TD class="TasksBody" colspan = 2>
  117. <input type=text class="formField" NAME="txtSiteID" MAXLENGTH="12" SIZE="30" value="<%=server.HTMLEncode(F_strSiteID)%>" style="background-color:silver" readonly onKeyPress = "GenerateDir(); ClearErr();">
  118. </TD>
  119. </TR>
  120. <TR>
  121. <TD class="TasksBody" >
  122. <%=L_GEN_SITE_DIR_TEXT%>
  123. </TD>
  124. <TD class="TasksBody" >
  125. <input type=text class="formField" NAME="txtDir" SIZE="30" value="<%=server.HTMLEncode(F_strDir)%>" style="background-color:silver" readonly onKeyPress = "ClearErr();">
  126. </TD>
  127. <TD class="TasksBody" nowrap style="visibility:hidden">
  128. <input type=checkbox class="formField" NAME="chkCreatePath" checked>
  129. <%=L_GEN_SITE_CREATEDIR_TEXT%>
  130. </TD>
  131. </TR>
  132. <TR>
  133. <TD class="TasksBody" COLSPAN=3><HR></TD>
  134. </TR>
  135. <TR>
  136. <%If F_strUserLocation = "1" Then%>
  137. <TD class="TasksBody" colspan=3>
  138. <input type=radio class="formField" id="radAccountLocation" checked value="1">
  139. <%=L_LOCAL_USER_ACCOUNT%>
  140. </TD>
  141. <%Else%>
  142. <TD class="TasksBody" colspan=3>
  143. <input type=radio class="formField" id="radAccountLocation" value="1" disabled>
  144. <%=L_LOCAL_USER_ACCOUNT%>
  145. </TD>
  146. <%End If%>
  147. </TR>
  148. <TR>
  149. <TD class="TasksBody" nowrap>
  150. <%=L_GEN_SITE_ADMIN_TEXT%>
  151. </TD>
  152. <TD class="TasksBody" colspan = 2>
  153. <input type=text class="formField" NAME="txtSiteAdmin" style="background-color:silver" readonly MAXLENGTH="256" SIZE="30" value="<%=server.HTMLEncode(F_strAdminName)%>" OnKeypress="checkKeyforCharacters(this)">
  154. </TD>
  155. </TR>
  156. <TR>
  157. <TD class="TasksBody" nowrap>
  158. <%'=L_GEN_SITE_ADMIN_PSWD_TEXT%>
  159. </TD>
  160. <TD class="TasksBody" colspan = 2>
  161. <input type=hidden class="formField" NAME="txtAdminPwd" MAXLENGTH="127" SIZE="30" OnChange="PasswordChanged()" value="<%=server.HTMLEncode(F_strAdminPswd)%>" OnKeypress="ClearErr();" onfocus="this.select();">
  162. </TD>
  163. </TR>
  164. <TR>
  165. <TD class="TasksBody" nowrap>
  166. <%'=L_GEN_SITE_CONFIRM_PSWD_TEXT%>
  167. </TD>
  168. <TD class="TasksBody" colspan = 2>
  169. <input type=hidden class="formField" NAME="txtConfirmPswd" MAXLENGTH="127" SIZE="30" OnChange="PasswordChanged()" value="<%=server.HTMLEncode(F_strConfirmPswd)%>" onKeyPress = "ClearErr();" onfocus="this.select();">
  170. </TD>
  171. </TR>
  172. <TR>
  173. <TD class="TasksBody">
  174. &nbsp;
  175. </TD>
  176. </TR>
  177. <TR>
  178. <TD class="TasksBody" colspan=3>
  179. <% CheckForSecureSite() %>
  180. </TD>
  181. </TR>
  182. </TABLE>
  183. <input type=hidden name=hdnPswdChanged value = "<%=server.HTMLEncode(F_strPswdChanged)%>">
  184. <input type=hidden name=hdnUserLocation value = "<%=server.HTMLEncode(F_strUserLocation)%>">
  185. <%
  186. End Function
  187. '-------------------------------------------------------------------------
  188. 'Function name :Generalhiddentab
  189. 'Description :Serves in setting the hidden fields for general properties page
  190. 'Input Variables :None
  191. 'Output Variables :None
  192. 'Returns :(True / Flase )
  193. 'Global Variables :None
  194. ' in :L_*
  195. '--------------------------------------------------------------------------
  196. Function Generalhiddentab()
  197. %>
  198. <input type=hidden name=txtSiteID value = "<%=server.HTMLEncode(F_strSiteID)%>" >
  199. <input type=hidden name=txtDir value = "<%=server.HTMLEncode(F_strDir)%>" >
  200. <input type=hidden name=txtSiteAdmin value = "<%=server.HTMLEncode(F_strAdminName)%>" >
  201. <input type=hidden name=txtAdminPwd value = "<%=server.HTMLEncode(F_strAdminPswd)%>" >
  202. <input type=hidden name=txtConfirmPswd value = "<%=server.HTMLEncode(F_strConfirmPswd)%>" >
  203. <input type=hidden name=hdnPswdChanged value = "<%=server.HTMLEncode(F_strPswdChanged)%>">
  204. <input type=hidden name=hdnUserLocation value = "<%=server.HTMLEncode(F_strUserLocation)%>">
  205. <%
  206. End Function
  207. 'set form variables to be input for post back function
  208. Function SetGenFormVariables()
  209. F_strSiteID = Request.Form("txtSiteID")
  210. F_strDir = Request.Form("txtDir")
  211. F_strAdminName = Request.Form("txtSiteAdmin")
  212. F_strAdminPswd = Request.Form("txtAdminPwd")
  213. F_strConfirmPswd = Request.Form("txtConfirmPswd")
  214. F_strPswdChanged = Request.Form("hdnPswdChanged")
  215. F_strUserLocation = Request.Form("hdnUserLocation")
  216. End Function
  217. '----------------------------------------------------------
  218. 'Site identites Property page
  219. '----------------------------------------------------------
  220. '-------------------------------------------------------------------------
  221. ' Start of declaring form variables
  222. '-------------------------------------------------------------------------
  223. Dim F_strIPAddr 'holds IPAddress value
  224. Dim F_strPort 'holds port value
  225. Dim F_strHeader 'holds Site header value
  226. '-------------------------------------------------------------------------
  227. ' End of declaring form variables
  228. '-------------------------------------------------------------------------
  229. %>
  230. <script language="Javascript" >
  231. function SiteInit()
  232. {
  233. //do all the init
  234. }
  235. function SiteValidatePage()
  236. {
  237. //do all the validation
  238. if(document.frmTask.txtPort.value == 0)
  239. {
  240. document.frmTask.txtPort.value = "";
  241. DisplayErr("<%= Server.HTMLEncode(L_VALID_PORT_ERRORMESSAGE) %>");
  242. document.frmTask.txtPort.focus();
  243. return false;
  244. }
  245. return true;
  246. }
  247. function SiteSetData()
  248. {
  249. }
  250. </script>
  251. <%
  252. '-------------------------------------------------------------------------
  253. 'Function name :SiteIdentitiesViewTab
  254. 'Description :Serves in getting the Site Identities properties page
  255. 'Input Variables :None
  256. 'Output Variables :None
  257. 'Returns :(True / Flase )
  258. 'Global Variables :None
  259. ' in :L_*
  260. '--------------------------------------------------------------------------
  261. Function SiteIdentitiesViewTab()
  262. Dim objService 'holds WMI Connection object
  263. Dim ObjIPCollection 'holds IPCollection object
  264. Dim instIPAddr 'holds instance of IPAddress
  265. Dim IPCount 'holds instance of IP count
  266. Set objService =getWMIConnection(CONST_WMI_WIN32_NAMESPACE)
  267. Set objIPCollection = objService.execquery("select * from Win32_NetworkAdapterConfiguration where IPEnabled=true")
  268. %>
  269. <TABLE WIDTH=518 VALIGN=middle ALIGN=left BORDER=0 CELLSPACING=0 CELLPADDING=2 class="TasksBody" >
  270. <TR>
  271. <TD class="TasksBody" >
  272. <%=L_SITE_IPADDR_TEXT%>
  273. </TD>
  274. <TD class="TasksBody" >
  275. <select class="formField" NAME="cboIPAddr" MAXLENGTH="80" SIZE="1" value="<%=server.HTMLEncode(F_strIPAddr)%>">
  276. <option value=""><%=L_IP_UNASSIGNED_TEXT%></option>
  277. <%if server.HTMLEncode(F_strIPAddr)<>"" then %>
  278. <option value="<%=server.HTMLEncode(F_strIPAddr)%>" selected><%=server.HTMLEncode(F_strIPAddr) %></option>
  279. <%end if%>
  280. <% for each instIPAddr in objIPCollection
  281. for IPCount =0 to ubound(instIPAddr.IPAddress)
  282. if instIPAddr.IPAddress(IPCount)<> server.HTMLEncode(F_strIPAddr) then %>
  283. <option value="<%=instIPAddr.IPAddress(IPCount)%>"><%=instIPAddr.IPAddress(IPCount) %></option>
  284. <%end if
  285. Next
  286. Next
  287. set ObjIPCollection = nothing
  288. set objService = nothing
  289. %>
  290. </select>
  291. </TD>
  292. </TR>
  293. <TR>
  294. <TD class="TasksBody" >
  295. <%=L_SITE_TCPPORT_TEXT%>
  296. </TD>
  297. <TD class="TasksBody" >
  298. <%if server.HTMLEncode(F_strPort)<>"" then%>
  299. <input type=text class="formField" NAME="txtPort" SIZE="10" value="<%=server.HTMLEncode(F_strPort)%>" OnKeyUP="checkUserLimit(this,'port')" OnKeypress="checkkeyforNumbers(this)" OnBlur= "checkfordefPortValue(this);">
  300. <%else%>
  301. <input type=text class="formField" NAME="txtPort" SIZE="10" value="80" OnKeyUP="checkUserLimit(this,'port')" OnKeypress="checkkeyforNumbers(this)" OnBlur= "checkfordefPortValue(this);">
  302. <%end if%>
  303. </TD>
  304. </TR>
  305. <TR>
  306. <TD class="TasksBody" >
  307. <%=L_SITE_HOST_HEADER_TEXT%>
  308. </TD>
  309. <TD class="TasksBody" >
  310. <input type=text class="formField" NAME="txtHeader" MAXLENGTH="256" SIZE="40" value="<%=server.HTMLEncode(F_strHeader)%>" OnKeypress="headerscheckKeyforCharacters(this)">
  311. </TD>
  312. </TR>
  313. </TABLE>
  314. <%
  315. End Function
  316. '------------------------------------------------------------------------------------------
  317. 'Function name :SiteIdentitiesHiddenTab
  318. 'Description :Serves in setting the hidden fields in Site Identities properties page
  319. 'Input Variables :None
  320. 'Output Variables :None
  321. 'Returns :(True / Flase )
  322. 'Global Variables :None
  323. ' in :L_*
  324. '-----------------------------------------------------------------------------------------
  325. Function SiteIdentitiesHiddenTab()
  326. %>
  327. <input type=hidden name=cboIPAddr value = "<%=server.HTMLEncode(F_strIPAddr)%>" >
  328. <input type=hidden name=txtPort value = "<%=server.HTMLEncode(F_strPort)%>" >
  329. <input type=hidden name=txtHeader value = "<%=server.HTMLEncode(F_strHeader)%>" >
  330. <%
  331. End function
  332. Function SetSiteIdentitiesFormVariables()
  333. F_strIPAddr = Request.Form("cboIPAddr")
  334. F_strPort = Request.Form("txtPort")
  335. F_strHeader = Request.Form("txtHeader")
  336. End Function
  337. '-------------------------------------------------------------------------
  338. ' Start of declaring form variables
  339. '-------------------------------------------------------------------------
  340. Dim F_selectActiveFormat
  341. Dim F_selectDefaultPage
  342. Dim F_strchkAllow
  343. Dim F_strDefaultPageText
  344. Dim F_strUploadMethod 'holds value to upload content method (neither, FTP, or FPSE)
  345. '-------------------------------------------------------------------------
  346. ' End of declaring form variables
  347. '-------------------------------------------------------------------------
  348. %>
  349. <script language="Javascript" >
  350. function ApplInit()
  351. {
  352. SetButtonSelectedState();
  353. }
  354. function OnPageItemSelected()
  355. {
  356. SetButtonSelectedState();
  357. }
  358. function SetButtonSelectedState()
  359. {
  360. var bSelect;
  361. var index = document.frmTask.selectDefaultPage.selectedIndex;
  362. //
  363. // Was an item selected?
  364. if( index < 0)
  365. {
  366. bSelect = false;
  367. }
  368. else
  369. {
  370. bSelect = true;
  371. }
  372. var oMoveUp = document.getElementById("btnMoveUp");
  373. if ( oMoveUp != null ) {
  374. SA_EnableButton(oMoveUp, bSelect);
  375. }
  376. var oMoveDown = document.getElementById("btnMoveDown");
  377. if ( oMoveDown != null ) {
  378. SA_EnableButton(oMoveDown, bSelect);
  379. }
  380. var oRemove = document.getElementById("btnRemove");
  381. if ( oRemove != null ) {
  382. SA_EnableButton(oRemove, bSelect);
  383. }
  384. }
  385. function ApplValidatePage()
  386. {
  387. //do all the validation
  388. document.frmTask.hdnchkAllow.value =
  389. document.frmTask.chkAllow.checked;
  390. return true;
  391. }
  392. function ApplSetData()
  393. {
  394. var i;
  395. var strText;
  396. strText ="";
  397. for(i=0;i < document.frmTask.selectDefaultPage.length;i++)
  398. {
  399. strText = strText+document.frmTask.selectDefaultPage.options[i].
  400. text+",";
  401. }
  402. strText = strText.substr(0,strText.length-1);
  403. document.frmTask.DefaultPageText.value =strText;
  404. //Get the method for uploading content
  405. for(i=0;i<3;i++)
  406. {
  407. if(document.frmTask.radUploadMethod[i].checked == true)
  408. {
  409. document.frmTask.hdnUploadMethod.value =
  410. document.frmTask.radUploadMethod[i].value;
  411. }
  412. }
  413. }
  414. function ClickAdd()
  415. {
  416. var i;
  417. var oOption;
  418. var filename;
  419. filename = RTrimtext(LTrimtext(document.frmTask.txtFileName.value));
  420. if(document.frmTask.txtFileName.value == ""||
  421. IsAllSpaces(filename))
  422. {
  423. document.frmTask.txtFileName.select();
  424. DisplayErr("<%=Server.HTMLEncode(L_ERR_INPUT_ISEMPTY)%>");
  425. return;
  426. }
  427. //add the file to the top of select
  428. if(document.frmTask.selectDefaultPage.length==12)
  429. {
  430. DisplayErr("<%=Server.HTMLEncode(L_ERR_EXCEED_TWELVE)%>");
  431. return;
  432. }
  433. //check wheather the file in list
  434. for(i=0; i < document.frmTask.selectDefaultPage.length;i++)
  435. {
  436. if(document.frmTask.selectDefaultPage.options[i].text==filename)
  437. {
  438. document.frmTask.txtFileName.select();
  439. document.frmTask.txtFileName.focus();
  440. DisplayErr("<%=Server.HTMLEncode(L_ERR_FILE_EXIST)%>");
  441. return;
  442. }
  443. }
  444. //modify the value of the old option items
  445. var len=document.frmTask.selectDefaultPage.length;
  446. document.frmTask.selectDefaultPage.options[len]=
  447. new Option("",len.toString());
  448. for(i=len;i>0;i--)
  449. document.frmTask.selectDefaultPage.options[i].text=
  450. document.frmTask.selectDefaultPage.options[i-1].text;
  451. document.frmTask.selectDefaultPage.options[0].text=filename;
  452. document.frmTask.selectDefaultPage.options[0].selected = true;
  453. document.frmTask.txtFileName.value="";
  454. document.frmTask.txtFileName.focus();
  455. }
  456. function ClickMoveUp()
  457. {
  458. var index;
  459. var text;
  460. index = document.frmTask.selectDefaultPage.selectedIndex;
  461. //
  462. // Was an item selected?
  463. if( index < 0) return;
  464. //
  465. // Can not move-up the first item
  466. if( index == 0) return;
  467. text = document.frmTask.selectDefaultPage.options[index-1].text;
  468. document.frmTask.selectDefaultPage.options[index-1].text=
  469. document.frmTask.selectDefaultPage.options[index].text;
  470. document.frmTask.selectDefaultPage.options[index].text=text;
  471. document.frmTask.selectDefaultPage.selectedIndex = index-1;
  472. }
  473. function ClickMoveDown()
  474. {
  475. var index;
  476. var text;
  477. if(document.frmTask.selectDefaultPage.length==0)
  478. return;
  479. index = document.frmTask.selectDefaultPage.selectedIndex;
  480. //
  481. // Was an item selected?
  482. if( index < 0) return;
  483. if( index == document.frmTask.selectDefaultPage.length-1)
  484. return;
  485. text = document.frmTask.selectDefaultPage.options[index].text;
  486. document.frmTask.selectDefaultPage.options[index].text=
  487. document.frmTask.selectDefaultPage.options[index+1].text;
  488. document.frmTask.selectDefaultPage.options[index+1].text=text;
  489. document.frmTask.selectDefaultPage.selectedIndex = index+1;
  490. }
  491. function ClickRemove()
  492. {
  493. var index;
  494. if(document.frmTask.selectDefaultPage.length == 0)
  495. return;
  496. index = document.frmTask.selectDefaultPage.selectedIndex;
  497. //
  498. // Was an item selected?
  499. if( index < 0) return;
  500. document.frmTask.selectDefaultPage.remove(index);
  501. if(index == document.frmTask.selectDefaultPage.length)
  502. document.frmTask.selectDefaultPage.selectedIndex=index-1;
  503. else
  504. document.frmTask.selectDefaultPage.selectedIndex =index;
  505. SetButtonSelectedState();
  506. }
  507. </script>
  508. <%
  509. '------------------------------------------------------------------------
  510. 'Application settings Property page
  511. '------------------------------------------------------------------------
  512. '-------------------------------------------------------------------------
  513. 'Function name :ApplicationSettingsViewTab
  514. 'Description :Serves in getting the Site application settings page
  515. 'Input Variables :None
  516. 'Output Variables :None
  517. 'Returns :(True / Flase )
  518. 'Global Variables :None
  519. '--------------------------------------------------------------------------
  520. Function ApplicationSettingsViewTab()
  521. Dim objService 'holds WMI Connection object
  522. Dim FrontIsInstalled
  523. Err.Clear
  524. on error resume next
  525. Set objService = getWMIConnection(CONST_WMI_IIS_NAMESPACE)
  526. 'Determine default execute permissions
  527. Dim objSetting 'holds Webservicesetting connection
  528. Dim inst 'holds instance object
  529. if F_selectActiveFormat = "" then
  530. Set objSetting =objService.Get(GetIISWMIProviderClassName("IIs_WebServiceSetting") & ".Name='W3SVC'")
  531. if objSetting.Name = "W3SVC" then
  532. if objSetting.AccessExecute = TRUE and objSetting.AccessScript = TRUE then
  533. F_selectActiveFormat = 2
  534. elseif objSetting.AccessExecute = false and objSetting.AccessScript = TRUE then
  535. F_selectActiveFormat = 1
  536. elseif objSetting.AccessExecute = false and objSetting.AccessScript = false then
  537. F_selectActiveFormat =0
  538. elseif isnull(objSetting.AccessExecute) and isnull(objSetting.AccessScript) then
  539. F_selectActiveFormat = 0
  540. end if
  541. end if
  542. end if
  543. 'Release the objects
  544. set objSetting = nothing
  545. set objService = nothing
  546. %>
  547. <TABLE WIDTH=400 VALIGN=middle ALIGN=left BORDER=0 CELLSPACING=0 CELLPADDING=0 class="TasksBody">
  548. <TR>
  549. <TD class="TasksBody" nowrap>
  550. <%= L_EXECUTE_PERMISSIONS %>
  551. </TD>
  552. <TD class="TasksBody" >
  553. <SELECT class="formField" name="selectActiveFormat" MAXLENGTH="80" size="1" value="<%=server.HTMLEncode(F_selectActiveFormat)%>">
  554. <%
  555. if server.HTMLEncode(F_selectActiveFormat)="0" then %>
  556. <OPTION value="0" selected><%= L_NONE %></OPTION>
  557. <OPTION value="1"><%= L_SCRIPTS_ONLY %></OPTION>
  558. <OPTION value="2"><%= L_SCRIPTS_EXECUTABLES %></OPTION>
  559. <%elseif server.HTMLEncode(F_selectActiveFormat)="1" then %>
  560. <OPTION value="0"><%= L_NONE %></OPTION>
  561. <OPTION value="1" selected><%= L_SCRIPTS_ONLY %></OPTION>
  562. <OPTION value="2"><%= L_SCRIPTS_EXECUTABLES %></OPTION>
  563. <%elseif server.HTMLEncode(F_selectActiveFormat)="2" then %>
  564. <OPTION value="0"><%= L_NONE %></OPTION>
  565. <OPTION value="1"><%= L_SCRIPTS_ONLY %></OPTION>
  566. <OPTION value="2" selected><%= L_SCRIPTS_EXECUTABLES %></OPTION>
  567. <% end if %>
  568. </SELECT>
  569. </TD>
  570. </TR>
  571. <TR><TD class="TasksBody" colspan = 3 >&nbsp;</TD></TR>
  572. <TR><TD class="TasksBody" colspan=3 nowrap ><%=L_DEFAULT_PAGE%></TD></TR>
  573. <TR>
  574. <TD class="TasksBody" rowspan=5 align="right">
  575. <SELECT class="formField" name="selectDefaultPage" MAXLENGTH="12" size="6" style="WIDTH: 100px" onclick='OnPageItemSelected();' >
  576. <%=DisplayDefaultPageItems()%>
  577. </SELECT>
  578. </TD>
  579. </TR>
  580. <TR>
  581. <TD class="TasksBody" colspan = 2 nowrap>
  582. &nbsp;&nbsp;&nbsp;&nbsp;
  583. <%Call SA_ServeOnClickButtonEx(L_BUTTON_FACE_ADD, "", "ClickAdd();", 65, 0, "","btnAdd")%>
  584. <%=L_FILE_NAME%>&nbsp;&nbsp;
  585. <input type=text class="formField"
  586. NAME="txtFileName"
  587. style = "width:100"
  588. value=""
  589. onkeydown="ClearErr();">
  590. </TD>
  591. </TR>
  592. <TR>
  593. <TD class="TasksBody" colspan = 2 >
  594. &nbsp;&nbsp;&nbsp;&nbsp;
  595. <%Call SA_ServeOnClickButtonEx(L_BUTTON_FACE_MOVE_UP, "", "ClickMoveUp();", 65, 0, "disabled","btnMoveUp")%>
  596. </TD>
  597. </TR>
  598. <TR>
  599. <TD class="TasksBody" colspan = 2 >
  600. &nbsp;&nbsp;&nbsp;&nbsp;
  601. <%Call SA_ServeOnClickButtonEx(L_BUTTON_FACE_MOVE_DOWM, "", "ClickMoveDown();", 65, 0, "disabled","btnMoveDown")%>
  602. </TD>
  603. </TR>
  604. <TR>
  605. <TD class="TasksBody" colspan = 2 >
  606. &nbsp;&nbsp;&nbsp;&nbsp;
  607. <%Call SA_ServeOnClickButtonEx(L_BUTTON_FACE_REMOVE, "", "ClickRemove();", 65, 0, "disabled","btnRemove")%>
  608. </TD>
  609. </TR>
  610. <TR><TD class="TasksBody" colspan = 2>&nbsp;</TD></TR>
  611. <TR>
  612. <TD colspan="2">
  613. <%Call ServeAppSettings(F_strDir, F_strUploadMethod, F_strchkAllow, False)%>
  614. </TD>
  615. </TR>
  616. </TABLE>
  617. <input type=hidden name=DefaultPageText value = "<%=server.HTMLEncode(F_strDefaultPageText)%>">
  618. <input type=hidden name=hdnchkAllow value = "<%=server.HTMLEncode(F_strchkAllow)%>">
  619. <input type=hidden name=hdnUploadMethod value = "<%=server.HTMLEncode(F_strUploadMethod)%>" >
  620. <%
  621. End Function
  622. '-------------------------------------------------------------------------
  623. 'Function name :ApplicationSettingsHiddenTab
  624. 'Description :Serves in storing hidden values
  625. 'Input Variables :None
  626. 'Output Variables :None
  627. 'Returns :(True / Flase )
  628. 'Global Variables :None
  629. '--------------------------------------------------------------------------
  630. Function ApplicationSettingsHiddenTab()
  631. %>
  632. <input type=hidden name=hdnchkAllow value = "<%=server.HTMLEncode(F_strchkAllow)%>">
  633. <input type=hidden name=selectActiveFormat value="<%=server.HTMLEncode(F_selectActiveFormat)%>">
  634. <input type=hidden name=selectDefaultPage value = "<%=server.HTMLEncode(F_selectDefaultPage)%>">
  635. <input type=hidden name=DefaultPageText value = "<%=server.HTMLEncode(F_strDefaultPageText)%>">
  636. <input type=hidden name=hdnUploadMethod value = "<%=server.HTMLEncode(F_strUploadMethod)%>" >
  637. <%
  638. End Function
  639. 'set form variables to be input for post back function
  640. Function SetApplnSettingsFormVariables()
  641. F_strchkAllow = Request.Form("hdnchkAllow")
  642. F_selectActiveFormat = Request.Form("selectActiveFormat")
  643. F_selectDefaultPage = Request.Form("selectDefaultPage")
  644. F_strDefaultPageText = Request.Form("DefaultPageText")
  645. F_strUploadMethod = Request.Form("hdnUploadMethod")
  646. End Function
  647. Function DisplayDefaultPageItems()
  648. On Error Resume Next
  649. Err.Clear
  650. Dim i
  651. Dim arrItems
  652. arrItems = split(F_strDefaultPageText,",")
  653. For i=0 to ubound(arrItems)
  654. If (F_selectDefaultPage = CStr(i)) then
  655. Response.Write("<OPTION value="&chr(34)&CStr(i)&chr(34)&" selected>"&arrItems(i)&"</OPTION>")
  656. Else
  657. Response.Write("<OPTION value="&chr(34)&CStr(i)&chr(34)&">"&arrItems(i)&"</OPTION>")
  658. End If
  659. Next
  660. End Function
  661. %>