%@ CODEPAGE=65001 %> <% '------------------------------------------------------------ ' ' Microsoft Internet Printing Project ' ' Copyright (c) Microsoft Corporation. All rights reserved. ' ' Printer Job List ' '------------------------------------------------------------ Option Explicit %> <% Const CHECKED_TAG = " checked " Randomize CheckSession Response.Expires = 0 Const SelectedColor = "#c0c0c0" Const UnselectedColor = "#ffffff" Const iJobLength = 10 Const L_OpenQueue_Text = "Open Queue" Const L_GetJobs_Text = "Get Jobs" Dim strPrinter, strAction, strComputer, strJobid, objQueue, objJobs, objJob, iRes, bDHTML Dim objPrinter Dim iStart, iEnd Dim index index = -1 strPrinter = OleCvt.DecodeUnicodeName (request ("eprinter")) strAction = Request("action") strJobid = Request("jobid") strComputer = Session(COMPUTER) bDHTML = Session(DHTML_ENABLED) On Error Resume Next Err.Clear If Request("startid") = "" Or Request ("endid") = "" Then iStart = 1 iEnd = iStart+ iJobLength Else iStart = Int (Request ("startid")) iEnd = Int (Request ("endid")) End If Set objQueue = GetObject("WinNT://" & strComputer & "/" & strPrinter & ",PrintQueue") If Err Then ErrorHandler (L_OpenQueue_Text) Set objJobs = objQueue.PrintJobs If Err Then ErrorHandler (L_GetJobs_Text) Function strJobStatus(iStatus) Dim L_JobStatus_Text(11) Dim bit, i Dim strTemp, bFirst Const L_Seperator_Text = " - " L_JobStatus_Text(0) = "Paused" L_JobStatus_Text(1) = "Error" L_JobStatus_Text(2) = "Deleting" L_JobStatus_Text(3) = "Spooling" L_JobStatus_Text(4) = "Printing" L_JobStatus_Text(5) = "Offline" L_JobStatus_Text(6) = "Out of Paper" L_JobStatus_Text(7) = "Printed" L_JobStatus_Text(8) = "Deleted" L_JobStatus_Text(9) = "Blocked" L_JobStatus_Text(10) = "User Intervention Required" L_JobStatus_Text(11) = "Restarting" bit = 1 i = 0 bFirst = True strTemp = "" For i = 0 To 11 If iStatus And bit Then If Not bFirst Then strTemp = strTemp + L_Seperator_Text End If strTemp = strTemp + L_JobStatus_Text(i) bFirst = False End If bit = bit * 2 Next If strTemp = "" Then strTemp = " " strJobStatus = strTemp End Function Function GenQueueViewHead () Dim L_TableHeader1_Text, L_TableHeader2_Text, L_TableHeader3_Text Dim L_TableHeader4_Text, L_TableHeader5_Text, L_TableHeader6_Text L_TableHeader1_Text = "Document" L_TableHeader2_Text = "Status" L_TableHeader3_Text = "Owner" L_TableHeader4_Text = "Pages" L_TableHeader5_Text = "Size" L_TableHeader6_Text = "Submitted" GenQueueViewHead = "