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.

217 lines
5.5 KiB

  1. <%@LANGUAGE=JScript CODEPAGE=1252 %>
  2. <html>
  3. <head>
  4. <TITLE>Add KB Article</TITLE>
  5. <!-- #INCLUDE FILE='Global_ServerUtils.asp' -->
  6. <!-- #INCLUDE FILE='Global_DBUtils.asp' -->
  7. <link rel="stylesheet" TYPE="text/css" HREF="/main.css">
  8. <link rel="stylesheet" TYPE="text/css" HREF="/CustomStyles.css">
  9. <meta http-equiv="Content-Type" CONTENT="text/html; charset=iso-8859-1" />
  10. </head>
  11. <body bgcolor='#ffffff' topmargin='0' leftmargin='0' marginheight='0' marginwidth='0' tabindex=0>
  12. <table>
  13. <tr>
  14. <td>
  15. <p class='clsPTitle'>Add/Remove KB Articles</p>
  16. </td>
  17. </tr>
  18. </table>
  19. <table width='70%'>
  20. <tr>
  21. <td>
  22. <table class="clsTableInfo" border="0" cellpadding="2" cellspacing="0" style='border:1px solid #6681d9;'>
  23. <tr>
  24. <td align="left" nowrap class="clsTDInfo">
  25. KBs
  26. </td>
  27. </tr>
  28. <tr>
  29. <td class='sys-table-cell-bgcolor1' colspan='2'><b>First KB</b></td>
  30. </tr>
  31. <tr>
  32. <td class='sys-table-cell-bgcolor1'>KB Title (Can be the same as the Article number)</td>
  33. <td class='sys-table-cell-bgcolor1'>
  34. <INPUT class='clsResponseInput2' ID=kbTitle NAME=kbTitle TYPE=TEXT MAXLENGTH=132 SIZE=32 VALUE="">
  35. </td>
  36. </tr>
  37. <tr>
  38. <td class='sys-table-cell-bgcolor1'>KB Article</td>
  39. <td class='sys-table-cell-bgcolor1'>
  40. <INPUT class='clsResponseInput2' ID=kb NAME=kb TYPE=TEXT MAXLENGTH=132 SIZE=32 VALUE="">
  41. </td>
  42. </tr>
  43. <tr>
  44. <td class='sys-table-cell-bgcolor1' colspan='2'><b>Second KB</b></td>
  45. </tr>
  46. <tr>
  47. <td class='sys-table-cell-bgcolor1'>KB Title (Can be the same as the Article number)</td>
  48. <td class='sys-table-cell-bgcolor1'>
  49. <INPUT class='clsResponseInput2' ID=kbTitle NAME=kbTitle TYPE=TEXT MAXLENGTH=132 SIZE=32 VALUE="">
  50. </td>
  51. </tr>
  52. <tr>
  53. <td class='sys-table-cell-bgcolor1'>KB Article</td>
  54. <td class='sys-table-cell-bgcolor1'>
  55. <INPUT class='clsResponseInput2' ID=kb NAME=kb TYPE=TEXT MAXLENGTH=132 SIZE=32 VALUE="">
  56. </td>
  57. </tr>
  58. <tr>
  59. <td class='sys-table-cell-bgcolor1' colspan='2' ><b>Third KB</b></td>
  60. </tr>
  61. <tr>
  62. <td class='sys-table-cell-bgcolor1'>KB Title (Can be the same as the Article number)</td>
  63. <td class='sys-table-cell-bgcolor1'>
  64. <INPUT class='clsResponseInput2' ID=kbTitle NAME=kbTitle TYPE=TEXT MAXLENGTH=132 SIZE=32 VALUE="">
  65. </td>
  66. </tr>
  67. <tr>
  68. <td class='sys-table-cell-bgcolor1'>KB Article</td>
  69. <td class='sys-table-cell-bgcolor1'>
  70. <INPUT class='clsResponseInput2' ID=kb NAME=kb TYPE=TEXT MAXLENGTH=132 SIZE=32 VALUE="">
  71. </td>
  72. </tr>
  73. <tr>
  74. <td>
  75. <INPUT class='clsButton' type='button' value='Submit' OnClick="fnSubmitForm()" >
  76. </td>
  77. </tr>
  78. </table>
  79. </td>
  80. </tr>
  81. </table>
  82. <script language='javascript'>
  83. function fnUpdate()
  84. {
  85. ProductID = window.parent.frames("sepLeftNav").document.getElementsByName( "ProductID" ).ProductID.value
  86. }
  87. var kbString = window.parent.frames("sepLeftNav").document.getElementsByName( "kbArticles" ).kbArticles.value
  88. var kbArray = fnBuildKBArticles( kbString )
  89. try
  90. {
  91. for ( var i= 0 ; i< 3 ; i++ )
  92. {
  93. {
  94. if( typeof( kbArray[(i*2)] ) != "undefined" )
  95. {
  96. document.all.kbTitle[i].value = kbArray[(i*2)]
  97. document.all.kb[i].value = kbArray[(i*2)+1]
  98. }
  99. }
  100. }
  101. }
  102. catch( err )
  103. {
  104. }
  105. function fnBuildKBArticles( szKB )
  106. {
  107. var kbPattern = /^Q\d{1,6}/i;
  108. var retVal = "";
  109. var kbRet = new Array()
  110. try
  111. {
  112. var szKBArray = String(szKB).split( "</KB>" );
  113. //alert( szKBArray.length )
  114. for ( var i=0 ; i< 6 ; i++ )
  115. {
  116. //alert( "working value: " + szKBArray[i] )
  117. if ( i < szKBArray.length - 1 )
  118. {
  119. szKBArray[i] = szKBArray[i].replace( "<KB>", "" );
  120. if ( kbPattern.test( szKBArray[i] ) )
  121. {
  122. kbRet.push( szKBArray[i] )
  123. kbRet.push( szKBArray[i] )
  124. //alert( "pushing the same" )
  125. //alert( szKBArray[i] )
  126. }
  127. else
  128. {
  129. szKBArray[Number(i+1)] = szKBArray[Number(i+1)].replace( "<KB>", "" );
  130. kbRet.push( szKBArray[i] )
  131. kbRet.push( szKBArray[i+1] )
  132. i=i+1
  133. //alert("pushing different" )
  134. //alert( szKBArray[i] )
  135. //alert( szKBArray[i + 1] )
  136. //szKBArray[Number(i+1)] = szKBArray[Number(i+1)].replace( "<KB>", "" );
  137. //retVal += "<li><A Class='clsALinkNormal' HREF='http://support.microsoft.com/support/misc/kblookup.asp?ID=" + String(szKBArray[i+1]).replace( "<KB>", "" ) + "'>" + szKBArray[i] + "</a></li>\n";
  138. //i=i+1;
  139. }
  140. }
  141. }
  142. }
  143. catch ( err )
  144. {
  145. alert( err.description )
  146. return false;
  147. }
  148. return kbRet;
  149. }
  150. function fnSubmitForm()
  151. {
  152. var kbString = ""
  153. for( var i = 0 ; i < document.all.kb.length ; i ++ )
  154. {
  155. if( document.all.kb[i].value != "" )
  156. {
  157. if( document.all.kb[i].value == document.all.kbTitle[i].value )
  158. kbString += "<KB>" + document.all.kb[i].value + "</KB>"
  159. else
  160. kbString += "<KB>" + document.all.kbTitle[i].value + "</KB><KB>" + document.all.kb[i].value + "</KB>"
  161. }
  162. }
  163. window.parent.frames("sepLeftNav").document.getElementsByName( "kbArticles" ).kbArticles.value = kbString
  164. try
  165. {
  166. var PreviewURL = window.parent.frames("sepLeftNav").fnPreviewSolution()
  167. window.location = PreviewURL
  168. }
  169. catch( err )
  170. {
  171. alert( "KB String Created, could not switch to preview mode:\nErr: " + err.description )
  172. }
  173. }
  174. </script>
  175. </body>
  176. </html>