all ErrorHandler(strADSI) End If %> > <% =Write(strTitle) %> <% Dim strPrinterName strPrinterName = "

" & strTitle & "

" Function GenTableHead () Dim L_TableTitle_Text(5) Dim strTableTitle(5) 'The reason we have to do this is that when we manipulate the string , 'it is not localizable. This works around this problem Dim i Dim strHTML Dim Width 'Width = Array (200, 80, 200, 37, 194, 194) Const strSp = "  " L_TableTitle_Text(0) = "Name" L_TableTitle_Text(1) = "Status" L_TableTitle_Text(2) = "Location" L_TableTitle_Text(3) = "Jobs" L_TableTitle_Text(4) = "Model" L_TableTitle_Text(5) = "Comment" For i = 0 to 5 strTableTitle(i) = L_TableTitle_Text(i) & strSp Next strHTML = "" For i = 0 to 5 strHTML = strHTML & "" & MENU_FONT_TAG & "" &_ strTableTitle(i) & "" & END_FONT & "" Next strHTML = strHTML & "" GenTableHead = strHTML End Function Function GenTableBody () Dim i Dim strHTML Dim TdStart, TdEnd TdStart = "" & DEF_FONT_TAG TdEnd = END_FONT & "" strHTML = "" For i = ubound(rgPrinters, 2) To 1 Step -1 'For i = 1 To ubound(rgPrinters, 2) strHTML = strHTML & "" Select Case rgPrinters(ADSI_PRINTER_ACCESS, i) Case PRINTER_OPENING strHTML = strHTML & TdStart & "" & strCleanString(rgPrinters(ADSI_PRINTER_NAME, i)) & "" & TdEnd Case PRINTER_ACCESS_DENIED strHTML = strHTML & TdStart & strCleanString(rgPrinters(ADSI_PRINTER_NAME, i)) & TdEnd Case Else strHTML = strHTML & TdStart & "" & strCleanString(rgPrinters(ADSI_PRINTER_NAME, i)) & "" & TdEnd End Select If rgPrinters(ADSI_PRINTER_ACCESS, i) = PRINTER_OK Then strHTML = strHTML &_ TdStart & strPrinterStatus (rgPrinters(ADSI_PRINTER_STATUS, i)) & TdEnd &_ TdStart & rgPrinters(ADSI_PRINTER_LOCATION, i) & TdEnd &_ TdStart & rgPrinters(ADSI_PRINTER_JOBS, i ) & TdEnd &_ TdStart & rgPrinters(ADSI_PRINTER_MODEL, i) & TdEnd &_ TdStart & rgPrinters(ADSI_PRINTER_COMMENT, i) & TdEnd Else strHTML = strHTML &_ "" & DEF_FONT_TAG & "" & rgPrinters(ADSI_PRINTER_COMMENT, i) & "" & END_FONT & "" &_ " " &_ " " &_ " " &_ " " End If strHTML = strHTML & "" Next GenTableBody = strHTML End Function %>
printers.gif <%=Write(CLIENT_FONT & strPrinterName & END_FONT)%>
<%=Write (GenTableHead)%> <%=Write (GenTableBody)%>

<% Dim strUrl Const L_Prev_Text = "Prev %1 printers" Const L_Next_Text = "Next %1 printers" strUrl = "" & RepString1(L_Prev_Text, CStr (iPrinterLength)) & "    " If iStart > 1 Then Response.Write ( Write(DEF_FONT_TAG & strUrl & END_FONT)) End If strUrl = "" & RepString1(L_Next_Text , CStr (iPrinterLength)) & "" If bShowNext Then Response.Write ( Write(DEF_FONT_TAG & strUrl & END_FONT)) End If %>