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.

233 lines
8.7 KiB

  1. <%@ CODEPAGE=65001 %>
  2. <%
  3. '------------------------------------------------------------
  4. '
  5. ' Microsoft Internet Printing Project
  6. '
  7. ' Copyright (c) Microsoft Corporation. All rights reserved.
  8. '
  9. '------------------------------------------------------------
  10. option explicit
  11. %>
  12. <!-- #include file = "ipp_util.inc" -->
  13. <%
  14. Randomize
  15. CheckSession
  16. Response.Expires = 0
  17. Dim strPrinter, strASP1, strCabURL, strURLPrinter, strView
  18. Dim bShowJobMenu
  19. strPrinter = OleCvt.DecodeUnicodeName( Request("eprinter") )
  20. strURLPrinter = Request(URLPRINTER)
  21. strASP1 = Request(ASP1)
  22. strView = Request ("View")
  23. Dim strInstall
  24. Const L_Connecting_Text = "Connect %1 from %2"
  25. strInstall = RepString2(L_Connecting_Text, strPrinter, session(LOCAL_SERVER) )
  26. Const L_NavTitle_Text = "<title>Left nav Bar</title>"
  27. Const L_View_Text = "VIEW"
  28. Const L_DocList_Text = "Document List"
  29. Const L_Property_Text = "Properties"
  30. Const L_Detail_Text = "Device Status"
  31. Const L_GoDocList_Text = "Go to the document list on the printer"
  32. Const L_GotoList_Text = "Please go to document list!"
  33. Const L_GoPropPage_Text = "Go to the property page of the printer"
  34. Const L_GoDevStatus_Text = "Go to the device status of the printer"
  35. Const L_Select_Text = "Please select a document!"
  36. Const L_ListPrinters_Text = "List all the printers on %1"
  37. Const L_AllPrinters_Text = "All Printers"
  38. Const L_PausePrinter_Text = "Pause the printer"
  39. Const L_ResumePrinter_Text= "Resume the printer"
  40. Const L_CancelDocs_Text = "Cancel all the documents on the printer"
  41. Const L_CancelAllDocs_Text= "Cancel All Documents"
  42. Const L_PauseDoc_Text = "Pause the selected document"
  43. Const L_ResumeDoc_Text = "Resume the selected document"
  44. Const L_CancelDelDoc_Text = "Cancel/Delete the selected document"
  45. Const L_PrinterActions_Text= "PRINTER ACTIONS"
  46. Const L_Pause_Text = "Pause"
  47. Const L_Resume_Text = "Resume"
  48. Const L_Connect_Text = "Connect"
  49. Const L_DocumentActions_Text = "DOCUMENT ACTIONS"
  50. Const L_Cancel_Text = "Cancel"
  51. CONST VIEW_EQUALS_Q = "&view=q"
  52. CONST VIEW_EQUALS_P = "&view=p"
  53. CONST VIEW_EQUALS_D = "&view=d"
  54. Function GetHighlightLink (strLinkView, strLinkName)
  55. If strLinkView = strView Then
  56. GetHighlightLink = Write(SUBMENU_FONT_TAG & "<font color=#0000FF>" & strLinkName & "</font>" & END_FONT)
  57. Else
  58. GetHighlightLink = Write(SUBMENU_FONT_TAG & strLinkName & END_FONT)
  59. End If
  60. End Function
  61. %>
  62. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  63. <html lang=<%=L_Language%>>
  64. <head>
  65. <Meta Http-equiv="Content-Type" Content="text/html; CHARSET=UTF-8">
  66. <%=Write(L_NavTitle_Text)%>
  67. <base target="main">
  68. </head>
  69. <script language="javascript">
  70. function getHref (action, thishref)
  71. {
  72. var jobid, iStart, iEnd;
  73. if (parent.frames[2].document.URL.indexOf("<%=QUEUE_VIEW%>") == -1) {
  74. alert ("<%=Write(L_GotoList_Text)%>");
  75. return true;
  76. }
  77. else {
  78. jobid = parent.frames[2].document.forms[1].elements[0].value;
  79. iStart = parent.frames[2].document.forms[1].elements[1].value;
  80. iEnd = parent.frames[2].document.forms[1].elements[2].value;
  81. if (jobid == "" || iStart == "" || iEnd == "") {
  82. alert ("<%=Write(L_Select_Text)%>");
  83. return false;
  84. }
  85. else {
  86. parent.location.href = "ipp_0004.asp?eprinter=<%=Request("eprinter")%>&action=" + action + "&jobid=" + jobid + "&StartId=" + iStart + "&EndId=" + iEnd + "&page=<%=CStr(Int(Rnd*10000))%>";
  87. return false;
  88. }
  89. }
  90. }
  91. //
  92. // Use this to access the hidden jobvalue. It will be compatible with IE3 -> IE4
  93. //
  94. // alert (parent.frames[1].document.forms[0].elements[0].value);
  95. //
  96. </script>
  97. <body bgcolor="#FFFFFF" text="#000000" link="#000000" vlink="#000000" alink="#000000"
  98. topmargin="0" leftmargin="0">
  99. <%=Write(DEF_BASEFONT_TAG)%>
  100. <table border="0" width="100%" cellspacing="0" cellpadding="2">
  101. <tr>
  102. <td width="30" colspan="2" >
  103. <img src="images/ipp_0002.gif">
  104. </td>
  105. </tr>
  106. <tr>
  107. <th colspan="2" align="left" bgcolor="#000000">
  108. <%=Write(MENU_FONT_TAG & "<b>" & L_View_Text & "</b>" & END_FONT)%>
  109. </th>
  110. </tr>
  111. <tr>
  112. <td width="30">&nbsp;&nbsp;</td>
  113. <td width="100%"><a href="ipp_0004.asp?eprinter=<%=Request("eprinter") & VIEW_EQUALS_Q & ATPAGE & CStr(Int(Rnd*10000))%>"
  114. target="_top"
  115. title = "<% =Write(L_GoDocList_Text)%>" >
  116. <% =GetHighlightLink ("q", L_DocList_Text)%> </a> </td>
  117. </tr>
  118. <tr>
  119. <td width="30"></td>
  120. <td width="100%"><a href="ipp_0004.asp?eprinter=<%=Request("eprinter") & VIEW_EQUALS_P & ATPAGE & CStr(Int(Rnd*10000))%>"
  121. target="_top"
  122. title = "<% =Write(L_GoPropPage_Text) %>" >
  123. <% =GetHighlightLink ("p", L_Property_Text)%></a></td>
  124. </tr>
  125. <% If strASP1 <> "" then %>
  126. <tr>
  127. <td width="30"></td>
  128. <td width="100%"><a href="ipp_0004.asp?eprinter=<%=Request("eprinter") & VIEW_EQUALS_D & ATPAGE & CStr(Int(Rnd*10000))%>"
  129. target="_top"
  130. title = "<%=Write(L_GoDevStatus_Text) %>" >
  131. <% =GetHighlightLink ("d", L_Detail_Text)%></a></td>
  132. </tr>
  133. <% end if%>
  134. <tr>
  135. <td width="30"></td>
  136. <td width="100%" ><a href="ipp_0001.asp" target="_top"
  137. title = "<% =Write(RepString1(L_ListPrinters_Text,session(LOCAL_SERVER)))%>" >
  138. <%= Write(SUBMENU_FONT_TAG & L_AllPrinters_Text & END_FONT)%></a></td>
  139. </tr>
  140. <tr>
  141. <td colspan="2" height="15"></td>
  142. </tr>
  143. <tr>
  144. <th colspan="2" align="left" bgcolor="#000000"> <%=Write(MENU_FONT_TAG & "<b>" & L_PrinterActions_Text & "</b>" & END_FONT)%> </th>
  145. </tr>
  146. <tr>
  147. <td width="30"></td>
  148. <td width="100%"><a href="ipp_0004.asp?eprinter=<%=Request("eprinter")%>&action=pause&page=<%=CStr(Int(Rnd*10000))%>"
  149. target="_top"
  150. title = "<% =Write(L_PausePrinter_Text) %>"><%=Write(SUBMENU_FONT_TAG & L_Pause_Text & END_FONT)%></a></td>
  151. </tr>
  152. <tr>
  153. <td width="30"></td>
  154. <td width="100%"><a href="ipp_0004.asp?eprinter=<%=Request("eprinter")%>&action=resume&page=<%=CStr(Int(Rnd*10000))%>"
  155. target="_top"
  156. title = "<% = Write(L_ResumePrinter_Text) %>"><%=Write(SUBMENU_FONT_TAG & L_Resume_Text & END_FONT)%></a></td>
  157. </tr>
  158. <tr>
  159. <td width="30"></td>
  160. <td width="100%"><a href="ipp_0004.asp?eprinter=<%=Request("eprinter")%>&action=purge&page=<%=CStr(Int(Rnd*10000))%>"
  161. target="_top"
  162. title = "<% =Write(L_CancelDocs_Text) %>"> <%=Write(SUBMENU_FONT_TAG & L_CancelAllDocs_Text & END_FONT)%> </a></td>
  163. </tr>
  164. <% if Request(CONNECT) = "1" And request.servervariables ("LOCAL_ADDR") <> request.servervariables ("REMOTE_ADDR") then %>
  165. <script language="vbscript">
  166. Dim objHelper
  167. On Error Resume Next
  168. Err.Clear
  169. Set objHelper = CreateObject("<% =PROGID_CLIENT_HELPER %>")
  170. If Err.Number = 0 Then
  171. Dim strInstall
  172. strInstall = "<tr><td width=""30""></td><td width=""100%""><a href=ipp_0015.asp?eprinter=<%=Request("eprinter") & VIEW_EQUALS & strView%>" & " target=""_top""" & " title=" & """<%=Write(strInstall)%>""" & ">" &_
  173. "<%= Write("<font " & DEF_DOUBLEFONT & " size = 2><b>" & L_Connect_Text & "</b>" & END_FONT)%>" & "</a></td></tr>"
  174. Set objHelper = nothing
  175. Document.Write (strInstall)
  176. End If
  177. </script>
  178. <% end if %>
  179. <tr>
  180. <td width="30" colspan="2" height="15">
  181. </td>
  182. </tr>
  183. <% If strView = "q" Then %>
  184. <tr>
  185. <th colspan="2" align="left" bgcolor="#000000"> <%=Write(MENU_FONT_TAG & "<b>" & L_DocumentActions_Text & "</b>" & END_FONT)%> </th>
  186. </tr>
  187. <tr>
  188. <td width="30"></td>
  189. <td width="100%"><a href="ipp_0004.asp?eprinter=<%=Request("eprinter") & VIEW_EQUALS_Q & ATPAGE & CStr(Int(Rnd*10000)) & QUOTE & ONCLICK_EQUALS%>"return getHref('pausejob',null);"
  190. target="_top" title = "<% =Write(L_PauseDoc_Text) %>"><%=Write(SUBMENU_FONT_TAG & L_Pause_Text & END_FONT)%></a></td>
  191. </tr>
  192. <tr>
  193. <td width="30"></td>
  194. <td width="100%"><a href="ipp_0004.asp?eprinter=<%=Request("eprinter") & VIEW_EQUALS_Q & ATPAGE & CStr(Int(Rnd*10000)) & QUOTE & ONCLICK_EQUALS%>"return getHref('resumejob',null);"
  195. target="_top" title= "<% =Write(L_ResumeDoc_Text) %>"><%=Write(SUBMENU_FONT_TAG & L_Resume_Text & END_FONT)%></a></td>
  196. </tr>
  197. <tr>
  198. <td width="30"></td>
  199. <td width="100%"><a href="ipp_0004.asp?eprinter=<%=Request("eprinter") & VIEW_EQUALS_Q & ATPAGE & CStr(Int(Rnd*10000)) & QUOTE & ONCLICK_EQUALS%>"return getHref('canceljob',null);"
  200. target="_top" title= "<% =Write(L_CancelDelDoc_Text) %>"><%=Write(SUBMENU_FONT_TAG & L_Cancel_Text & END_FONT)%></a></td>
  201. </tr>
  202. <% End If %>
  203. </table>
  204. </body>
  205. </html>