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.

309 lines
14 KiB

  1. <%@ Language=VBScript %>
  2. <% Option Explicit %>
  3. <!-- #include file="sh_page.asp" -->
  4. <% '==================================
  5. ' Tab bar page - Chameleon Server Appliance
  6. '
  7. '
  8. ' Copyright (c) 1999 - 2000 Microsoft Corporation. All rights reserved.
  9. '==================================
  10. Dim mintTab
  11. Dim mstrActiveTextColor
  12. Dim mstrInactiveTextColor
  13. Dim mstrActiveTabColor
  14. Dim mstrInactiveTabColor
  15. Dim mstrCaptionText
  16. Dim marrTextColor()
  17. Dim marrTabColor()
  18. Dim marrTabText()
  19. Dim marrTabURL()
  20. Dim marrTabStyle()
  21. Dim i
  22. Dim intTabCount
  23. Dim objItem
  24. Dim objElements
  25. Dim intCaptionIDNav
  26. On Error Resume Next
  27. Response.Buffer = True
  28. Set objLocMgr = Server.CreateObject("ServerAppliance.LocalizationManager")
  29. strSourceName = "sakitmsg.dll"
  30. if Err.number <> 0 then
  31. Response.Write "Error in localizing the web content "
  32. Response.End
  33. end if
  34. '-----------------------------------------------------
  35. 'START of localization content
  36. Dim L_HELPTOOLTIP_TEXT
  37. Dim L_HELP_TEXT
  38. Dim L_HELPLABEL_TEXT
  39. Dim L_HELPWINNAME
  40. Dim L_ABOUTMENU_WINDOWS_TEXT
  41. L_HELPTOOLTIP_TEXT = objLocMgr.GetString(strSourceName, "&H40010019",varReplacementStrings)
  42. L_HELP_TEXT= objLocMgr.GetString(strSourceName, "&H4001001A",varReplacementStrings)
  43. L_HELPLABEL_TEXT= objLocMgr.GetString(strSourceName, "&H4001001B",varReplacementStrings)
  44. L_HELPWINNAME = objLocMgr.GetString(strSourceName, "&H4001001C",varReplacementStrings)
  45. L_ABOUTMENU_WINDOWS_TEXT = objLocMgr.GetString(strSourceName, "&H4001001D",varReplacementStrings)
  46. 'End of localization content
  47. '-----------------------------------------------------
  48. ' Constant color values
  49. mstrActiveTabColor = "#CCCCFF"
  50. mstrInactiveTabColor = "#7B7B7B"
  51. mstrActiveTextColor = "#000000"
  52. mstrInactiveTextColor = "#CCCC99"
  53. Set objElements = GetElements("TABS")
  54. intTabCount = objElements.Count
  55. If Err <> 0 Then
  56. intTabCount = 0
  57. End If
  58. Set objLocMgr = Server.CreateObject("ServerAppliance.LocalizationManager")
  59. ReDim marrTextColor(intTabCount)
  60. ReDim marrTabColor(intTabCount)
  61. ReDim marrTabText(intTabCount)
  62. ReDim marrTabURL(intTabCount)
  63. ReDim marrTabStyle(intTabCount)
  64. i = 0
  65. For Each objItem in objElements
  66. ' Tab caption and URL values:
  67. intCaptionIDNav = "&H" & objItem.GetProperty("CaptionRID")
  68. strSourceName = ""
  69. strSourceName = objItem.GetProperty ("Source")
  70. If strSourceName = "" Then
  71. strSourceName = "svrapp"
  72. End If
  73. marrTabText(i) = objLocMgr.GetString(strSourceName, intCaptionIDNav, varReplacementStrings)
  74. marrTabURL(i) = objItem.GetProperty("URL")
  75. marrTextColor(i) = mstrInactiveTextColor
  76. marrTabColor(i) = mstrInactiveTabColor
  77. marrTabStyle(i) = "INACTIVETAB"
  78. i = i + 1
  79. Next
  80. Set objElements = Nothing
  81. Set objItem = Nothing
  82. 'QUERY parms:
  83. mintTab = Request("Tab") ' mintTab Values: integer 0 to n
  84. If mintTab <> "" Then
  85. mintTab = CInt(mintTab)
  86. marrTextColor(mintTab) = mstrActiveTextColor
  87. marrTabColor(mintTab) = mstrActiveTabColor
  88. marrTabStyle(mintTab) = "ACTIVETAB"
  89. End If
  90. %>
  91. <html>
  92. <!-- Copyright (c) 1999 - 2000 Microsoft Corporation. All rights reserved-->
  93. <head>
  94. <base target="middle">
  95. <title>Tab bar</title>
  96. <link rel="STYLESHEET" type="text/css" href="sh_page.css">
  97. <script language=JavaScript src="sh_page.js"></script>
  98. <SCRIPT language=JavaScript>
  99. var intCurrentTab;
  100. intCurrentTab = "<% =mintTab %>";
  101. function GetTabURL(newTab) {
  102. var arrTabURL = new Array();
  103. <% For i = 0 to intTabCount-1
  104. If Left(Trim(marrTabURL(i)),1) <> "/" Then
  105. marrTabURL(i) = "/" & Trim(marrTabURL(i))
  106. End If
  107. Response.Write "arrTabURL[" & i & "]='" & marrTabURL(i) & "'; "
  108. Next %>
  109. return arrTabURL[newTab] + "?R=" + Math.random();
  110. }
  111. function ClickTab(newTab) {
  112. var arrTabURL = new Array();
  113. <% For i = 0 to intTabCount-1
  114. If Left(Trim(marrTabURL(i)),1) <> "/" Then
  115. marrTabURL(i) = "/" & Trim(marrTabURL(i))
  116. End If
  117. Response.Write "arrTabURL[" & i & "]='" & marrTabURL(i) & "'; "
  118. Next %>
  119. parent.middle.window.location = arrTabURL[newTab] + "?R=" + Math.random();
  120. }
  121. function ClickAbout() {
  122. if (top.main.middle.location.pathname != '/about.asp') {
  123. top.main.middle.location='about.asp?ReturnURL='+top.main.middle.location.pathname + "&R=" + Math.random();
  124. }
  125. }
  126. function Init() {
  127. if (window == window.parent) {
  128. window.location = "http://<% =Request.ServerVariables("SERVER_NAME") %>";
  129. }
  130. }
  131. function OpenHelpMenu() {
  132. var winHelp;
  133. var strOptions;
  134. var strIEModalOptions;
  135. var HELPWINNAME = "<%=L_HELPWINNAME%>";
  136. var L_ABOUTMENU_TEXT = "<%=L_ABOUTMENU_WINDOWS_TEXT%>";
  137. var winMenuTarget = parent.middle;
  138. var strMenuWidth = 247;
  139. var strMenuLeft;
  140. //strMenuWidth = "247px";
  141. strOptions = "height=250,width=175,location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0";
  142. strOptions += ",left=200,top=50";
  143. strIEModalOptions = "center:1;maximize:0;minimize:0;help:0;status:0;dialogWidth:200px;dialogHeight:290px;resizable:0;";
  144. if (IsIE()) {
  145. if (winMenuTarget.document.readyState!='complete')
  146. return;
  147. var strMenuHTML;
  148. strMenuLeft = document.body.clientWidth - strMenuWidth - 5;
  149. var divMenu = winMenuTarget.document.all("divMenu");
  150. if (divMenu == null) {
  151. strMenuHTML = '<div ID="divMenu" class="MENU" nowrap style="position:absolute; left:' + strMenuLeft + '; width:' + strMenuWidth + '; top:2px; visibility:hidden;Filter:revealTrans(duration=0.25,transition=5);"';
  152. strMenuHTML += ' onMouseOut="';
  153. strMenuHTML += "if (window.event.clientX < this.offsetLeft || window.event.clientX >= this.offsetLeft+this.offsetWidth || window.event.clientY > this.offsetHeight) this.style.display='none';" + '"';
  154. strMenuHTML += ' onkeydown="';
  155. strMenuHTML += "if (window.event.keyCode == 27) { this.style.display='none';} " + '"' ;
  156. strMenuHTML += '>';
  157. // Help link uses LaunchHelp() in the sh_page.js library
  158. strMenuHTML += '<a href="#" ' +
  159. 'onClick="LaunchHelp();" ' +
  160. 'onfocus="spanHelp1.className=' + "'" + "MENUhover" + "'" + ';" ' +
  161. 'onblur="spanHelp1.className=' + "'" + "MENU" + "'" + ';" ' +
  162. 'onkeydown = "if (window.event.keyCode == 13) {LaunchHelp();}" ' +
  163. '>' +
  164. '<div ' +
  165. 'class="MENU" ' +
  166. 'ID="spanHelp1" ' +
  167. 'onMouseOver="this.className=' + "'" + "MENUhover" + "'" + ';" ' +
  168. 'onMouseOut="this.className=' + "'" + "MENU" + "'" + ';" ' +
  169. '>' +
  170. '&nbsp;<% =L_HELPLABEL_TEXT %></div></a>';
  171. <% Set objElements = GetElements("MS_Help")
  172. For Each objItem in objElements
  173. intCaptionIDNav = "&H" & objItem.GetProperty("CaptionRID")
  174. strSourceName = ""
  175. strSourceName = objItem.GetProperty ("Source")
  176. If strSourceName = "" Then
  177. strSourceName = "svrapp"
  178. End If
  179. mstrCaptionText = objLocMgr.GetString(strSourceName, intCaptionIDNav, varReplacementStrings)
  180. If mstrCaptionText <> "" Then %>
  181. strMenuHTML += '<a href="#"' +
  182. 'onfocus="x.className=' + "'" + "MENUhover" + "'" + ';" ' +
  183. 'onblur="x.className=' + "'" + "MENU" + "'" + ';" ' +
  184. 'onkeydown = "if (window.event.keyCode == 13) {window.open(' + "'" + '<% =objItem.GetProperty("URL") %>' + "'" + ');}"' +
  185. '>';
  186. strMenuHTML += '<div ID="x" class="MENU" onMouseOver="this.className=' + "'" + "MENUhover" + "'" + ';" onMouseOut="this.className=' + "'" + "MENU" + "'" + ';" onClick="window.open(' + "'" + '<% =objItem.GetProperty("URL") %>' + "'" + ');">';
  187. strMenuHTML += '&nbsp;<% =mstrCaptionText %></div></A>';
  188. <% End If
  189. Next
  190. Set objElements = Nothing
  191. Set objItem = Nothing %>
  192. strMenuHTML += '<div style="font-size:1px;line-height:1;background-color:#FFFFFF;width:100%">&nbsp;</div>';
  193. strMenuHTML += '<a href="#" ' +
  194. 'onfocus="spanHelp2.className=' + "'" + "MENUhover" + "'" + ';" ' +
  195. 'onblur="spanHelp2.className=' + "'" + "MENU" + "'" + ';" ' +
  196. 'onkeydown = "if (window.event.keyCode == 13) {window.open(' + "'/about.asp'" + '); }" ' +
  197. '>'+
  198. '<div ' +
  199. 'class="MENU" ' +
  200. 'ID="spanHelp2" ' +
  201. 'onMouseOver="this.className=' + "'" + "MENUhover" + "'" + ';" ' +
  202. 'onMouseOut="this.className=' + "'" + "MENU" + "'" + ';" ' +
  203. 'onClick="window.open(';
  204. strMenuHTML += "'http://<% =GetServerName() %>/about.asp','about_asp','height=400,width=530,left=30,top=15,location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0'";
  205. strMenuHTML += ');">&nbsp;' + L_ABOUTMENU_TEXT + '</div></A>';
  206. strMenuHTML += '</div>';
  207. strMenuHTML += '<IFRAME ID=launchWin WIDTH=10 HEIGHT=10 style="display:none;" SRC=""></IFRAME>';
  208. winMenuTarget.document.body.insertAdjacentHTML('beforeEnd',strMenuHTML); // beforeEnd
  209. divMenu = winMenuTarget.document.all("divMenu");
  210. }
  211. else {
  212. divMenu.style.left=strMenuLeft;
  213. divMenu.style.display="";
  214. }
  215. divMenu.style.left = document.body.clientWidth - divMenu.clientWidth - 5;
  216. divMenu.style.visibility = "visible";
  217. divMenu.focus();
  218. }
  219. else {
  220. // Navigator code
  221. parent.middle.document.menu.moveTo(parent.middle.innerWidth - 247, 0);
  222. parent.middle.document.menu.visibility = "show";
  223. }
  224. }
  225. </Script>
  226. </head>
  227. <body onload="Init();" onDragDrop="return false;" oncontextmenu="return false;" topmargin="0" leftmargin="0" class="TABBAR">
  228. <base target="_self">
  229. <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" ID=TABTABLE>
  230. <% If IsIE Then %>
  231. <tr>
  232. <td width="100%" height="5" colspan=<% =intTabCount*3 + 5 %>></td>
  233. </tr>
  234. <% End If %>
  235. <tr>
  236. <td width="15" nowrap>&nbsp;</td>
  237. <% 'TAB LOOP
  238. If intTabCount = 0 Then %>
  239. <TD colspan=3 nowrap bgcolor="#000000" class="TABLINK">
  240. ----------
  241. </TD>
  242. <% Else
  243. For i = 0 to intTabCount-1 %>
  244. <td height="25" align=right valign=middle nowrap class="<% =marrTabStyle(i) %>">
  245. <a href="#" class="<% =marrTabStyle(i) %>"
  246. onclick="ClickTab(<% =i %>);"
  247. onMouseOver="window.status='';return true;">
  248. &nbsp;&nbsp;&nbsp;&nbsp;<% =marrTabText(i) %>&nbsp;</a>
  249. </td>
  250. <TD class="<% =marrTabStyle(i) %>">
  251. <% If marrTabColor(i) = mstrActiveTabColor Then %>
  252. <IMG src="images/light_spacer.gif" border=0>
  253. <% Else %>
  254. <IMG src="images/dark_spacer.gif" border=0>
  255. <% End If %>
  256. </TD><td width="5" nowrap>&nbsp;</td>
  257. <% Next
  258. End If%>
  259. <td nowrap valign="middle" align="center" width="100%">&nbsp;</td>
  260. <td width="25" nowrap valign=middle align="center"></td>
  261. <td nowrap valign=middle align=right class="tablink">
  262. <a href="#" style="color:silver;font-size:15pt;font-weight:bold;text-decoration:none;"
  263. class="TABLINK"
  264. title="<% =L_HELPTOOLTIP_TEXT %>"
  265. onClick="OpenHelpMenu();return false;"
  266. onMouseOver="window.status='<% =L_HELPTOOLTIP_TEXT %>';return true;">
  267. <img src="images/help_about.gif" border=0 height=22 width=22>
  268. </A>
  269. &nbsp;&nbsp;
  270. <A href="http://www.microsoft.com/Windows/ServerAppliance" target="_blank">
  271. <img src="images/winnte_logo.gif" border=0 height=22></A>
  272. &nbsp;
  273. </td>
  274. <td width="10" nowrap valign="middle" align="right">&nbsp;</td>
  275. </tr>
  276. <tr>
  277. <td width="100%" height="8" colspan=<% =intTabCount*3 + 5 %> class="ACTIVETAB"><% If Not IsIE Then Response.Write "&nbsp;" %></td>
  278. </tr>
  279. </table>
  280. </body>
  281. </html>