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.

715 lines
20 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. <!-- localizable strings for generic wizard functionality -->
  8. <!--#include file="iiwiz.inc"-->
  9. <!--#include file="iiwiz.str"-->
  10. <!-- localizable strings for new node wizard functionality -->
  11. <!--#include file="iiwizsec.inc"-->
  12. <!--#include file="iiwizsec.str"-->
  13. <!-- generic wizard global vars and functions -->
  14. <!--#include file="iiwizfncs.inc"-->
  15. <%
  16. Const MD_PATH_NOT_FOUND = &H80070003
  17. Const STR_FTP_SERVER_U = "IISFTPSERVER"
  18. Const STR_SLASH_ROOT = "/ROOT"
  19. '***************Required custom functions***************
  20. Function sFinish()
  21. On Error Resume Next
  22. Dim oSite, thispath, strTemplate
  23. thispath = Request("ADSPath")
  24. strTemplate = Request("Template")
  25. Dim currentobj, path, dirkeytype
  26. set currentobj = GetObject(thispath)
  27. path = thispath
  28. dirkeytype = sGetKeyType(fixSiteType(Session("stype")), DIR)
  29. ' DBG
  30. ' Response.write "Session,stype - " & Session("stype") & "<BR>"
  31. ' Response.write "dirkeytype - " & dirkeytype & "<BR>"
  32. ' Response.write "currentobj.ADsPath - " & currentobj.ADsPath & "<BR>"
  33. %>
  34. <!--#include file="iifixpth.inc"-->
  35. <%
  36. err.clear
  37. set oSite = GetObject(thispath)
  38. ' DBG
  39. ' Response.write "oSite.ADsPath - " & oSite.ADsPath & "<BR>"
  40. ' Response.write "oSite.KeyType - " & oSite.KeyType & "<BR>"
  41. if cInt(Request("HowSet")) = INHERITVALS then
  42. ' Handle Web and Ftp cases separately
  43. if InStr( oSite.KeyType, "Web" ) <> 0 then
  44. ' All web security settings are on the directory
  45. if InStr(oSite.KeyType,"Server") <> 0 then
  46. set oSite = GetObject( thispath & STR_SLASH_ROOT )
  47. end if
  48. oSite.PutEx ADS_PROPERTY_CLEAR, "AccessFlags", ""
  49. oSite.PutEx ADS_PROPERTY_CLEAR, "IPSecurity", ""
  50. oSite.PutEx ADS_PROPERTY_CLEAR, "AuthFlags", ""
  51. ' oSite.PutEx ADS_PROPERTY_CLEAR, "EnableDirBrowsing", ""
  52. oSite.SetInfo
  53. else
  54. if InStr(oSite.KeyType,"Server") <> 0 then
  55. ' Ftp authorization set at the server level.
  56. oSite.PutEx ADS_PROPERTY_CLEAR, "AllowAnonymous", ""
  57. oSite.PutEx ADS_PROPERTY_CLEAR, "AnonymousOnly", ""
  58. oSite.SetInfo
  59. set oSite = GetObject( thispath & STR_SLASH_ROOT )
  60. end if
  61. ' Ftp access set at the directory
  62. oSite.PutEx ADS_PROPERTY_CLEAR, "AccessFlags", ""
  63. oSite.SetInfo
  64. end if
  65. else
  66. dim frompath, topath, propstr
  67. ' Handle Web and Ftp cases separately
  68. if InStr( oSite.KeyType, "Web" ) <> 0 then
  69. if InStr(oSite.Class,"Server") <> 0 then
  70. set oSite = GetObject( thispath & STR_SLASH_ROOT )
  71. end if
  72. frompath = "sFromNode=" & Server.URLEncode(strTemplate & STR_SLASH_ROOT)
  73. topath = "&sToNode=" & Server.URLEncode(oSite.ADsPath)
  74. propstr = "&prop=AuthFlags,AccessFlags" ' ,EnableDirBrowsing
  75. Response.write SCRIPT & "top.hlist.location.href='iiclone.asp?" & frompath & topath & propstr & "';" & CLOSESCRIPT
  76. else
  77. ' Because FTP has security settings at both the server and vdir levels the
  78. ' generic clone script won't work to copy settings, so we'll set them here
  79. Dim objTemplate
  80. ' DBG
  81. ' Response.write "Template " & strTemplate & "<BR>"
  82. ' Response.write "Site " & oSite.ADsPath & "<BR>"
  83. if STR_FTP_SERVER_U = UCase(oSite.Class) then
  84. ' Authentication properties need to be set on the server
  85. set objTemplate = GetObject( strTemplate )
  86. oSite.AllowAnonymous = objTemplate.AllowAnonymous
  87. oSite.AnonymousOnly = objTemplate.AnonymousOnly
  88. oSite.SetInfo
  89. ' Set target object to /ROOT for directory specific propeties
  90. set oSite = GetObject( oSite.ADsPath & STR_SLASH_ROOT )
  91. end if
  92. set objTemplate = GetObject( strTemplate & STR_SLASH_ROOT )
  93. oSite.AccessFlags = objTemplate.AccessFlags
  94. oSite.SetInfo
  95. end if
  96. end if
  97. if err = 0 then
  98. %>
  99. <SCRIPT LANGAUGE="JavaScript">
  100. // top.window.close();
  101. </SCRIPT>
  102. <%
  103. else
  104. sHandleErrors(err)
  105. end if
  106. End Function
  107. Function sHandleErrors(errnum)
  108. Response.write L_ERROROCCURED & errnum & "(" & HEX(errnum) & ")"
  109. End Function
  110. Function sWriteWelcome()
  111. Dim sOutputStr
  112. sOutputStr = sFont("2","","",True)
  113. sOutputStr = sOutputStr & "<B>" & L_WELCOME_HEAD & "</B><P>"
  114. sOutputStr = sOutputStr & sFont("","","",True)
  115. sOutputStr = sOutputStr & L_WELCOME1 & "<P>"
  116. sOutputStr = sOutputStr & L_WELCOME2 & "<P>"
  117. sOutputStr = sOutputStr & L_WELCOME3 & "<P>"
  118. sWriteWelcome = sOutputStr
  119. End Function
  120. Function sWriteFinish()
  121. Dim sOutputStr
  122. sOutputStr = sFont("2","","",True)
  123. sOutputStr = sOutputStr & "<B>" & L_FINISH_HEAD & "</B><P>"
  124. sOutputStr = sOutputStr & sFont("","","",True)
  125. sOutputStr = sOutputStr & L_FINISH1 & "<P>"
  126. sOutputStr = sOutputStr & L_FINISH2 & "<P>"
  127. sOutputStr = sOutputStr & L_FINISH3 & "<P>"
  128. sWriteFinish = sOutputStr
  129. End Function
  130. Function sWriteTitle(iThisPage)
  131. Dim sOutputStr, sHead, sDescription, iNodeType
  132. Select Case iThisPage
  133. Case HOW
  134. sHead = L_HOW
  135. sDescription = L_HOW_DESC
  136. Case TEMPLATE
  137. sHead = L_TEMPLATE
  138. sDescription = L_TEMPLATE_DESC
  139. Case ACL
  140. sHead = L_ACL
  141. sDescription = L_ACL_DESC
  142. Case SUMMARY
  143. sHead = L_SUMMARY
  144. sDescription = L_SUMMARY_DESC
  145. End Select
  146. sOutputStr = "<TABLE WIDTH = 100% CELLPADDING = 0 CELLSPACING=0>"
  147. sOutputStr = sOutputStr & "<TR>"
  148. sOutputStr = sOutputStr & "<TD ALIGN=left VALIGN=top bgcolor='White'>"
  149. sOutputStr = sOutputStr & "<TABLE CELLPADDING = 0 CELLSPACING=0 >"
  150. sOutputStr = sOutputStr & "<TR>"
  151. sOutputStr = sOutputStr & "<TD COLSPAN = 2 bgcolor='White'><BR>"
  152. sOutputStr = sOutputStr & sFont("","","",True)
  153. sOutputStr = sOutputStr & "<B>" & sHead & "</B>"
  154. sOutputStr = sOutputStr & "</FONT>"
  155. sOutputStr = sOutputStr & "</TD>"
  156. sOutputStr = sOutputStr & "</TR>"
  157. sOutputStr = sOutputStr & "<TR>"
  158. sOutputStr = sOutputStr & "<TD width = 10 bgcolor='White'>&nbsp;</TD>"
  159. sOutputStr = sOutputStr & "<TD bgcolor='White'>"
  160. sOutputStr = sOutputStr & sFont("","","",True)
  161. sOutputStr = sOutputStr & sDescription
  162. sOutputStr = sOutputStr & "</FONT>"
  163. sOutputStr = sOutputStr & "</TD>"
  164. sOutputStr = sOutputStr & "</TR>"
  165. sOutputStr = sOutputStr & "</TABLE>"
  166. sOutputStr = sOutputStr & "</TD>"
  167. sOutputStr = sOutputStr & "<TD WIDTH = 74 BGCOLOR='Teal'>"
  168. sOutputStr = sOutputStr & "<IMG SRC='images/websitehd.GIF' WIDTH=74 HEIGHT=59 BORDER=0>"
  169. sOutputStr = sOutputStr & "</TD>"
  170. sOutputStr = sOutputStr & "</TR>"
  171. sOutputStr = sOutputStr & "</TABLE>"
  172. sWriteTitle = sOutputStr
  173. End Function
  174. Function sWritePage(iThisPage)
  175. 'On Error Resume Next
  176. Dim sOutputStr, bCanAddSite, isSite, oParentNode, iNodeTypeDefault, sParentKeyType, sNameText
  177. Dim i
  178. Dim bSelected, sSelDescription, oTemplates, oTemplate
  179. Dim oIPSec, bGrantByDefault, aIPList, aDomainList, sIPRestrict
  180. sOutputStr = sOutputStr & "<TABLE CELLPADDING = 0 CELLSPACING=0 >"
  181. sOutputStr = sOutputStr & "<TR>"
  182. sOutputStr = sOutputStr & "<TD WIDTH = 10>&nbsp;</TD>"
  183. sOutputStr = sOutputStr & "<TD>"
  184. sOutputStr = sOutputStr & "<TABLE CELLPADDING = 0 CELLSPACING=0 BORDER=0>"
  185. sOutputStr = sOutputStr & "<TR>"
  186. sOutputStr = sOutputStr & "<TD>&nbsp;"
  187. sOutputStr = sOutputStr & "</TD>"
  188. sOutputStr = sOutputStr & "</TR>"
  189. Select Case iThisPage
  190. Case HOW
  191. iNextPage = SUMMARY
  192. if Request("HowSet") <> "" then
  193. if cInt(Request("HowSet")) = TEMPLATEVALS then
  194. iNextPage=TEMPLATE
  195. end if
  196. end if
  197. if Session("stype")="www" then
  198. sOutputStr = sOutputStr & sRadio("HowSet", INHERITVALS, L_INHERITWEB, INHERITVALS, "clearTemplate();iNextPage=" & SUMMARY)
  199. sOutputStr = sOutputStr & sRadio("HowSet", TEMPLATEVALS, L_TEMPLATESWEB, INHERITVALS, "iNextPage=" & TEMPLATE)
  200. else
  201. sOutputStr = sOutputStr & sRadio("HowSet", INHERITVALS, L_INHERITFTP, INHERITVALS, "clearTemplate();iNextPage=" & SUMMARY)
  202. sOutputStr = sOutputStr & sRadio("HowSet", TEMPLATEVALS, L_TEMPLATESFTP, INHERITVALS, "iNextPage=" & TEMPLATE)
  203. end if
  204. Case TEMPLATE
  205. sOutputStr = sOutputStr & sSelect("Template", 5, "setTemplateDesc(this,document.userform.TemplateSample);", FALSE)
  206. if Session("stype")="www" then
  207. set oTemplates = GetObject("IIS://localhost/w3svc/info/templates")
  208. else
  209. set oTemplates = GetObject("IIS://localhost/MSFTPsvc/info/templates")
  210. end if
  211. bSelected = True
  212. for each oTemplate in oTemplates
  213. if Request("Template") <> "" then
  214. if oTemplate.ADsPath = Request("Template") then
  215. bSelected = True
  216. end if
  217. end if
  218. sOutputStr = sOutputStr & sOption(oTemplate.Name,oTemplate.ADsPath,bSelected)
  219. if bSelected then
  220. sSelDescription = oTemplate.ServerComment
  221. end if
  222. bSelected = False
  223. next
  224. sOutputStr = sOutputStr & closeSelect()
  225. sOutputStr = sOutputStr & "<TR>"
  226. sOutputStr = sOutputStr & "<TD>&nbsp;"
  227. for each oTemplate in oTemplates
  228. sOutputStr = sOutputStr & "<INPUT TYPE='hidden' NAME='" & Replace(oTemplate.Name," ","") & "' VALUE='" & oTemplate.ServerComment & "'>"
  229. next
  230. sOutputStr = sOutputStr & "</TD>"
  231. sOutputStr = sOutputStr & "</TR>"
  232. sOutputStr = sOutputStr & sTextArea("TemplateSample", L_SAMPLETEMPLATE, sSelDescription,5,55, not ENABLED)
  233. Case ACL
  234. sOutputStr = sOutputStr & sStaticText(L_RECOMMENDED,not BOLD)
  235. sOutputStr = sOutputStr & sStaticText(RECOMMENDEDACLS1,BOLD)
  236. sOutputStr = sOutputStr & sStaticText(RECOMMENDEDACLS2,BOLD)
  237. sOutputStr = sOutputStr & sRadio("ACLSet", REPLACEACLS, L_REPLACEACLS, REPLACEACLS, "")
  238. sOutputStr = sOutputStr & sSpace(1)
  239. sOutputStr = sOutputStr & sRadio("ACLSet", ADDACLS, L_ADDACLS, REPLACEACLS, "")
  240. sOutputStr = sOutputStr & sSpace(1)
  241. sOutputStr = sOutputStr & sRadio("ACLSet", NOACLS, L_NOCHANGEACLS, REPLACEACLS, "")
  242. if cInt(Request("HowSet")) = INHERITVALS then
  243. iPrevPage = HOW
  244. end if
  245. Case SUMMARY
  246. sOutputStr = sOutputStr & sStaticText(L_SUMMARYWARNING_TEXT, not BOLD)
  247. sTemplatePath = Request("Template")
  248. ' DBG
  249. ' Response.write " Request,Template - " & Request("Template") & "<BR>"
  250. if sTemplatePath = "" then
  251. sTemplatePath = sGetParentPath(Request("ADsPath"))
  252. else
  253. ' The only case when the configuration isn't available at the vdir
  254. ' is ftp authentication. Make that a special case, below.
  255. sTemplatePath = sTemplatePath & STR_SLASH_ROOT
  256. end if
  257. set oTemplate = GetObject(sTemplatePath)
  258. ' DBG
  259. ' Response.write oTemplate.ADsPath & " - " & oTemplate.Class & "<BR>"
  260. ' Response.write "ADSPath - " & Request("ADSPath") & "<BR>"
  261. sSummary = ""
  262. ' The KeyType for the template\root is not being set. Getting the
  263. ' Class will work around the problem, but setup should be changed to set
  264. ' the KeyType.
  265. if InStr(oTemplate.Class,"Web")<> 0 then
  266. 'Authentication Methods
  267. sSummary = sSummary & sAddSummaryLine(True,L_AUTHENTICATIONMETHODS)
  268. sSummary = sSummary & sAddSummaryLine(oTemplate.AuthAnonymous,INDENT &L_ANONAUTH)
  269. sSummary = sSummary & sAddSummaryLine(oTemplate.AuthBasic,INDENT &L_BASICAUTH)
  270. sSummary = sSummary & sAddSummaryLine(oTemplate.AuthNTLM,INDENT &L_NTLMAUTH)
  271. sSummary = sSummary & sAddSummaryLine(oTemplate.AuthMD5,INDENT &L_DIGESTAUTH)
  272. else
  273. ' Ftp authentication only happens on the server node
  274. Dim oTheNode, oTempTemplate
  275. set oTheNode = GetObject( Request("ADSPath") )
  276. ' DBG
  277. ' Response.write oTheNode.ADsPath & " - " & oTheNode.Class & "<BR>"
  278. if InStr(oTheNode.Class, "Server") <> 0 then
  279. if Request("Template") = "" then
  280. ' Using values from the service
  281. set oTempTemplate = oTemplate
  282. else
  283. set oTempTemplate = GetObject( Request("Template") )
  284. end if
  285. sSummary = sSummary & sAddSummaryLine( True, L_AUTHENTICATIONMETHODS )
  286. sSummary = sSummary & sAddSummaryLine( oTempTemplate.AllowAnonymous, INDENT & L_ANONAUTH )
  287. sSummary = sSummary & sAddSummaryLine( oTempTemplate.AnonymousOnly, INDENT & L_ANONONLY )
  288. end if
  289. end if
  290. 'Access Control
  291. sSummary = sSummary & sAddSummaryLine(True,L_ACCESSPERMS)
  292. sSummary = sSummary & sAddSummaryLine(oTemplate.AccessRead,INDENT & L_READACCESS)
  293. sSummary = sSummary & sAddSummaryLine(oTemplate.AccessWrite,INDENT & L_WRITEACCESS)
  294. if InStr(oTemplate.Class,"Web")<> 0 then
  295. sSummary = sSummary & sAddSummaryLine(oTemplate.AccessSource and oTemplate.AccessRead,INDENT & L_SOURCEREADACCESS)
  296. sSummary = sSummary & sAddSummaryLine(oTemplate.AccessSource and oTemplate.AccessWrite,INDENT & L_SOURCEWRITEACCESS)
  297. sSummary = sSummary & sAddSummaryLine(oTemplate.AccessScript, INDENT & L_SCRIPTACCESS)
  298. sSummary = sSummary & sAddSummaryLine(oTemplate.AccessExecute, INDENT & L_EXECUTEACCESS)
  299. ' sSummary = sSummary & sAddSummaryLine(oTemplate.EnableDirBrowsing,INDENT & L_DIRBROWSE)
  300. end if
  301. ' IP Restrictions
  302. sSummary = sSummary & L_IPSECURITY & L_RETURN
  303. Set oIPSec = oTemplate.IPSecurity
  304. bGrantByDefault = oIPSec.GrantByDefault
  305. if bGrantByDefault then
  306. sSummary = sSummary & INDENT & L_IPSECGRANTDEFAULT & L_RETURN
  307. aIPList = oIPSec.IPDeny
  308. aDomainList = oIPSec.DomainDeny
  309. sIPRestrict = L_IPSECDENIED
  310. else
  311. sSummary = sSummary & INDENT & L_IPSECDENYDEFAULT & L_RETURN
  312. aIPList = oIPSec.IPGrant
  313. aDomainList = oIPSec.DomainGrant
  314. sIPRestrict = L_IPSECGRANTED
  315. end if
  316. if IsArray( aDomainList ) then
  317. for i = LBound(aDomainList) to UBound(aDomainList)
  318. sSummary = sSummary & INDENT & Replace( sIPRestrict, STR_SUBST, aDomainList(i), 1, 1 ) & L_RETURN
  319. next
  320. end if
  321. if IsArray( aIPList ) then
  322. for i = LBound(aIPList) to UBound(aIPList)
  323. sSummary = sSummary & INDENT & Replace( sIPRestrict, STR_SUBST, sGetIPString(aIPList(i)), 1, 1 ) & L_RETURN
  324. next
  325. end if
  326. sOutputStr = sOutputStr & sTextArea("SummaryArea", "", sSummary, L_SUMMARYROWS_NUM, L_SUMMARYCOLS_NUM, not ENABLED)
  327. if cInt(Request("HowSet")) = INHERITVALS then
  328. iPrevPage = HOW
  329. end if
  330. End Select
  331. sOutputStr = sOutputStr + "</TABLE>"
  332. sOutputStr = sOutputStr & "</TD>"
  333. sOutputStr = sOutputStr & "</TR>"
  334. sOutputStr = sOutputStr & "</TABLE>"
  335. sWritePage = sOutputStr
  336. End Function
  337. '***************Optional Custom Functions***************
  338. Function sAddSummaryLine(bAddIt,sText)
  339. Dim sSummLine
  340. sSummLine = ""
  341. if bAddIt then
  342. sSummLine = sText & L_RETURN
  343. end if
  344. sAddSummaryLine = sSummLine
  345. End Function
  346. Function sGetParentPath(sCurPath)
  347. Dim sParentPath
  348. sParentPath = Left(sCurPath,InStrRev(sCurPath,"/")-1)
  349. if len(sParentPath)+1 = len(sCurPath) then
  350. sParentPath = Left(sCurPath,InStrRev(sCurPath,"/")-1)
  351. end if
  352. sGetParentPath = sParentPath
  353. End Function
  354. Function sGetNextInstanceName(iSiteType)
  355. On Error Resume Next
  356. Dim oService,oInst, sInstName
  357. Set oService=GetObject(BASEPATH & SERVICES(iSiteType))
  358. For Each oInst In oService
  359. if isNumeric(oInst.Name) and oInst.Name > sInstName then
  360. sInstName=oInst.Name
  361. end if
  362. Next
  363. sGetNextInstanceName=cInt(sInstName)+1
  364. End Function
  365. 'Return an appropriately formated keytype
  366. Function sGetKeyType(iSiteType, iNodeType)
  367. Dim sSvcKey
  368. sSvcKey = SERVICES(iSiteType)
  369. Select Case iNodeType
  370. Case SITE
  371. sGetKeyType=IIS & sSvcKey & SSITE
  372. Case VDIR
  373. sGetKeyType=IIS & sSvcKey & SVDIR
  374. Case DIR
  375. sGetKeyType=IIS & sSvcKey & SDIR
  376. End Select
  377. End Function
  378. 'this is a goofy function to fix the session type we get passed in.
  379. 'these have gotten really out of hand. Should go through entire
  380. 'system and fix this, so that if we are referincing the site type
  381. 'it is ALWAYS W3SVC or MSFTPSVC... not sometimes web, sometimes www
  382. 'and sometimes w3svc... ick. sorry.
  383. Function fixSiteType(sessionSite)
  384. sessionSite = LCase(sessionSite)
  385. if sessionSite = "ftp" then
  386. fixSiteType = 1
  387. end if
  388. if sessionSite = "www" then
  389. fixSiteType = 0
  390. end if
  391. End Function
  392. Function sGetPhysPath(oParentNode, sDirName)
  393. Dim sParentType, sNewPath, sBasePath
  394. 'The physical directory may not currently
  395. 'exist in the metabase, so we have
  396. 'to find the parent vdir associated with
  397. 'the dir and build the path from there.
  398. sParentType = oParentNode.KeyType
  399. sNewPath = sDirName
  400. sBasePath = oParentNode.ADsPath
  401. Do Until Instr(sParentType, SVDIR) <> 0
  402. 'we need clear our path not found error..
  403. err = 0
  404. 'add our initial whack...
  405. sNewPath = "/" + sNewPath
  406. 'and cyle through the baseobj till we find the next whack,
  407. 'building up the path in new name as we go
  408. Do Until Right(sBasePath,1) = "/"
  409. sNewPath = Right(sBasePath,1) & sNewPath
  410. sBasePath = Mid(sBasePath,1,Len(sBasePath)-1)
  411. Loop
  412. 'once we're out, we need to lop off the last whack...
  413. sBasePath = Mid(sBasePath,1,Len(sBasePath)-1)
  414. 'and try to set the object again...
  415. Set oParentNode=GetObject(sBasePath)
  416. if err <> 0 then
  417. sParentType = ""
  418. else
  419. sParentType=oParentNode.KeyType
  420. end if
  421. Loop
  422. sGetPhysPath = oParentNode.Path & "\" & sNewPath
  423. err.clear
  424. End Function
  425. function sGetIPString(bindstr)
  426. dim one, ip, sn
  427. one=Instr(bindstr,",")
  428. if one > 0 then
  429. ip=Trim(Mid(bindstr,1,(one-1)))
  430. sn=Trim(Mid(bindstr,(one+1)))
  431. if sn = "255.255.255.255" then
  432. sn = ""
  433. end if
  434. if sn <> "" then
  435. ip = ip & " (" & sn & ")"
  436. end if
  437. else
  438. ip=bindstr
  439. end if
  440. sGetIPString = ip
  441. end function
  442. '***************End***************
  443. %>
  444. <html>
  445. <head>
  446. <title><%= L_WIZARD_TEXT %></title>
  447. <%= SCRIPT %>
  448. function bNextPageOk()
  449. {
  450. return true;
  451. }
  452. function setTemplateDesc(selControl,descControl)
  453. {
  454. selControlText = new String(selControl.options[selControl.selectedIndex].text)
  455. selControlText = myReplace(selControlText," ","");
  456. descControl.value = document.userform[selControlText].value;
  457. }
  458. function clearTemplate()
  459. {
  460. document.userform.Template.value = "";
  461. }
  462. function myReplace(sCntrl,sToReplace,sReplaceWith)
  463. {
  464. <% 'Jscript 3.0 doesn't support the standard replace funciton... %>
  465. sNew = ""
  466. for (i=0;i<=sCntrl.length;i++)
  467. {
  468. if (sCntrl.substring(i,i+1) == sToReplace)
  469. {
  470. sNew += sReplaceWith;
  471. }
  472. else
  473. {
  474. sNew += sCntrl.substring(i,i+1);
  475. }
  476. }
  477. return sNew;
  478. }
  479. <%= CLOSESCRIPT %>
  480. </head>
  481. <body bgcolor="#CCCCCC" topmargin=0 leftmargin=0>
  482. <% if Session("IsIE") and Session("browserver") < 4 then %>
  483. <table border = 1 width="100%" height="100%" cellpadding=0 cellspacing=0>
  484. <% else %>
  485. <table border = 0 width="100%" height="100%" cellpadding=0 cellspacing=0>
  486. <% end if %>
  487. <form name="userform" method="POST" action="iiwizsec.asp"><!-- data persistences --><!--#include file="iiwizsec.dat"--><!-- end data persistences -->
  488. <% Select Case iThisPage %>
  489. <% Case WELCOME %>
  490. <tr>
  491. <td bgcolor="teal" height=310 width = 163>
  492. <IMG SRC="images/Website.gif" WIDTH=163 HEIGHT=312>
  493. </td>
  494. <td bgcolor="White" ALIGN=left VALIGN=top>
  495. <TABLE CELLPADDING = 2 CELLSPACING=0 >
  496. <TR>
  497. <TD COLSPAN = 2>&nbsp;
  498. </TD>
  499. </TR>
  500. <TR>
  501. <TD WIDTH = 18>&nbsp;
  502. </TD>
  503. <TD>
  504. <%= sWriteWelcome() %>
  505. </TD>
  506. </TR>
  507. </TABLE>
  508. </td>
  509. </tr>
  510. <% Case FINISH %>
  511. <%
  512. ' We need to use a finish page not only to make this consistent with MMC,
  513. ' but also to allow the iiclone.asp script to execute. If the dialog is
  514. ' dismissed in sFinish() the iiclone script may not complete if it is called
  515. ' twice.
  516. %>
  517. <tr>
  518. <td height=315 width = 164><IMG SRC="images/website.gif" BORDER=0 HSPACE=0 VSPACE=0></td>
  519. <td bgcolor="White" ALIGN=left VALIGN=top>
  520. <TABLE CELLPADDING = 2 CELLSPACING=0>
  521. <TR>
  522. <TD COLSPAN = 2>&nbsp;
  523. </TD>
  524. </TR>
  525. <TR>
  526. <TD WIDTH = 18>&nbsp;
  527. </TD>
  528. <TD>
  529. <%= sFinish() %>
  530. <%= sWriteFinish() %>
  531. </TD>
  532. </TR>
  533. </TABLE>
  534. </td>
  535. </tr>
  536. <% Case Else %>
  537. <tr>
  538. <TD HEIGHT=315 COLSPAN = 2 VALIGN="top">
  539. <TABLE WIDTH = 100% cellspacing=0 cellpadding=0 cellspacing=0>
  540. <tr bgcolor="#FFFFFF">
  541. <td bgcolor="#FFFFFF" width = 10>&nbsp;</td>
  542. <td bgcolor="#FFFFFF" height = 59 ALIGN=left VALIGN=top>
  543. <%= sWriteTitle(iThisPage) %>
  544. </td>
  545. </tr>
  546. <tr>
  547. <td height = 1 colspan = 2 bgcolor="Gray"></td>
  548. </tr>
  549. <tr>
  550. <td height = 1 colspan = 2 bgcolor="White"></td>
  551. </tr>
  552. <tr>
  553. <td>&nbsp;</td>
  554. <td height=220 ALIGN=left VALIGN=top>
  555. <%= sWritePage(iThisPage) %>
  556. </td>
  557. </tr>
  558. </TABLE>
  559. </TD>
  560. </TR>
  561. <% end Select %>
  562. <% if Session("IsIE") and Session("browserver") < 4 then %>
  563. <% ' IE3 doesn't do the line well... we're using table-borders instead. %>
  564. <% else %>
  565. <tr>
  566. <td height = 1 colspan = 2 bgcolor="Gray"></td>
  567. </tr>
  568. <tr>
  569. <td height = 1 colspan = 2 bgcolor="White"></td>
  570. </tr>
  571. <% end if %>
  572. <!-- generic wizard buttons -->
  573. <!--#include file="iiwizbtns.inc"-->
  574. </table>
  575. </blockquote>
  576. </form>
  577. </body>
  578. </html>
  579. <% end if %>