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.

354 lines
15 KiB

  1. <%@ Language=VBScript %>
  2. <% Option Explicit %>
  3. <!-- #include file="sh_page.asp" -->
  4. <!-- #include file="embed/StatusTab_embed.asp" -->
  5. <% ' ================================================
  6. ' Default tabs Page
  7. '
  8. ' (c) 2000 Microsoft Corporation. All rights reserved.
  9. ' ================================================
  10. Dim L_TASKSLBL_TEXT
  11. Dim L_PAGETITLE_TEXT
  12. Dim L_NOTASKS_MESSAGE
  13. Dim mstrPageName
  14. Dim mintPageIndex
  15. Dim mobjElements
  16. Dim mobjTab
  17. Dim mstrContainer
  18. Dim mstrTabContainer
  19. Dim mstrGraphic
  20. Dim mstrHeaderLabel
  21. Dim mstrSource
  22. Dim mintPos
  23. Class Test
  24. Dim intType
  25. Public Property Set Hype(inputVal)
  26. End Property
  27. 'Public Property Let Type(intType)
  28. ' intType = intType
  29. 'End Property
  30. Private Sub Test_Initialize()
  31. intType = 1
  32. End Sub
  33. End Class
  34. Dim objTest
  35. Set objTest = new Test
  36. 'HandleServerError
  37. On Error Resume Next
  38. L_PAGETITLE_TEXT = "Windows for Express Networks"
  39. L_TASKSLBL_TEXT = "tasks"
  40. L_NOTASKS_MESSAGE = "No tasks available"
  41. mstrTabContainer = "TABS"
  42. 'Get query parms
  43. mstrPageName = Trim(Request("PN"))
  44. mintPageIndex = CInt(Request("PI"))
  45. 'response.write "mintPageIndex: " & mintPageIndex
  46. mintPos = 0
  47. Set mobjElements = GetElements(mstrTabContainer)
  48. For Each mobjTab in mobjElements
  49. If mintPageIndex = mintPos Then
  50. mstrContainer = mobjTab.GetProperty("ElementID")
  51. mstrGraphic = mobjTab.GetProperty("ElementGraphic")
  52. mstrSource = ""
  53. mstrSource = mobjTab.GetProperty("Source")
  54. mstrHeaderLabel = GetLocString(mstrSource, mobjTab.GetProperty("CaptionRID"), "")
  55. Exit For
  56. End If
  57. mintPos = mintPos + 1
  58. Next
  59. Set mobjElements = Nothing
  60. 'response.write "mintPageIndex: " & mintPageIndex
  61. %>
  62. <html>
  63. <!-- (c) 1999 Microsoft Corporation. All rights reserved.-->
  64. <head>
  65. <base target="middle">
  66. <title><% =L_PAGETITLE_TEXT %></title>
  67. <script language=JavaScript src="sh_page.js"></script>
  68. <link rel="STYLESHEET" type="text/css" href="sh_page.css">
  69. <script language=JavaScript>
  70. function Init() {
  71. }
  72. </script>
  73. </head>
  74. <body onload="Init();" onDragDrop="return false;" xxoncontextmenu="return false;" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
  75. <%
  76. ServePageWaterMark mstrGraphic
  77. ServeTabBar mstrTabContainer
  78. Response.Write "<BR>"
  79. ServeStandardLabelBar(mstrHeaderLabel)
  80. ServeElementBlock mstrContainer, L_NOTASKS_MESSAGE, True, True, False
  81. response.write "<BR><a href='ms_disk/disk_home.asp'>Backup and restore files</a><BR><BR>"
  82. response.write "<a href='ms_disk/disk_setup2.asp'>Setup disks</a>"
  83. Response.Write "</body></html>"
  84. Response.End
  85. Function ServeTabBar(TabContainer)
  86. '==================================
  87. 'Tab bar page - Chameleon Server Appliance
  88. '
  89. '
  90. ' (c) 1999 Microsoft Corporation. All rights reserved.
  91. '==================================
  92. Dim mintTab
  93. Dim mstrActiveTextColor
  94. Dim mstrInactiveTextColor
  95. Dim mstrActiveTabColor
  96. Dim mstrInactiveTabColor
  97. Dim mstrCaptionText
  98. Dim marrTextColor()
  99. Dim marrTabColor()
  100. Dim marrTabText()
  101. Dim marrTabURL()
  102. Dim marrTabStyle()
  103. Dim i
  104. Dim intTabCount
  105. Dim objItem
  106. Dim objElements
  107. Dim intCaptionIDNav
  108. Dim strSource
  109. Dim L_HELPTOOLTIP_TEXT
  110. Dim L_HELP_TEXT
  111. Dim L_HELPLABEL_TEXT
  112. 'HandleServerError
  113. On Error Resume Next
  114. Response.Buffer = True
  115. L_HELPTOOLTIP_TEXT = "Displays Help menu."
  116. L_HELP_TEXT = "?"
  117. L_HELPLABEL_TEXT = "Windows for Express Networks Help"
  118. ' Constant color values
  119. mstrActiveTabColor = "#CCCCFF"
  120. mstrInactiveTabColor = "#7B7B7B"
  121. mstrActiveTextColor = "#000000"
  122. mstrInactiveTextColor = "#CCCC99"
  123. 'response.write "TabContainer: " & TabContainer
  124. Set objElements = GetElements(TabContainer)
  125. intTabCount = objElements.Count
  126. If Err <> 0 Then
  127. intTabCount = 0
  128. End If
  129. Set objLocMgr = Server.CreateObject("ServerAppliance.LocalizationManager")
  130. ReDim marrTextColor(intTabCount)
  131. ReDim marrTabColor(intTabCount)
  132. ReDim marrTabText(intTabCount)
  133. ReDim marrTabURL(intTabCount)
  134. ReDim marrTabStyle(intTabCount)
  135. i = 0
  136. For Each objItem in objElements
  137. strSource = ""
  138. strSource = objItem.GetProperty("Source")
  139. marrTabText(i) = GetLocString(strSource, objItem.GetProperty("CaptionRID"), "")
  140. marrTabURL(i) = GetScriptFileName & "?PI=" & i 'objItem.GetProperty("URL")
  141. marrTextColor(i) = mstrInactiveTextColor
  142. marrTabColor(i) = mstrInactiveTabColor
  143. marrTabStyle(i) = "INACTIVETAB"
  144. i = i + 1
  145. Next
  146. Set objElements = Nothing
  147. Set objItem = Nothing
  148. mintTab = mintPageIndex 'carried down from main routine
  149. mintTab = CInt(mintTab)
  150. marrTextColor(mintTab) = mstrActiveTextColor
  151. marrTabColor(mintTab) = mstrActiveTabColor
  152. marrTabStyle(mintTab) = "ACTIVETAB"
  153. %>
  154. <!-- (c) 1999 Microsoft Corporation. All rights reserved.-->
  155. <SCRIPT language=JavaScript>
  156. var intCurrentTab;
  157. intCurrentTab = "<% =mintTab %>";
  158. var arrTabURL = new Array();
  159. <% For i = 0 to intTabCount-1
  160. If Left(Trim(marrTabURL(i)),1) <> "/" Then
  161. marrTabURL(i) = "/" & Trim(marrTabURL(i))
  162. End If
  163. Response.Write "arrTabURL[" & i & "]='" & marrTabURL(i) & "'; "
  164. Next %>
  165. function GetTabURL(newTab) {
  166. return arrTabURL[newTab] + "?R=" + Math.random();
  167. }
  168. function ClickTab(newTab) {
  169. window.location = arrTabURL[newTab]; // + "&R=" + Math.random();
  170. }
  171. function OpenHelpMenu() {
  172. var winHelp;
  173. var strOptions;
  174. var strIEModalOptions;
  175. var HELPWINNAME = "ExpressNetwork_Help";
  176. var L_ABOUTMENU_TEXT = "About Windows for Express Networks";
  177. var winMenuTarget = this; //parent.middle;
  178. var strMenuWidth = 230;
  179. var strMenuLeft;
  180. if (winMenuTarget.document.readyState!='complete')
  181. return;
  182. strMenuLeft = document.body.clientWidth - strMenuWidth - 5;
  183. strMenuWidth = "247px";
  184. strOptions = "height=250,width=175,location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0";
  185. strOptions += ",left=200,top=55";
  186. strIEModalOptions = "center:1;maximize:0;minimize:0;help:0;status:0;dialogWidth:200px;dialogHeight:290px;resizable:0;";
  187. if (IsIE()) {
  188. var strMenuHTML;
  189. var divMenu = winMenuTarget.document.all("divMenu");
  190. if (divMenu == null) {
  191. strMenuHTML = '<div ID="divMenu" class="MENU" nowrap style="position:absolute; left:' + strMenuLeft + '; width:' + strMenuWidth + '; top:40px; visibility:hidden;Filter:revealTrans(duration=0.25,transition=5);"';
  192. strMenuHTML += ' onMouseOut="';
  193. strMenuHTML += "if (window.event.clientX < this.offsetLeft || window.event.clientX >= this.offsetLeft+this.offsetWidth || window.event.clientY > this.offsetHeight) this.style.display='none';" + '"';
  194. strMenuHTML += ' onkeydown="';
  195. strMenuHTML += "if (window.event.keyCode == 27) { this.style.display='none';} " + '"' ;
  196. strMenuHTML += '>';
  197. // Help link uses LaunchHelp() in the sh_page.js library
  198. strMenuHTML += '<a href="#" ' +
  199. 'onClick="LaunchHelp();" ' +
  200. 'onfocus="spanHelp1.className=' + "'" + "MENUhover" + "'" + ';" ' +
  201. 'onblur="spanHelp1.className=' + "'" + "MENU" + "'" + ';" ' +
  202. 'onkeydown = "if (window.event.keyCode == 13) {LaunchHelp();}" ' +
  203. '>' +
  204. '<div ' +
  205. 'class="MENU" ' +
  206. 'ID="spanHelp1" ' +
  207. 'onMouseOver="this.className=' + "'" + "MENUhover" + "'" + ';" ' +
  208. 'onMouseOut="this.className=' + "'" + "MENU" + "'" + ';" ' +
  209. '>' +
  210. '&nbsp;<% =L_HELPLABEL_TEXT %></div></a>';
  211. <% Set objElements = GetElements("MS_Help")
  212. For Each objItem in objElements
  213. intCaptionIDNav = "&H" & objItem.GetProperty("CaptionRID")
  214. strSourceName = ""
  215. strSourceName = objItem.GetProperty ("Source")
  216. If strSourceName = "" Then
  217. strSourceName = "svrapp"
  218. End If
  219. mstrCaptionText = objLocMgr.GetString(strSourceName, intCaptionIDNav, varReplacementStrings)
  220. If mstrCaptionText <> "" Then %>
  221. strMenuHTML += '<a href="#"' +
  222. 'onfocus="x.className=' + "'" + "MENUhover" + "'" + ';" ' +
  223. 'onblur="x.className=' + "'" + "MENU" + "'" + ';" ' +
  224. 'onkeydown = "if (window.event.keyCode == 13) {window.open(' + "'" + '<% =objItem.GetProperty("URL") %>' + "'" + ');}"' +
  225. '>';
  226. strMenuHTML += '<div ID="x" class="MENU" onMouseOver="this.className=' + "'" + "MENUhover" + "'" + ';" onMouseOut="this.className=' + "'" + "MENU" + "'" + ';" onClick="window.open(' + "'" + '<% =objItem.GetProperty("URL") %>' + "'" + ');">';
  227. strMenuHTML += '&nbsp;<% =mstrCaptionText %></div></A>';
  228. <% End If
  229. Next
  230. Set objElements = Nothing
  231. Set objItem = Nothing %>
  232. strMenuHTML += '<div style="font-size:1px;line-height:1;background-color:#FFFFFF;width:100%">&nbsp;</div>';
  233. strMenuHTML += '<a href="#" ' +
  234. 'onfocus="spanHelp2.className=' + "'" + "MENUhover" + "'" + ';" ' +
  235. 'onblur="spanHelp2.className=' + "'" + "MENU" + "'" + ';" ' +
  236. 'onkeydown = "if (window.event.keyCode == 13) {window.open(' + "'/about.asp'" + '); }" ' +
  237. '>'+
  238. '<div ' +
  239. 'class="MENU" ' +
  240. 'ID="spanHelp2" ' +
  241. 'onMouseOver="this.className=' + "'" + "MENUhover" + "'" + ';" ' +
  242. 'onMouseOut="this.className=' + "'" + "MENU" + "'" + ';" ' +
  243. 'onClick="window.open(';
  244. 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'";
  245. strMenuHTML += ');">&nbsp;' + L_ABOUTMENU_TEXT + '</div></A>';
  246. strMenuHTML += '</div>';
  247. strMenuHTML += '<IFRAME ID=launchWin WIDTH=10 HEIGHT=10 style="display:none;" SRC=""></IFRAME>';
  248. winMenuTarget.document.body.insertAdjacentHTML('beforeEnd',strMenuHTML); // beforeEnd
  249. divMenu = winMenuTarget.document.all("divMenu");
  250. }
  251. else {
  252. divMenu.style.left=strMenuLeft;
  253. divMenu.style.display="";
  254. }
  255. divMenu.style.left = document.body.clientWidth - divMenu.clientWidth - 5;
  256. divMenu.style.visibility = "visible";
  257. //divMenu.filters[0].Apply();
  258. //divMenu.filters[0].Play();
  259. divMenu.focus();
  260. }
  261. }
  262. </Script>
  263. <table border="0" cellpadding="0" cellspacing="0" width="100%" height="30" ID=TABBAR>
  264. <% If IsIE Then %>
  265. <tr>
  266. <td class=TABBAR width="100%" height="5" colspan=<% =intTabCount*3 + 5 %>></td>
  267. </tr>
  268. <% End If %>
  269. <tr>
  270. <td class=TABBAR width="15" nowrap>&nbsp;</td>
  271. <% 'TAB LOOP
  272. If intTabCount = 0 Then %>
  273. <TD colspan=3 nowrap bgcolor="#000000" class="TABLINK">
  274. ----------
  275. </TD>
  276. <% Else
  277. For i = 0 to intTabCount-1 %>
  278. <td height="25" align=right valign=middle nowrap class="<% =marrTabStyle(i) %>">
  279. <a href="#" class="<% =marrTabStyle(i) %>"
  280. onclick="ClickTab(<% =i %>);return false;"
  281. onMouseOver="window.status='';return true;">
  282. &nbsp;&nbsp;&nbsp;&nbsp;<% =marrTabText(i) %>&nbsp;</a>
  283. </td>
  284. <TD class="<% =marrTabStyle(i) %>">
  285. <% If marrTabColor(i) = mstrActiveTabColor Then %>
  286. <IMG src="images/light_spacer.gif" border=0>
  287. <% Else %>
  288. <IMG src="images/dark_spacer.gif" border=0>
  289. <% End If %>
  290. </TD><td class=TABBAR width="5" nowrap>&nbsp;</td>
  291. <% Next
  292. End If%>
  293. <td class=TABBAR nowrap valign="middle" align="center" width="100%">&nbsp;</td>
  294. <!-- <td class=TABBAR width="25" nowrap valign=middle align="center"></td> -->
  295. <td class=TABBAR nowrap valign=middle align=right class="tablink">
  296. <a href="#" style="color:silver;font-size:15pt;font-weight:bold;text-decoration:none;"
  297. class="TABLINK"
  298. title="<% =L_HELPTOOLTIP_TEXT %>"
  299. onClick="OpenHelpMenu();return false;"
  300. onMouseOver="window.status='<% =L_HELPTOOLTIP_TEXT %>';return true;">
  301. <img src="images/help_about.gif" border=0 height=22 width=22>
  302. </A>
  303. &nbsp;&nbsp;
  304. <A href="http://www.microsoft.com/embedded/products/server.asp" target="_blank">
  305. <img src="images/winnte_logo.gif" border=0 height=22></A>
  306. &nbsp;
  307. </td>
  308. <td class=TABBAR width="10" nowrap valign="middle" align="right">&nbsp;</td>
  309. </tr>
  310. <tr>
  311. <td width="100%" height="8" colspan=<% =intTabCount*3 + 5 %> class="ACTIVETAB">
  312. <% If Not IsIE Then Response.Write "&nbsp;" %></td>
  313. </tr>
  314. </table>
  315. <%
  316. End Function
  317. %>