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.

186 lines
6.1 KiB

  1. <HTML XMLNS:helpcenter>
  2. <HEAD>
  3. <!--
  4. Copyright (c) 2000 Microsoft Corporation
  5. -->
  6. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=windows-1252">
  7. <META HTTP-EQUIV=PICS-Label CONTENT='(PICS-1.1 "http://www.rsac.org/ratingsv01.html" l comment "RSACi North America Server" by "[email protected]" r (n 0 s 0 v 0 l 0))'>
  8. <TITLE>Headlines</TITLE>
  9. <OBJECT ID=pchealth classid=CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7></OBJECT>
  10. <LINK ID=Stylesheet_Ref2 href="hcp://system/css/shared.css" rel=STYLESHEET type=text/css>
  11. <LINK ID=Stylesheet_Ref1 href="hcp://system/css/Behaviors.css" rel=STYLESHEET type=text/css>
  12. <STYLE>
  13. .ColorLightGray
  14. {
  15. COLOR: #bfbfbf
  16. }
  17. </STYLE>
  18. </HEAD>
  19. <BODY class="sys-rhp-bgcolor">
  20. <DIV ID=idNews style="margin-top:24px; margin-left:16px; margin-right:16px;"></DIV>
  21. </BODY>
  22. <SCRIPT LANGUAGE="JavaScript" DEFER>
  23. // variables for localization
  24. var L_HeadlinesDESKTOP_Text = "Did you know?";
  25. var L_HeadlinesSERVER_Text = "News and information";
  26. var L_Updated_Text = "Updated: ";
  27. var L_Provider_Text = "Visit Content Provider's Web site";
  28. function PopulateNews()
  29. {
  30. var title; // output buffer
  31. // display the title according to the SKU
  32. title = "<DIV NOWRAP class='sys-font-heading2 sys-rhp-color-title'>" + (pchealth.UserSettings.IsDesktopVersion ? L_HeadlinesDESKTOP_Text : L_HeadlinesSERVER_Text) + "</DIV>";
  33. idNews.innerHTML = title;
  34. try
  35. {
  36. // get News
  37. var stream = pchealth.UserSettings.News;
  38. if (stream)
  39. {
  40. var dispstr; //output buffer
  41. var g_NavBar = pchealth.UI_NavBar.content.parentWindow;
  42. var xmlNews = new ActiveXObject("MSXML.DOMDocument");
  43. // load the headlines as XML
  44. xmlNews.load(stream);
  45. //
  46. // Get the date
  47. //
  48. var Datestr = xmlNews.documentElement.getAttribute("DATE");
  49. var Dt = new Date( new Number( Datestr ) );
  50. dispstr = "<DIV class='sys-font-body sys-color-body' style='margin-bottom:2em'> " + L_Updated_Text;
  51. dispstr += Dt.toLocaleDateString() + "</DIV>";
  52. //
  53. // Get the list of Newsblocks to display
  54. //
  55. var lstBlocks = xmlNews.getElementsByTagName("NEWSBLOCK");
  56. lstBlocks.nextNode; //skip the first newsblock
  57. // form table
  58. dispstr += "<TABLE>";
  59. // horizontal line
  60. dispstr += "<HR class='ColorLightGray' style='height:1px;width:100%'>";
  61. while (Newsblock = lstBlocks.nextNode)
  62. {
  63. // form table row
  64. dispstr += "<TR><TD style='width:40%; padding:1em 14px 0.5em 0; vertical-align:top'>";
  65. //
  66. // Get the Newsblock attributes
  67. //
  68. var strProv = pchealth.TextHelpers.HTMLEscape( Newsblock.getAttribute("PROVIDER") );
  69. var strLink = g_NavBar.SanitizeLink( Newsblock.getAttribute("LINK") );
  70. var strIcon = g_NavBar.SanitizeLink( Newsblock.getAttribute("ICON") );
  71. var strPosition = Newsblock.getAttribute("POSITION");
  72. // display the Icon
  73. if (strIcon != "")
  74. {
  75. strPosition = strPosition.toLowerCase();
  76. switch (strPosition) {
  77. case "recommended":
  78. dispstr += "<TABLE><TR><TD>" +
  79. "<IMG SRC='" + strIcon + "' style='width:48px; height:48px;'></TD>";
  80. dispstr += "<TD style='padding:0 0 0 1.5em; vertical-align:top'>";
  81. dispstr += "<DIV class='sys-font-body-bold sys-color-body' style='margin-bottom:0.5em'>" + strProv + "</DIV>";
  82. if(strLink)
  83. {
  84. dispstr += "<A HREF='" + strLink + "'><DIV class='sys-font-body sys-link-normal'>" + L_Provider_Text + "</DIV></A>";
  85. }
  86. dispstr += "</TD></TR></TABLE>";
  87. break;
  88. case "horizontal":
  89. dispstr += "<IMG SRC='" + strIcon + "' style='width:200px; height:45px; margin-bottom:1.5em'>";
  90. dispstr += "<DIV class='sys-font-body-bold sys-color-body' style='margin-bottom:0.5em'>" + strProv + "</DIV>";
  91. if(strLink)
  92. {
  93. dispstr += "<A HREF='" + strLink + "'><DIV class='sys-font-body sys-link-normal'>" + L_Provider_Text + "</DIV></A>";
  94. }
  95. break;
  96. case "vertical":
  97. dispstr += "<TABLE><TR><TD>" +
  98. "<IMG SRC='" + strIcon + "' style='width:48px; height:96px;'></TD>";
  99. dispstr += "<TD style='padding:0 0 0 1.5em; vertical-align:top'>";
  100. dispstr += "<DIV class='sys-font-body-bold sys-color-body' style='margin-bottom:0.5em'>" + strProv + "</DIV>";
  101. if(strLink)
  102. {
  103. dispstr += "<A HREF='" + strLink + "'><DIV class='sys-font-body sys-link-normal'>" + L_Provider_Text + "</DIV></A>";
  104. }
  105. dispstr += "</TD></TR></TABLE>";
  106. break;
  107. default:
  108. dispstr += "<DIV class='sys-font-body-bold sys-color-body' style='margin-bottom:0.5em'>" + strProv + "</DIV>";
  109. if(strLink)
  110. {
  111. dispstr += "<A HREF='" + strLink + "'><DIV class='sys-font-body sys-link-normal'>" + L_Provider_Text + "</DIV></A>";
  112. }
  113. }
  114. }
  115. dispstr += "</TD><TD style='width:60%; padding:1em 0 0.5em 22px'>";
  116. //
  117. // Get the list of Headlines
  118. //
  119. var lstHeadlines = Newsblock.getElementsByTagName("HEADLINE");
  120. // display all the headlines
  121. while (Headline = lstHeadlines.nextNode)
  122. {
  123. var strTitle = pchealth.TextHelpers.HTMLEscape( Headline.getAttribute("TITLE") );
  124. var strLink = g_NavBar.SanitizeLink( Headline.getAttribute("LINK") );
  125. var strDesc = pchealth.TextHelpers.HTMLEscape( Headline.getAttribute("DESCRIPTION") );
  126. dispstr += "<A HREF='" + strLink + "'>";
  127. dispstr += "<DIV class='sys-font-body-bold sys-link-normal' style='margin-bottom:0.5em'>" + strTitle;
  128. dispstr += "</DIV></A>";
  129. dispstr += "<DIV class='sys-font-body sys-color-body' style='margin-bottom:1em'>" + strDesc + "</DIV>";
  130. }
  131. dispstr += "</TD></TR>";
  132. // horizontal rule
  133. dispstr += "<TR><TD COLSPAN=2><HR class='ColorLightGray' style='height:1px;width:100%'></TD></TR>";
  134. }
  135. dispstr += "</TABLE>";
  136. // display the headlines
  137. idNews.innerHTML = title + dispstr;
  138. }
  139. }
  140. catch (e) {
  141. if ( e.number == -2147024726)
  142. window.setTimeout("PopulateNews()", 500);
  143. //else
  144. // end if we get other error
  145. }
  146. }
  147. PopulateNews();
  148. </SCRIPT>
  149. </HTML>