]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Added templates, CGI variable code, and updated printers CGI to use
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Tue, 1 Feb 2000 02:52:25 +0000 (02:52 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Tue, 1 Feb 2000 02:52:25 +0000 (02:52 +0000)
new code (dropped about 200 lines of code...)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@892 7a7537e8-13f0-0310-91df-b6672ffda945

26 files changed:
cgi-bin/Makefile
cgi-bin/admin.c
cgi-bin/classes.c
cgi-bin/ipp-var.c [new file with mode: 0644]
cgi-bin/ipp-var.h [new file with mode: 0644]
cgi-bin/jobs.c
cgi-bin/printers.c
templates/add-class.tmpl [new file with mode: 0644]
templates/add-printer.tmpl [new file with mode: 0644]
templates/admin.tmpl [new file with mode: 0644]
templates/choose-device.tmpl [new file with mode: 0644]
templates/choose-make.tmpl [new file with mode: 0644]
templates/choose-model.tmpl [new file with mode: 0644]
templates/choose-uri.tmpl [new file with mode: 0644]
templates/classes.tmpl [new file with mode: 0644]
templates/header.tmpl [new file with mode: 0644]
templates/jobs.tmpl [new file with mode: 0644]
templates/modify-class.tmpl [new file with mode: 0644]
templates/modify-printer.tmpl [new file with mode: 0644]
templates/option-boolean.tmpl [new file with mode: 0644]
templates/option-header.tmpl [new file with mode: 0644]
templates/option-pickmany.tmpl [new file with mode: 0644]
templates/option-pickone.tmpl [new file with mode: 0644]
templates/option-trailer.tmpl [new file with mode: 0644]
templates/printers.tmpl
templates/trailer.tmpl [new file with mode: 0644]

index 1f8d39c52dba6c46d4c7d583163a553cc3f6f8a4..9455f18368c939c47951a2a79b9dfbf15c3b3378 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: Makefile,v 1.7 2000/01/30 13:38:16 mike Exp $"
+# "$Id: Makefile,v 1.8 2000/02/01 02:52:23 mike Exp $"
 #
 #   CGI makefile for the Common UNIX Printing System (CUPS).
 #
@@ -25,7 +25,7 @@
 include ../Makedefs
 
 TARGETS        =       libcgi.a admin.cgi classes.cgi jobs.cgi printers.cgi
-LIBOBJS        =       abort.o email.o html.o template.o var.o
+LIBOBJS        =       abort.o email.o html.o ipp-var.o template.o var.o
 OBJS   =       $(LIBOBJS) admin.o classes.o jobs.o printers.o
 
 
@@ -60,10 +60,11 @@ install:
 libcgi.a:      $(LIBOBJS)
        echo Archiving $@...
        $(RM) $@
-       $(AR) $(ARFLAGS) $@ $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(LIBOBJS)
        $(RANLIB) $@
 
 $(LIBOBJS):    cgi.h
+ipp-var.o:     ipp-var.h
 
 
 #
@@ -74,7 +75,7 @@ admin.cgi:    admin.o ../Makedefs ../cups/$(LIBCUPS) libcgi.a
        echo Linking $@...
        $(CC) $(LDFLAGS) -o $@ admin.o libcgi.a $(LIBS)
 
-admin.o:       cgi.h ../cups/cups.h ../cups/ipp.h ../cups/language.h
+admin.o:       cgi.h ipp-var.h ../cups/cups.h ../cups/ipp.h ../cups/language.h
 
 
 #
@@ -85,7 +86,7 @@ classes.cgi:  classes.o ../Makedefs ../cups/$(LIBCUPS) libcgi.a
        echo Linking $@...
        $(CC) $(LDFLAGS) -o $@ classes.o libcgi.a $(LIBS)
 
-classes.o:     cgi.h ../cups/cups.h ../cups/ipp.h ../cups/language.h
+classes.o:     cgi.h ipp-var.h ../cups/cups.h ../cups/ipp.h ../cups/language.h
 
 
 #
@@ -96,7 +97,7 @@ jobs.cgi:     jobs.o ../Makedefs ../cups/$(LIBCUPS) libcgi.a
        echo Linking $@...
        $(CC) $(LDFLAGS) -o $@ jobs.o libcgi.a $(LIBS)
 
-jobs.o:        cgi.h ../cups/cups.h ../cups/ipp.h ../cups/language.h
+jobs.o:        cgi.h ipp-var.h ../cups/cups.h ../cups/ipp.h ../cups/language.h
 
 
 #
@@ -107,10 +108,10 @@ printers.cgi:     printers.o ../Makedefs ../cups/$(LIBCUPS) libcgi.a
        echo Linking $@...
        $(CC) $(LDFLAGS) -o $@ printers.o libcgi.a $(LIBS)
 
-printers.o:    cgi.h ../cups/cups.h ../cups/ipp.h ../cups/language.h
+printers.o:    cgi.h ipp-var.h ../cups/cups.h ../cups/ipp.h ../cups/language.h
 
 $(OBJS):       ../Makedefs
 
 #
-# End of "$Id: Makefile,v 1.7 2000/01/30 13:38:16 mike Exp $".
+# End of "$Id: Makefile,v 1.8 2000/02/01 02:52:23 mike Exp $".
 #
index 791b4eaa27e780bf8ef25143818f21a46e2a97bc..74d922f5e7c2d37a66709d4d8335b7979a96d1b6 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: admin.c,v 1.1 2000/01/30 13:38:16 mike Exp $"
+ * "$Id: admin.c,v 1.2 2000/02/01 02:52:23 mike Exp $"
  *
  *   Class status CGI for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-1999 by Easy Software Products.
+ *   Copyright 1997-2000 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
@@ -158,7 +158,7 @@ main(int  argc,                     /* I - Number of command-line arguments */
 
   puts("<P>The Common UNIX Printing System, CUPS, and the CUPS logo are the");
   puts("trademark property of <A HREF=\"http://www.easysw.com\">Easy Software");
-  puts("Products</A>. CUPS is copyright 1997-1999 by Easy Software Products,");
+  puts("Products</A>. CUPS is copyright 1997-2000 by Easy Software Products,");
   puts("All Rights Reserved.");
 
   puts("</BODY>");
@@ -482,5 +482,5 @@ show_class_info(http_t      *http,
 
 
 /*
- * End of "$Id: admin.c,v 1.1 2000/01/30 13:38:16 mike Exp $".
+ * End of "$Id: admin.c,v 1.2 2000/02/01 02:52:23 mike Exp $".
  */
index ae0da523c01913cd903bcda46b68831ffb953d0c..07bf78d9ff208d32bbf09ccf6b656e65d63b1f45 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: classes.c,v 1.11 1999/11/04 14:57:57 mike Exp $"
+ * "$Id: classes.c,v 1.12 2000/02/01 02:52:23 mike Exp $"
  *
  *   Class status CGI for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-1999 by Easy Software Products.
+ *   Copyright 1997-2000 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
@@ -158,7 +158,7 @@ main(int  argc,                     /* I - Number of command-line arguments */
 
   puts("<P>The Common UNIX Printing System, CUPS, and the CUPS logo are the");
   puts("trademark property of <A HREF=\"http://www.easysw.com\">Easy Software");
-  puts("Products</A>. CUPS is copyright 1997-1999 by Easy Software Products,");
+  puts("Products</A>. CUPS is copyright 1997-2000 by Easy Software Products,");
   puts("All Rights Reserved.");
 
   puts("</BODY>");
@@ -482,5 +482,5 @@ show_class_info(http_t      *http,
 
 
 /*
- * End of "$Id: classes.c,v 1.11 1999/11/04 14:57:57 mike Exp $".
+ * End of "$Id: classes.c,v 1.12 2000/02/01 02:52:23 mike Exp $".
  */
diff --git a/cgi-bin/ipp-var.c b/cgi-bin/ipp-var.c
new file mode 100644 (file)
index 0000000..2294f9b
--- /dev/null
@@ -0,0 +1,147 @@
+/*
+ * "$Id: ipp-var.c,v 1.1 2000/02/01 02:52:23 mike Exp $"
+ *
+ *   IPP variable routines for the Common UNIX Printing System (CUPS).
+ *
+ *   Copyright 1997-1999 by Easy Software Products.
+ *
+ *   These coded instructions, statements, and computer programs are the
+ *   property of Easy Software Products and are protected by Federal
+ *   copyright law.  Distribution and use rights are outlined in the file
+ *   "LICENSE.txt" which should have been included with this file.  If this
+ *   file is missing or damaged please contact Easy Software Products
+ *   at:
+ *
+ *       Attn: CUPS Licensing Information
+ *       Easy Software Products
+ *       44141 Airport View Drive, Suite 204
+ *       Hollywood, Maryland 20636-3111 USA
+ *
+ *       Voice: (301) 373-9603
+ *       EMail: cups-info@cups.org
+ *         WWW: http://www.cups.org
+ *
+ * Contents:
+ *
+ *   ippSetCGIVars() - Set CGI variables from an IPP response.
+ */
+
+/*
+ * Include necessary headers...
+ */
+
+#include "ipp-var.h"
+
+
+/*
+ * 'ippSetCGIVars()' - Set CGI variables from an IPP response.
+ */
+
+void
+ippSetCGIVars(ipp_t *response)         /* I - Response data to be copied... */
+{
+  int                  element;        /* Element in CGI array */
+  ipp_attribute_t      *attr;          /* Attribute in response... */
+  int                  i;              /* Looping var */
+  char                 name[1024],     /* Name of attribute */
+                       value[16384],   /* Value(s) */
+                       *valptr;        /* Pointer into value */
+
+
+  cgiSetVariable("SERVER_NAME", getenv("SERVER_NAME"));
+  cgiSetVariable("REMOTE_USER", getenv("REMOTE_USER"));
+  cgiSetVariable("CUPS_VERSION", CUPS_SVERSION);
+
+  for (element = 0, attr = response->attrs;
+       attr != NULL;
+       attr = attr->next, element ++)
+  {
+   /*
+    * Copy attributes to a separator...
+    */
+
+    for (; attr != NULL && attr->group_tag != IPP_TAG_ZERO; attr = attr->next)
+    {
+     /*
+      * Copy the attribute name, substituting "_" for "-"...
+      */
+
+      if (attr->name == NULL)
+        continue;
+
+      for (i = 0; attr->name[i]; i ++)
+        if (attr->name[i] == '-')
+         name[i] = '_';
+       else
+          name[i] = attr->name[i];
+
+      name[i] = '\0';
+
+     /*
+      * Copy values...
+      */
+
+      value[0] = '\0';
+      valptr   = value;
+
+      for (i = 0; i < attr->num_values; i ++)
+      {
+       if (i)
+         strcat(valptr, ",");
+
+       valptr += strlen(valptr);
+
+       switch (attr->value_tag)
+       {
+         case IPP_TAG_INTEGER :
+         case IPP_TAG_ENUM :
+             sprintf(valptr, "%d", attr->values[i].integer);
+             break;
+
+         case IPP_TAG_BOOLEAN :
+             if (!attr->values[i].boolean)
+               strcat(valptr, "no");
+
+         case IPP_TAG_NOVALUE :
+             strcat(valptr, attr->name);
+             break;
+
+         case IPP_TAG_RANGE :
+             sprintf(valptr, "%d-%d", attr->values[i].range.lower,
+                     attr->values[i].range.upper);
+             break;
+
+         case IPP_TAG_RESOLUTION :
+             sprintf(valptr, "%dx%d%s", attr->values[i].resolution.xres,
+                     attr->values[i].resolution.yres,
+                     attr->values[i].resolution.units == IPP_RES_PER_INCH ?
+                         "dpi" : "dpc");
+             break;
+
+          case IPP_TAG_STRING :
+         case IPP_TAG_TEXT :
+         case IPP_TAG_NAME :
+         case IPP_TAG_KEYWORD :
+         case IPP_TAG_CHARSET :
+         case IPP_TAG_LANGUAGE :
+             strcat(valptr, attr->values[i].string.text);
+             break;
+       }
+      }
+
+     /*
+      * Add the element...
+      */
+
+      cgiSetArray(name, element, value);
+    }
+
+    if (attr == NULL)
+      break;
+  }
+}
+
+
+/*
+ * End of "$Id: ipp-var.c,v 1.1 2000/02/01 02:52:23 mike Exp $".
+ */
diff --git a/cgi-bin/ipp-var.h b/cgi-bin/ipp-var.h
new file mode 100644 (file)
index 0000000..fd0624e
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * "$Id: ipp-var.h,v 1.1 2000/02/01 02:52:23 mike Exp $"
+ *
+ *   IPP variable definitions for the Common UNIX Printing System (CUPS).
+ *
+ *   Copyright 1997-2000 by Easy Software Products.
+ *
+ *   These coded instructions, statements, and computer programs are the
+ *   property of Easy Software Products and are protected by Federal
+ *   copyright law.  Distribution and use rights are outlined in the file
+ *   "LICENSE.txt" which should have been included with this file.  If this
+ *   file is missing or damaged please contact Easy Software Products
+ *   at:
+ *
+ *       Attn: CUPS Licensing Information
+ *       Easy Software Products
+ *       44141 Airport View Drive, Suite 204
+ *       Hollywood, Maryland 20636-3111 USA
+ *
+ *       Voice: (301) 373-9603
+ *       EMail: cups-info@cups.org
+ *         WWW: http://www.cups.org
+ */
+
+/*
+ * Include necessary headers...
+ */
+
+#include <ctype.h>
+#include <cups/cups.h>
+#include <cups/debug.h>
+#include <cups/language.h>
+#include <cups/string.h>
+#include "cgi.h"
+
+
+/*
+ * Definitions...
+ */
+
+#define TEMPLATES      "/home/mike/c/cups/templates"
+/*#define TEMPLATES    CUPS_DATADIR "/templates"*/
+
+
+/*
+ * Prototype...
+ */
+
+extern void    ippSetCGIVars(ipp_t *response);
+
+
+/*
+ * End of "$Id: ipp-var.h,v 1.1 2000/02/01 02:52:23 mike Exp $".
+ */
index cbbab2158dc221c60354815e33e3f1530e71e8ca..9ce659d60e89d8c8727b6539362de29f368e0245 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: jobs.c,v 1.10 1999/11/04 14:57:57 mike Exp $"
+ * "$Id: jobs.c,v 1.11 2000/02/01 02:52:23 mike Exp $"
  *
  *   Job status CGI for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-1999 by Easy Software Products.
+ *   Copyright 1997-2000 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
@@ -145,7 +145,7 @@ main(int  argc,                     /* I - Number of command-line arguments */
 
   puts("<P>The Common UNIX Printing System, CUPS, and the CUPS logo are the");
   puts("trademark property of <A HREF=\"http://www.easysw.com\">Easy Software");
-  puts("Products</A>. CUPS is copyright 1997-1999 by Easy Software Products,");
+  puts("Products</A>. CUPS is copyright 1997-2000 by Easy Software Products,");
   puts("All Rights Reserved.");
 
   puts("</BODY>");
@@ -580,5 +580,5 @@ show_job_info(http_t      *http,    /* I - Server connection */
 
 
 /*
- * End of "$Id: jobs.c,v 1.10 1999/11/04 14:57:57 mike Exp $".
+ * End of "$Id: jobs.c,v 1.11 2000/02/01 02:52:23 mike Exp $".
  */
index c8b8f3a4f66aaaf684899fc1dd6a0b75639f97e2..dd5170e5fabc7540cc821868eb07642c11f24a75 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: printers.c,v 1.13 1999/11/04 14:57:57 mike Exp $"
+ * "$Id: printers.c,v 1.14 2000/02/01 02:52:23 mike Exp $"
  *
  *   Printer status CGI for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-1999 by Easy Software Products.
+ *   Copyright 1997-2000 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
  *
  * Contents:
  *
- *   main()              - Main entry for CGI.
- *   show_printer_list() - Show a list of printers...
- *   show_printer_info() - Show printer information.
+ *   main() - Main entry for CGI.
  */
 
 /*
  * Include necessary headers...
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <cups/cups.h>
-#include <cups/language.h>
-#include <cups/debug.h>
-#include <config.h>
-
-
-/*
- * Local functions...
- */
-
-static void    show_printer_list(http_t *http, cups_lang_t *language);
-static void    show_printer_info(http_t *http, cups_lang_t *language,
-                                 char *name);
+#include "ipp-var.h"
 
 
 /*
@@ -61,7 +44,14 @@ main(int  argc,                      /* I - Number of command-line arguments */
   cups_lang_t  *language;      /* Language information */
   char         *printer;       /* Printer name */
   http_t       *http;          /* Connection to the server */
+  ipp_t                *request,       /* IPP request */
+               *response;      /* IPP response */
+  ipp_attribute_t *attr;       /* IPP attribute */
+  char         uri[HTTP_MAX_URI];
+                               /* Printer URI */
+
 
+  setbuf(stdout, NULL);
 
  /*
   * Get the request language...
@@ -88,298 +78,42 @@ main(int  argc,                    /* I - Number of command-line arguments */
 
   printer = argv[0];
   if (strcmp(printer, "/") == 0 || strcmp(printer, "printers.cgi") == 0)
+  {
     printer = NULL;
-
- /*
-  * Print the standard header...
-  */
-
-  puts("<HTML>");
-  puts("<HEAD>");
-  if (printer)
-    puts("<META HTTP-EQUIV=\"Refresh\" CONTENT=\"10\">");
-  else
-    puts("<META HTTP-EQUIV=\"Refresh\" CONTENT=\"30\">");
-  printf("<TITLE>%s on %s - " CUPS_SVERSION "</TITLE>\n",
-         printer == NULL ? "Printers" : printer, getenv("SERVER_NAME"));
-  puts("<LINK REL=STYLESHEET TYPE=\"text/css\" HREF=\"/cups.css\">");
-  puts("<MAP NAME=\"navbar\">");
-#ifdef ESPPRINTPRO
-  puts("<AREA SHAPE=\"RECT\" COORDS=\"10,10,76,30\" HREF=\"/printers\" ALT=\"Current Printer Status\">");
-  puts("<AREA SHAPE=\"RECT\" COORDS=\"88,10,158,30\" HREF=\"/classes\" ALT=\"Current Printer Classes Status\">");
-  puts("<AREA SHAPE=\"RECT\" COORDS=\"170,10,210,30\" HREF=\"/jobs\" ALT=\"Current Jobs Status\">");
-  puts("<AREA SHAPE=\"RECT\" COORDS=\"222,10,354,30\" HREF=\"/documentation.html\" ALT=\"Read CUPS Documentation On-Line\">");
-  puts("<AREA SHAPE=\"RECT\" COORDS=\"366,10,442,30\" HREF=\"http://www.easysw.com/software.html\" ALT=\"Download the Current ESP Print Pro Software\">");
-  puts("<AREA SHAPE=\"RECT\" COORDS=\"454,10,530,30\" HREF=\"http://www.easysw.com/support.html\" ALT=\"Get Tech Support for Current ESP Print Pro\">");
-#else
-  puts("<AREA SHAPE=\"RECT\" COORDS=\"10,10,85,30\" HREF=\"/printers\" ALT=\"Current Printer Status\">");
-  puts("<AREA SHAPE=\"RECT\" COORDS=\"95,10,175,30\" HREF=\"/classes\" ALT=\"Current Printer Classes Status\">");
-  puts("<AREA SHAPE=\"RECT\" COORDS=\"185,10,235,30\" HREF=\"/jobs\" ALT=\"Current Jobs Status\">");
-  puts("<AREA SHAPE=\"RECT\" COORDS=\"245,10,395,30\" HREF=\"/documentation.html\" ALT=\"Read CUPS Documentation On-Line\">");
-  puts("<AREA SHAPE=\"RECT\" COORDS=\"405,10,490,30\" HREF=\"http://www.cups.org\" ALT=\"Download the Current CUPS Software\">");
-#endif /* ESPPRINTPRO */
-  puts("</MAP>");
-  puts("</HEAD>");
-  puts("<BODY>");
-  puts("<P ALIGN=CENTER>");
-  puts("<A HREF=\"http://www.easysw.com\" ALT=\"Easy Software Products Home Page\">");
-  puts("<IMG SRC=\"/images/logo.gif\" WIDTH=\"71\" HEIGHT=\"40\" BORDER=0 ALT=\"Easy Software Products Home Page\"></A>");
-  puts("<IMG SRC=\"/images/navbar.gif\" WIDTH=\"540\" HEIGHT=\"40\" USEMAP=\"#navbar\" BORDER=0>");
-
-  printf("<H1>%s on %s</H1>\n", printer == NULL ? "Printers" : printer,
-         getenv("SERVER_NAME"));
-  fflush(stdout);
-
-  puts("<CENTER>");
-  puts("<TABLE WIDTH=\"90%\" BORDER=\"1\">");
-  puts("<TR>");
-  puts("<TH>Name</TH>");
-  puts("<TH WIDTH=\"50%\">Status</TH>");
-  puts("<TH WIDTH=\"25%\">Jobs</TH>");
-  puts("</TR>");
-
- /*
-  * Show the information...
-  */
-
-  if (printer == NULL)
-    show_printer_list(http, language);
+    cgiSetVariable("TITLE", "Printers");
+  }
   else
-    show_printer_info(http, language, printer);
+    cgiSetVariable("TITLE", printer);
 
  /*
-  * Write a standard trailer...
-  */
-
-  puts("</TABLE>");
-  puts("</CENTER>");
-
-  puts("<HR>");
-
-  puts("<P>The Common UNIX Printing System, CUPS, and the CUPS logo are the");
-  puts("trademark property of <A HREF=\"http://www.easysw.com\">Easy Software");
-  puts("Products</A>. CUPS is copyright 1997-1999 by Easy Software Products,");
-  puts("All Rights Reserved.");
-
-  puts("</BODY>");
-  puts("</HTML>");
-
- /*
-  * Close the HTTP server connection...
-  */
-
-  httpClose(http);
-  cupsLangFree(language);
-
- /*
-  * Return with no errors...
-  */
-
-  return (0);
-}
-
-
-/*
- * 'show_printer_list()' - Show a list of printers...
- */
-
-static void
-show_printer_list(http_t      *http,   /* I - HTTP connection */
-                  cups_lang_t *language)/* I - Client's language */
-{
-  ipp_t                *request,       /* IPP request */
-               *response;      /* IPP response */
-  ipp_attribute_t *attr;       /* IPP attribute */
-
-
- /*
-  * Build a CUPS_GET_PRINTERS request, which requires the following
-  * attributes:
-  *
-  *    attributes-charset
-  *    attributes-natural-language
+  * Get the printer info...
   */
 
   request = ippNew();
 
-  request->request.op.operation_id = CUPS_GET_PRINTERS;
-  request->request.op.request_id   = 1;
-
-
   ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
                "attributes-charset", NULL, cupsLangEncoding(language));
 
   ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
                "attributes-natural-language", NULL, language->language);
 
- /*
-  * Do the request and get back a response...
-  */
-
-  if ((response = cupsDoRequest(http, request, "/")) != NULL)
+  if (printer == NULL)
   {
    /*
-    * Loop through the printers returned in the list and display
-    * their devices...
+    * Build a CUPS_GET_PRINTERS request, which requires the following
+    * attributes:
+    *
+    *    attributes-charset
+    *    attributes-natural-language
     */
 
-    for (attr = response->attrs; attr != NULL; attr = attr->next)
-    {
-     /*
-      * Skip leading attributes until we hit a job...
-      */
-
-      while (attr != NULL && attr->group_tag != IPP_TAG_PRINTER)
-        attr = attr->next;
-
-      if (attr == NULL)
-        break;
-
-     /*
-      * Show the printer status for each printer...
-      */
-
-      while (attr != NULL && attr->group_tag == IPP_TAG_PRINTER)
-      {
-        if (strcmp(attr->name, "printer-name") == 0 &&
-           attr->value_tag == IPP_TAG_NAME)
-         show_printer_info(http, language, attr->values[0].string.text);
-
-        attr = attr->next;
-      }
-
-      if (attr == NULL)
-        break;
-    }
-
-    ippDelete(response);
-  }
-}
-
-
-/*
- * 'show_printer_info()' - Show printer information.
- */
-
-static void
-show_printer_info(http_t      *http,
-                  cups_lang_t *language,
-                  char        *name)
-{
-  ipp_t                *request,       /* IPP request */
-               *response,      /* IPP response */
-               *jobs;          /* IPP Get Jobs response */
-  int          jobcount;       /* Number of jobs */
-  ipp_attribute_t *attr;       /* IPP attribute */
-  char         *message;       /* Printer state message */
-  int          accepting;      /* Accepting requests? */
-  ipp_pstate_t pstate;         /* Printer state */
-  char         uri[HTTP_MAX_URI];/* Printer URI */
-
-
- /*
-  * Build a IPP_GET_PRINTER_ATTRIBUTES request, which requires the following
-  * attributes:
-  *
-  *    attributes-charset
-  *    attributes-natural-language
-  *    printer-uri
-  */
-
-  request = ippNew();
-
-  request->request.op.operation_id = IPP_GET_PRINTER_ATTRIBUTES;
-  request->request.op.request_id   = 1;
-
-  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
-               "attributes-charset", NULL, cupsLangEncoding(language));
-
-  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
-               "attributes-natural-language", NULL, language->language);
-
-  snprintf(uri, sizeof(uri), "ipp://localhost/printers/%s", name);
-
-  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri);
-
- /*
-  * Do the request and get back a response...
-  */
-
-  if ((response = cupsDoRequest(http, request, "/")) == NULL)
-  {
-    puts("<P>Unable to communicate with CUPS server!");
-    return;
-  }
-
-  if (response->request.status.status_code == IPP_NOT_FOUND)
-  {
-    puts("<P>Printer does not exist.");
-    ippDelete(response);
-    return;
+    request->request.op.operation_id = CUPS_GET_PRINTERS;
+    request->request.op.request_id   = 1;
   }
-
- /*
-  * Grab the needed printer attributes...
-  */
-
-  if ((attr = ippFindAttribute(response, "printer-state", IPP_TAG_ENUM)) != NULL)
-    pstate = (ipp_pstate_t)attr->values[0].integer;
-  else
-    pstate = IPP_PRINTER_IDLE;
-
-  if ((attr = ippFindAttribute(response, "printer-state-message", IPP_TAG_TEXT)) != NULL)
-    message = attr->values[0].string.text;
   else
-    message = NULL;
-
-  if ((attr = ippFindAttribute(response, "printer-is-accepting-jobs",
-                               IPP_TAG_BOOLEAN)) != NULL)
-    accepting = attr->values[0].boolean;
-  else
-    accepting = 1;
-
-  if ((attr = ippFindAttribute(response, "printer-uri-supported", IPP_TAG_URI)) != NULL)
-  {
-    strcpy(uri, "http:");
-    strncpy(uri + 5, strchr(attr->values[0].string.text, '/'), sizeof(uri) - 6);
-    uri[sizeof(uri) - 1] = '\0';
-  }
-
- /*
-  * Display the printer entry...
-  */
-
-  puts("<TR>");
-
-  printf("<TD VALIGN=TOP><A HREF=\"%s\">%s</A></TD>\n", uri, name);
-
-  printf("<TD VALIGN=TOP><IMG SRC=\"/images/printer-%s.gif\" ALIGN=\"LEFT\">\n",
-         pstate == IPP_PRINTER_IDLE ? "idle" :
-            pstate == IPP_PRINTER_PROCESSING ? "processing" : "stopped");
-
-  printf("%s: %s, %s<BR>\n",
-         cupsLangString(language, CUPS_MSG_PRINTER_STATE),
-         cupsLangString(language, pstate == IPP_PRINTER_IDLE ? CUPS_MSG_IDLE :
-                                 pstate == IPP_PRINTER_PROCESSING ?
-                                 CUPS_MSG_PROCESSING : CUPS_MSG_STOPPED),
-         cupsLangString(language, accepting ? CUPS_MSG_ACCEPTING_JOBS :
-                                 CUPS_MSG_NOT_ACCEPTING_JOBS));
-
-  if (message)
-    printf("<BR CLEAR=ALL><I>\"%s\"</I>\n", message);
-  else if (!accepting || pstate == IPP_PRINTER_STOPPED)
-    puts("<BR CLEAR=ALL><I>\"Reason Unknown\"</I>");
-
-  puts("</TD>");
-
- /*
-  * Show a list of jobs as needed...
-  */
-
-  if (pstate != IPP_PRINTER_IDLE)
   {
    /*
-    * Build an IPP_GET_JOBS request, which requires the following
+    * Build a IPP_GET_PRINTER_ATTRIBUTES request, which requires the following
     * attributes:
     *
     *    attributes-charset
@@ -387,102 +121,48 @@ show_printer_info(http_t      *http,
     *    printer-uri
     */
 
-    request = ippNew();
-
-    request->request.op.operation_id = IPP_GET_JOBS;
+    request->request.op.operation_id = IPP_GET_PRINTER_ATTRIBUTES;
     request->request.op.request_id   = 1;
 
-    ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
-                 "attributes-charset", NULL,
-                cupsLangEncoding(language));
-
-    ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
-                 "attributes-natural-language", NULL,
-                language->language);
-
-    snprintf(uri, sizeof(uri), "ipp://localhost/printers/%s", name);
-    ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
-                "printer-uri", NULL, uri);
-
-    jobs = cupsDoRequest(http, request, "/");
+    snprintf(uri, sizeof(uri), "ipp://%s/printers/%s", getenv("SERVER_NAME"),
+             printer);
+    ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL,
+                 uri);
   }
-  else
-    jobs = NULL;
 
-  puts("<TD VALIGN=\"TOP\">");
-  jobcount = 0;
+ /*
+  * Do the request and get back a response...
+  */
 
-  if (jobs != NULL)
+  if ((response = cupsDoRequest(http, request, "/")) != NULL)
   {
-    char       *username;      /* Pointer to job-originating-user-name */
-    int                jobid,          /* job-id */
-               size;           /* job-k-octets */
-
-
-    for (attr = jobs->attrs; attr != NULL; attr = attr->next)
-    {
-     /*
-      * Skip leading attributes until we hit a job...
-      */
-
-      while (attr != NULL && attr->group_tag != IPP_TAG_JOB)
-        attr = attr->next;
-
-      if (attr == NULL)
-        break;
-
-     /*
-      * Pull the needed attributes from this job...
-      */
-
-      jobid    = 0;
-      size     = 0;
-      username = NULL;
-
-      while (attr != NULL && attr->group_tag == IPP_TAG_JOB)
-      {
-        if (strcmp(attr->name, "job-id") == 0 &&
-           attr->value_tag == IPP_TAG_INTEGER)
-         jobid = attr->values[0].integer;
-
-        if (strcmp(attr->name, "job-k-octets") == 0 &&
-           attr->value_tag == IPP_TAG_INTEGER)
-         size = attr->values[0].integer;
-
-        if (strcmp(attr->name, "job-originating-user-name") == 0 &&
-           attr->value_tag == IPP_TAG_NAME)
-         username = attr->values[0].string.text;
-
-        attr = attr->next;
-      }
+    ippSetCGIVars(response);
+    ippDelete(response);
+  }
 
    /*
-      * Display the job if it matches the current printer...
-      */
+ /*
+  * Write the report...
+  */
 
-      if (username != NULL)
-      {
-       jobcount ++;
-       printf("<A HREF=\"/jobs/%d\">%s-%d %s %dk</A><BR>\n", jobid, name,
-              jobid, username, size);
-      }
+  cgiCopyTemplateFile(stdout, TEMPLATES "/header.tmpl");
+  cgiCopyTemplateFile(stdout, TEMPLATES "/printers.tmpl");
+  cgiCopyTemplateFile(stdout, TEMPLATES "/trailer.tmpl");
 
-      if (attr == NULL)
-        break;
-    }
+ /*
+  * Close the HTTP server connection...
+  */
 
-    ippDelete(jobs);
-  }
+  httpClose(http);
+  cupsLangFree(language);
 
-  if (jobcount == 0)
-    puts("None");
-  puts("</TD>");
-  puts("</TR>");
+ /*
+  * Return with no errors...
+  */
 
-  ippDelete(response);
+  return (0);
 }
 
 
 /*
- * End of "$Id: printers.c,v 1.13 1999/11/04 14:57:57 mike Exp $".
+ * End of "$Id: printers.c,v 1.14 2000/02/01 02:52:23 mike Exp $".
  */
diff --git a/templates/add-class.tmpl b/templates/add-class.tmpl
new file mode 100644 (file)
index 0000000..64e3b00
--- /dev/null
@@ -0,0 +1,62 @@
+<HTML>
+<HEAD>
+       <TITLE>Printers on {server_name} - {cups_version}</TITLE>
+       <LINK REL=STYLESHEET TYPE="text/css" HREF="/cups.css">
+       <MAP NAME="navbar">
+               <AREA SHAPE="RECT" COORDS="10,10,85,30" HREF="/printers" ALT="Current Printer Status">
+               <AREA SHAPE="RECT" COORDS="95,10,175,30" HREF="/classes" ALT="Current Printer Classes Status">
+               <AREA SHAPE="RECT" COORDS="185,10,235,30" HREF="/jobs" ALT="Current Jobs Status">
+               <AREA SHAPE="RECT" COORDS="245,10,395,30" HREF="/documentation.html" ALT="Read CUPS Documentation On-Line">
+               <AREA SHAPE="RECT" COORDS="405,10,490,30" HREF="http://www.cups.org" ALT="Download the Current CUPS Software">
+       </MAP>
+       <STYLE>
+BODY { background-color: #cccc99 }
+H1 { font-family: sans-serif; }
+H2 { font-family: sans-serif; }
+TH { background-color: #999966 }
+       </STYLE>
+</HEAD>
+<BODY>
+<P>
+<A HREF="http://www.easysw.com" ALT="Easy Software Products Home Page">
+<IMG SRC="../images/logo.gif" WIDTH="71" HEIGHT="40" BORDER=0 ALT="Easy Software Products Home Page"></A>
+<IMG SRC="../images/navbar.gif" WIDTH="540" HEIGHT="40" USEMAP="#navbar" BORDER=0>
+
+<H1>Printers on {server_name}</H1>
+
+<TABLE BORDER="1">
+<TR>
+       <TH>Name</TH>
+       <TH>Information</TH>
+</TR>
+<TR>
+       <TD COLSPAN="2"><IMG SRC="images/add-printer.gif"></TD>
+</TR>
+{[printer_name]
+<TR>
+       <TD VALIGN=TOP><A HREF="{printer_uri}">
+       <IMG SRC="../images/printer-idle.gif" BORDER="0"><BR>{printer_name}</A></TD>
+       <TD VALIGN=TOP>Make and Model: {printer_make_and_model}<BR>
+       Location: {printer_location}<BR>
+       Printer State: {printer_idle},
+       {printer_is_accepting_jobs=0?rejecting jobs:accepting jobs}.
+       <P>
+       <IMG SRC="../images/print-test-page.gif">
+       <IMG SRC="../images/modify-printer.gif">
+       <IMG SRC="../images/start-printer.gif">
+       <IMG SRC="../images/stop-printer.gif">
+       <IMG SRC="../images/accept-jobs.gif">
+       <IMG SRC="../images/reject-jobs.gif">
+       <IMG SRC="../images/delete-printer.gif">
+       </TD>
+</TR>
+}
+</TABLE>
+</CENTER>
+<HR>
+<P>The Common UNIX Printing System, CUPS, and the CUPS logo are the
+trademark property of <A HREF="http://www.easysw.com">Easy Software
+Products</A>. CUPS is copyright 1997-1999 by Easy Software Products,
+All Rights Reserved.
+</BODY>
+</HTML>
diff --git a/templates/add-printer.tmpl b/templates/add-printer.tmpl
new file mode 100644 (file)
index 0000000..64e3b00
--- /dev/null
@@ -0,0 +1,62 @@
+<HTML>
+<HEAD>
+       <TITLE>Printers on {server_name} - {cups_version}</TITLE>
+       <LINK REL=STYLESHEET TYPE="text/css" HREF="/cups.css">
+       <MAP NAME="navbar">
+               <AREA SHAPE="RECT" COORDS="10,10,85,30" HREF="/printers" ALT="Current Printer Status">
+               <AREA SHAPE="RECT" COORDS="95,10,175,30" HREF="/classes" ALT="Current Printer Classes Status">
+               <AREA SHAPE="RECT" COORDS="185,10,235,30" HREF="/jobs" ALT="Current Jobs Status">
+               <AREA SHAPE="RECT" COORDS="245,10,395,30" HREF="/documentation.html" ALT="Read CUPS Documentation On-Line">
+               <AREA SHAPE="RECT" COORDS="405,10,490,30" HREF="http://www.cups.org" ALT="Download the Current CUPS Software">
+       </MAP>
+       <STYLE>
+BODY { background-color: #cccc99 }
+H1 { font-family: sans-serif; }
+H2 { font-family: sans-serif; }
+TH { background-color: #999966 }
+       </STYLE>
+</HEAD>
+<BODY>
+<P>
+<A HREF="http://www.easysw.com" ALT="Easy Software Products Home Page">
+<IMG SRC="../images/logo.gif" WIDTH="71" HEIGHT="40" BORDER=0 ALT="Easy Software Products Home Page"></A>
+<IMG SRC="../images/navbar.gif" WIDTH="540" HEIGHT="40" USEMAP="#navbar" BORDER=0>
+
+<H1>Printers on {server_name}</H1>
+
+<TABLE BORDER="1">
+<TR>
+       <TH>Name</TH>
+       <TH>Information</TH>
+</TR>
+<TR>
+       <TD COLSPAN="2"><IMG SRC="images/add-printer.gif"></TD>
+</TR>
+{[printer_name]
+<TR>
+       <TD VALIGN=TOP><A HREF="{printer_uri}">
+       <IMG SRC="../images/printer-idle.gif" BORDER="0"><BR>{printer_name}</A></TD>
+       <TD VALIGN=TOP>Make and Model: {printer_make_and_model}<BR>
+       Location: {printer_location}<BR>
+       Printer State: {printer_idle},
+       {printer_is_accepting_jobs=0?rejecting jobs:accepting jobs}.
+       <P>
+       <IMG SRC="../images/print-test-page.gif">
+       <IMG SRC="../images/modify-printer.gif">
+       <IMG SRC="../images/start-printer.gif">
+       <IMG SRC="../images/stop-printer.gif">
+       <IMG SRC="../images/accept-jobs.gif">
+       <IMG SRC="../images/reject-jobs.gif">
+       <IMG SRC="../images/delete-printer.gif">
+       </TD>
+</TR>
+}
+</TABLE>
+</CENTER>
+<HR>
+<P>The Common UNIX Printing System, CUPS, and the CUPS logo are the
+trademark property of <A HREF="http://www.easysw.com">Easy Software
+Products</A>. CUPS is copyright 1997-1999 by Easy Software Products,
+All Rights Reserved.
+</BODY>
+</HTML>
diff --git a/templates/admin.tmpl b/templates/admin.tmpl
new file mode 100644 (file)
index 0000000..64e3b00
--- /dev/null
@@ -0,0 +1,62 @@
+<HTML>
+<HEAD>
+       <TITLE>Printers on {server_name} - {cups_version}</TITLE>
+       <LINK REL=STYLESHEET TYPE="text/css" HREF="/cups.css">
+       <MAP NAME="navbar">
+               <AREA SHAPE="RECT" COORDS="10,10,85,30" HREF="/printers" ALT="Current Printer Status">
+               <AREA SHAPE="RECT" COORDS="95,10,175,30" HREF="/classes" ALT="Current Printer Classes Status">
+               <AREA SHAPE="RECT" COORDS="185,10,235,30" HREF="/jobs" ALT="Current Jobs Status">
+               <AREA SHAPE="RECT" COORDS="245,10,395,30" HREF="/documentation.html" ALT="Read CUPS Documentation On-Line">
+               <AREA SHAPE="RECT" COORDS="405,10,490,30" HREF="http://www.cups.org" ALT="Download the Current CUPS Software">
+       </MAP>
+       <STYLE>
+BODY { background-color: #cccc99 }
+H1 { font-family: sans-serif; }
+H2 { font-family: sans-serif; }
+TH { background-color: #999966 }
+       </STYLE>
+</HEAD>
+<BODY>
+<P>
+<A HREF="http://www.easysw.com" ALT="Easy Software Products Home Page">
+<IMG SRC="../images/logo.gif" WIDTH="71" HEIGHT="40" BORDER=0 ALT="Easy Software Products Home Page"></A>
+<IMG SRC="../images/navbar.gif" WIDTH="540" HEIGHT="40" USEMAP="#navbar" BORDER=0>
+
+<H1>Printers on {server_name}</H1>
+
+<TABLE BORDER="1">
+<TR>
+       <TH>Name</TH>
+       <TH>Information</TH>
+</TR>
+<TR>
+       <TD COLSPAN="2"><IMG SRC="images/add-printer.gif"></TD>
+</TR>
+{[printer_name]
+<TR>
+       <TD VALIGN=TOP><A HREF="{printer_uri}">
+       <IMG SRC="../images/printer-idle.gif" BORDER="0"><BR>{printer_name}</A></TD>
+       <TD VALIGN=TOP>Make and Model: {printer_make_and_model}<BR>
+       Location: {printer_location}<BR>
+       Printer State: {printer_idle},
+       {printer_is_accepting_jobs=0?rejecting jobs:accepting jobs}.
+       <P>
+       <IMG SRC="../images/print-test-page.gif">
+       <IMG SRC="../images/modify-printer.gif">
+       <IMG SRC="../images/start-printer.gif">
+       <IMG SRC="../images/stop-printer.gif">
+       <IMG SRC="../images/accept-jobs.gif">
+       <IMG SRC="../images/reject-jobs.gif">
+       <IMG SRC="../images/delete-printer.gif">
+       </TD>
+</TR>
+}
+</TABLE>
+</CENTER>
+<HR>
+<P>The Common UNIX Printing System, CUPS, and the CUPS logo are the
+trademark property of <A HREF="http://www.easysw.com">Easy Software
+Products</A>. CUPS is copyright 1997-1999 by Easy Software Products,
+All Rights Reserved.
+</BODY>
+</HTML>
diff --git a/templates/choose-device.tmpl b/templates/choose-device.tmpl
new file mode 100644 (file)
index 0000000..64e3b00
--- /dev/null
@@ -0,0 +1,62 @@
+<HTML>
+<HEAD>
+       <TITLE>Printers on {server_name} - {cups_version}</TITLE>
+       <LINK REL=STYLESHEET TYPE="text/css" HREF="/cups.css">
+       <MAP NAME="navbar">
+               <AREA SHAPE="RECT" COORDS="10,10,85,30" HREF="/printers" ALT="Current Printer Status">
+               <AREA SHAPE="RECT" COORDS="95,10,175,30" HREF="/classes" ALT="Current Printer Classes Status">
+               <AREA SHAPE="RECT" COORDS="185,10,235,30" HREF="/jobs" ALT="Current Jobs Status">
+               <AREA SHAPE="RECT" COORDS="245,10,395,30" HREF="/documentation.html" ALT="Read CUPS Documentation On-Line">
+               <AREA SHAPE="RECT" COORDS="405,10,490,30" HREF="http://www.cups.org" ALT="Download the Current CUPS Software">
+       </MAP>
+       <STYLE>
+BODY { background-color: #cccc99 }
+H1 { font-family: sans-serif; }
+H2 { font-family: sans-serif; }
+TH { background-color: #999966 }
+       </STYLE>
+</HEAD>
+<BODY>
+<P>
+<A HREF="http://www.easysw.com" ALT="Easy Software Products Home Page">
+<IMG SRC="../images/logo.gif" WIDTH="71" HEIGHT="40" BORDER=0 ALT="Easy Software Products Home Page"></A>
+<IMG SRC="../images/navbar.gif" WIDTH="540" HEIGHT="40" USEMAP="#navbar" BORDER=0>
+
+<H1>Printers on {server_name}</H1>
+
+<TABLE BORDER="1">
+<TR>
+       <TH>Name</TH>
+       <TH>Information</TH>
+</TR>
+<TR>
+       <TD COLSPAN="2"><IMG SRC="images/add-printer.gif"></TD>
+</TR>
+{[printer_name]
+<TR>
+       <TD VALIGN=TOP><A HREF="{printer_uri}">
+       <IMG SRC="../images/printer-idle.gif" BORDER="0"><BR>{printer_name}</A></TD>
+       <TD VALIGN=TOP>Make and Model: {printer_make_and_model}<BR>
+       Location: {printer_location}<BR>
+       Printer State: {printer_idle},
+       {printer_is_accepting_jobs=0?rejecting jobs:accepting jobs}.
+       <P>
+       <IMG SRC="../images/print-test-page.gif">
+       <IMG SRC="../images/modify-printer.gif">
+       <IMG SRC="../images/start-printer.gif">
+       <IMG SRC="../images/stop-printer.gif">
+       <IMG SRC="../images/accept-jobs.gif">
+       <IMG SRC="../images/reject-jobs.gif">
+       <IMG SRC="../images/delete-printer.gif">
+       </TD>
+</TR>
+}
+</TABLE>
+</CENTER>
+<HR>
+<P>The Common UNIX Printing System, CUPS, and the CUPS logo are the
+trademark property of <A HREF="http://www.easysw.com">Easy Software
+Products</A>. CUPS is copyright 1997-1999 by Easy Software Products,
+All Rights Reserved.
+</BODY>
+</HTML>
diff --git a/templates/choose-make.tmpl b/templates/choose-make.tmpl
new file mode 100644 (file)
index 0000000..64e3b00
--- /dev/null
@@ -0,0 +1,62 @@
+<HTML>
+<HEAD>
+       <TITLE>Printers on {server_name} - {cups_version}</TITLE>
+       <LINK REL=STYLESHEET TYPE="text/css" HREF="/cups.css">
+       <MAP NAME="navbar">
+               <AREA SHAPE="RECT" COORDS="10,10,85,30" HREF="/printers" ALT="Current Printer Status">
+               <AREA SHAPE="RECT" COORDS="95,10,175,30" HREF="/classes" ALT="Current Printer Classes Status">
+               <AREA SHAPE="RECT" COORDS="185,10,235,30" HREF="/jobs" ALT="Current Jobs Status">
+               <AREA SHAPE="RECT" COORDS="245,10,395,30" HREF="/documentation.html" ALT="Read CUPS Documentation On-Line">
+               <AREA SHAPE="RECT" COORDS="405,10,490,30" HREF="http://www.cups.org" ALT="Download the Current CUPS Software">
+       </MAP>
+       <STYLE>
+BODY { background-color: #cccc99 }
+H1 { font-family: sans-serif; }
+H2 { font-family: sans-serif; }
+TH { background-color: #999966 }
+       </STYLE>
+</HEAD>
+<BODY>
+<P>
+<A HREF="http://www.easysw.com" ALT="Easy Software Products Home Page">
+<IMG SRC="../images/logo.gif" WIDTH="71" HEIGHT="40" BORDER=0 ALT="Easy Software Products Home Page"></A>
+<IMG SRC="../images/navbar.gif" WIDTH="540" HEIGHT="40" USEMAP="#navbar" BORDER=0>
+
+<H1>Printers on {server_name}</H1>
+
+<TABLE BORDER="1">
+<TR>
+       <TH>Name</TH>
+       <TH>Information</TH>
+</TR>
+<TR>
+       <TD COLSPAN="2"><IMG SRC="images/add-printer.gif"></TD>
+</TR>
+{[printer_name]
+<TR>
+       <TD VALIGN=TOP><A HREF="{printer_uri}">
+       <IMG SRC="../images/printer-idle.gif" BORDER="0"><BR>{printer_name}</A></TD>
+       <TD VALIGN=TOP>Make and Model: {printer_make_and_model}<BR>
+       Location: {printer_location}<BR>
+       Printer State: {printer_idle},
+       {printer_is_accepting_jobs=0?rejecting jobs:accepting jobs}.
+       <P>
+       <IMG SRC="../images/print-test-page.gif">
+       <IMG SRC="../images/modify-printer.gif">
+       <IMG SRC="../images/start-printer.gif">
+       <IMG SRC="../images/stop-printer.gif">
+       <IMG SRC="../images/accept-jobs.gif">
+       <IMG SRC="../images/reject-jobs.gif">
+       <IMG SRC="../images/delete-printer.gif">
+       </TD>
+</TR>
+}
+</TABLE>
+</CENTER>
+<HR>
+<P>The Common UNIX Printing System, CUPS, and the CUPS logo are the
+trademark property of <A HREF="http://www.easysw.com">Easy Software
+Products</A>. CUPS is copyright 1997-1999 by Easy Software Products,
+All Rights Reserved.
+</BODY>
+</HTML>
diff --git a/templates/choose-model.tmpl b/templates/choose-model.tmpl
new file mode 100644 (file)
index 0000000..64e3b00
--- /dev/null
@@ -0,0 +1,62 @@
+<HTML>
+<HEAD>
+       <TITLE>Printers on {server_name} - {cups_version}</TITLE>
+       <LINK REL=STYLESHEET TYPE="text/css" HREF="/cups.css">
+       <MAP NAME="navbar">
+               <AREA SHAPE="RECT" COORDS="10,10,85,30" HREF="/printers" ALT="Current Printer Status">
+               <AREA SHAPE="RECT" COORDS="95,10,175,30" HREF="/classes" ALT="Current Printer Classes Status">
+               <AREA SHAPE="RECT" COORDS="185,10,235,30" HREF="/jobs" ALT="Current Jobs Status">
+               <AREA SHAPE="RECT" COORDS="245,10,395,30" HREF="/documentation.html" ALT="Read CUPS Documentation On-Line">
+               <AREA SHAPE="RECT" COORDS="405,10,490,30" HREF="http://www.cups.org" ALT="Download the Current CUPS Software">
+       </MAP>
+       <STYLE>
+BODY { background-color: #cccc99 }
+H1 { font-family: sans-serif; }
+H2 { font-family: sans-serif; }
+TH { background-color: #999966 }
+       </STYLE>
+</HEAD>
+<BODY>
+<P>
+<A HREF="http://www.easysw.com" ALT="Easy Software Products Home Page">
+<IMG SRC="../images/logo.gif" WIDTH="71" HEIGHT="40" BORDER=0 ALT="Easy Software Products Home Page"></A>
+<IMG SRC="../images/navbar.gif" WIDTH="540" HEIGHT="40" USEMAP="#navbar" BORDER=0>
+
+<H1>Printers on {server_name}</H1>
+
+<TABLE BORDER="1">
+<TR>
+       <TH>Name</TH>
+       <TH>Information</TH>
+</TR>
+<TR>
+       <TD COLSPAN="2"><IMG SRC="images/add-printer.gif"></TD>
+</TR>
+{[printer_name]
+<TR>
+       <TD VALIGN=TOP><A HREF="{printer_uri}">
+       <IMG SRC="../images/printer-idle.gif" BORDER="0"><BR>{printer_name}</A></TD>
+       <TD VALIGN=TOP>Make and Model: {printer_make_and_model}<BR>
+       Location: {printer_location}<BR>
+       Printer State: {printer_idle},
+       {printer_is_accepting_jobs=0?rejecting jobs:accepting jobs}.
+       <P>
+       <IMG SRC="../images/print-test-page.gif">
+       <IMG SRC="../images/modify-printer.gif">
+       <IMG SRC="../images/start-printer.gif">
+       <IMG SRC="../images/stop-printer.gif">
+       <IMG SRC="../images/accept-jobs.gif">
+       <IMG SRC="../images/reject-jobs.gif">
+       <IMG SRC="../images/delete-printer.gif">
+       </TD>
+</TR>
+}
+</TABLE>
+</CENTER>
+<HR>
+<P>The Common UNIX Printing System, CUPS, and the CUPS logo are the
+trademark property of <A HREF="http://www.easysw.com">Easy Software
+Products</A>. CUPS is copyright 1997-1999 by Easy Software Products,
+All Rights Reserved.
+</BODY>
+</HTML>
diff --git a/templates/choose-uri.tmpl b/templates/choose-uri.tmpl
new file mode 100644 (file)
index 0000000..64e3b00
--- /dev/null
@@ -0,0 +1,62 @@
+<HTML>
+<HEAD>
+       <TITLE>Printers on {server_name} - {cups_version}</TITLE>
+       <LINK REL=STYLESHEET TYPE="text/css" HREF="/cups.css">
+       <MAP NAME="navbar">
+               <AREA SHAPE="RECT" COORDS="10,10,85,30" HREF="/printers" ALT="Current Printer Status">
+               <AREA SHAPE="RECT" COORDS="95,10,175,30" HREF="/classes" ALT="Current Printer Classes Status">
+               <AREA SHAPE="RECT" COORDS="185,10,235,30" HREF="/jobs" ALT="Current Jobs Status">
+               <AREA SHAPE="RECT" COORDS="245,10,395,30" HREF="/documentation.html" ALT="Read CUPS Documentation On-Line">
+               <AREA SHAPE="RECT" COORDS="405,10,490,30" HREF="http://www.cups.org" ALT="Download the Current CUPS Software">
+       </MAP>
+       <STYLE>
+BODY { background-color: #cccc99 }
+H1 { font-family: sans-serif; }
+H2 { font-family: sans-serif; }
+TH { background-color: #999966 }
+       </STYLE>
+</HEAD>
+<BODY>
+<P>
+<A HREF="http://www.easysw.com" ALT="Easy Software Products Home Page">
+<IMG SRC="../images/logo.gif" WIDTH="71" HEIGHT="40" BORDER=0 ALT="Easy Software Products Home Page"></A>
+<IMG SRC="../images/navbar.gif" WIDTH="540" HEIGHT="40" USEMAP="#navbar" BORDER=0>
+
+<H1>Printers on {server_name}</H1>
+
+<TABLE BORDER="1">
+<TR>
+       <TH>Name</TH>
+       <TH>Information</TH>
+</TR>
+<TR>
+       <TD COLSPAN="2"><IMG SRC="images/add-printer.gif"></TD>
+</TR>
+{[printer_name]
+<TR>
+       <TD VALIGN=TOP><A HREF="{printer_uri}">
+       <IMG SRC="../images/printer-idle.gif" BORDER="0"><BR>{printer_name}</A></TD>
+       <TD VALIGN=TOP>Make and Model: {printer_make_and_model}<BR>
+       Location: {printer_location}<BR>
+       Printer State: {printer_idle},
+       {printer_is_accepting_jobs=0?rejecting jobs:accepting jobs}.
+       <P>
+       <IMG SRC="../images/print-test-page.gif">
+       <IMG SRC="../images/modify-printer.gif">
+       <IMG SRC="../images/start-printer.gif">
+       <IMG SRC="../images/stop-printer.gif">
+       <IMG SRC="../images/accept-jobs.gif">
+       <IMG SRC="../images/reject-jobs.gif">
+       <IMG SRC="../images/delete-printer.gif">
+       </TD>
+</TR>
+}
+</TABLE>
+</CENTER>
+<HR>
+<P>The Common UNIX Printing System, CUPS, and the CUPS logo are the
+trademark property of <A HREF="http://www.easysw.com">Easy Software
+Products</A>. CUPS is copyright 1997-1999 by Easy Software Products,
+All Rights Reserved.
+</BODY>
+</HTML>
diff --git a/templates/classes.tmpl b/templates/classes.tmpl
new file mode 100644 (file)
index 0000000..6bed378
--- /dev/null
@@ -0,0 +1,23 @@
+<TABLE BORDER="1">
+<TR>
+       <TH>Name</TH>
+       <TH>Information</TH>
+</TR>
+{[printer_name]
+<TR>
+       <TD VALIGN=TOP><A HREF="{printer_uri}">
+       <IMG SRC="../images/classes.gif" BORDER="0"><BR>{printer_name}</A></TD>
+       <TD VALIGN=TOP>Description: {printer_info}<BR>
+       Location: {printer_location}<BR>
+       Class State: {printer_state=3?idle:{printer_state=4?processing:stopped}}},
+       {printer_is_accepting_jobs=0?rejecting jobs:accepting jobs}.
+       <P>
+       <IMG SRC="../images/print-test-page.gif" ALT="Print Test Page">
+       <IMG SRC="../images/start-class.gif" ALT="Start Class">
+       <IMG SRC="../images/stop-class.gif" ALT="Stop Class">
+       <IMG SRC="../images/accept-jobs.gif" ALT="Accept Jobs">
+       <IMG SRC="../images/reject-jobs.gif" ALT="Reject Jobs">
+       </TD>
+</TR>
+}
+</TABLE>
diff --git a/templates/header.tmpl b/templates/header.tmpl
new file mode 100644 (file)
index 0000000..f3237f5
--- /dev/null
@@ -0,0 +1,18 @@
+<HTML>
+<HEAD>
+       <TITLE>{title} on {server_name} - {cups_version}</TITLE>
+       <LINK REL=STYLESHEET TYPE="text/css" HREF="../cups.css">
+       <MAP NAME="navbar">
+               <AREA SHAPE="RECT" COORDS="10,10,85,30" HREF="../printers" ALT="Current Printer Status">
+               <AREA SHAPE="RECT" COORDS="95,10,175,30" HREF="../classes" ALT="Current Printer Classes Status">
+               <AREA SHAPE="RECT" COORDS="185,10,235,30" HREF="../jobs" ALT="Current Jobs Status">
+               <AREA SHAPE="RECT" COORDS="245,10,395,30" HREF="../documentation.html" ALT="Read CUPS Documentation On-Line">
+               <AREA SHAPE="RECT" COORDS="405,10,490,30" HREF="http://www.cups.org" ALT="Download the Current CUPS Software">
+       </MAP>
+</HEAD>
+<BODY>
+<P>
+<A HREF="http://www.easysw.com" ALT="Easy Software Products Home Page">
+<IMG SRC="../images/logo.gif" WIDTH="71" HEIGHT="40" BORDER=0 ALT="Easy Software Products Home Page"></A>
+<IMG SRC="../images/navbar.gif" WIDTH="540" HEIGHT="40" USEMAP="#navbar" BORDER=0>
+<H1>{title}</H1>
diff --git a/templates/jobs.tmpl b/templates/jobs.tmpl
new file mode 100644 (file)
index 0000000..5ea00f9
--- /dev/null
@@ -0,0 +1,20 @@
+<TABLE BORDER="1">
+<TR>
+       <TH>ID</TH>
+       <TH>Information</TH>
+</TR>
+{[job_id]
+<TR>
+       <TD VALIGN=TOP>{job_id}</TD>
+       <TD VALIGN=TOP>Name: {job_name}<BR>
+       Who: {job_originating_user_name}<BR>
+       Size: {job_k_octets}k<BR>
+       State: {job_state=3?pending:{job_state=4?held:processing}}.
+       <P>
+       <IMG SRC="../images/hold-job.gif" ALT="Hold Job">
+       <IMG SRC="../images/resume-job.gif" ALT="Resume Job">
+       <IMG SRC="../images/cancel-job.gif" ALT="Cancel Job">
+       </TD>
+</TR>
+}
+</TABLE>
diff --git a/templates/modify-class.tmpl b/templates/modify-class.tmpl
new file mode 100644 (file)
index 0000000..64e3b00
--- /dev/null
@@ -0,0 +1,62 @@
+<HTML>
+<HEAD>
+       <TITLE>Printers on {server_name} - {cups_version}</TITLE>
+       <LINK REL=STYLESHEET TYPE="text/css" HREF="/cups.css">
+       <MAP NAME="navbar">
+               <AREA SHAPE="RECT" COORDS="10,10,85,30" HREF="/printers" ALT="Current Printer Status">
+               <AREA SHAPE="RECT" COORDS="95,10,175,30" HREF="/classes" ALT="Current Printer Classes Status">
+               <AREA SHAPE="RECT" COORDS="185,10,235,30" HREF="/jobs" ALT="Current Jobs Status">
+               <AREA SHAPE="RECT" COORDS="245,10,395,30" HREF="/documentation.html" ALT="Read CUPS Documentation On-Line">
+               <AREA SHAPE="RECT" COORDS="405,10,490,30" HREF="http://www.cups.org" ALT="Download the Current CUPS Software">
+       </MAP>
+       <STYLE>
+BODY { background-color: #cccc99 }
+H1 { font-family: sans-serif; }
+H2 { font-family: sans-serif; }
+TH { background-color: #999966 }
+       </STYLE>
+</HEAD>
+<BODY>
+<P>
+<A HREF="http://www.easysw.com" ALT="Easy Software Products Home Page">
+<IMG SRC="../images/logo.gif" WIDTH="71" HEIGHT="40" BORDER=0 ALT="Easy Software Products Home Page"></A>
+<IMG SRC="../images/navbar.gif" WIDTH="540" HEIGHT="40" USEMAP="#navbar" BORDER=0>
+
+<H1>Printers on {server_name}</H1>
+
+<TABLE BORDER="1">
+<TR>
+       <TH>Name</TH>
+       <TH>Information</TH>
+</TR>
+<TR>
+       <TD COLSPAN="2"><IMG SRC="images/add-printer.gif"></TD>
+</TR>
+{[printer_name]
+<TR>
+       <TD VALIGN=TOP><A HREF="{printer_uri}">
+       <IMG SRC="../images/printer-idle.gif" BORDER="0"><BR>{printer_name}</A></TD>
+       <TD VALIGN=TOP>Make and Model: {printer_make_and_model}<BR>
+       Location: {printer_location}<BR>
+       Printer State: {printer_idle},
+       {printer_is_accepting_jobs=0?rejecting jobs:accepting jobs}.
+       <P>
+       <IMG SRC="../images/print-test-page.gif">
+       <IMG SRC="../images/modify-printer.gif">
+       <IMG SRC="../images/start-printer.gif">
+       <IMG SRC="../images/stop-printer.gif">
+       <IMG SRC="../images/accept-jobs.gif">
+       <IMG SRC="../images/reject-jobs.gif">
+       <IMG SRC="../images/delete-printer.gif">
+       </TD>
+</TR>
+}
+</TABLE>
+</CENTER>
+<HR>
+<P>The Common UNIX Printing System, CUPS, and the CUPS logo are the
+trademark property of <A HREF="http://www.easysw.com">Easy Software
+Products</A>. CUPS is copyright 1997-1999 by Easy Software Products,
+All Rights Reserved.
+</BODY>
+</HTML>
diff --git a/templates/modify-printer.tmpl b/templates/modify-printer.tmpl
new file mode 100644 (file)
index 0000000..64e3b00
--- /dev/null
@@ -0,0 +1,62 @@
+<HTML>
+<HEAD>
+       <TITLE>Printers on {server_name} - {cups_version}</TITLE>
+       <LINK REL=STYLESHEET TYPE="text/css" HREF="/cups.css">
+       <MAP NAME="navbar">
+               <AREA SHAPE="RECT" COORDS="10,10,85,30" HREF="/printers" ALT="Current Printer Status">
+               <AREA SHAPE="RECT" COORDS="95,10,175,30" HREF="/classes" ALT="Current Printer Classes Status">
+               <AREA SHAPE="RECT" COORDS="185,10,235,30" HREF="/jobs" ALT="Current Jobs Status">
+               <AREA SHAPE="RECT" COORDS="245,10,395,30" HREF="/documentation.html" ALT="Read CUPS Documentation On-Line">
+               <AREA SHAPE="RECT" COORDS="405,10,490,30" HREF="http://www.cups.org" ALT="Download the Current CUPS Software">
+       </MAP>
+       <STYLE>
+BODY { background-color: #cccc99 }
+H1 { font-family: sans-serif; }
+H2 { font-family: sans-serif; }
+TH { background-color: #999966 }
+       </STYLE>
+</HEAD>
+<BODY>
+<P>
+<A HREF="http://www.easysw.com" ALT="Easy Software Products Home Page">
+<IMG SRC="../images/logo.gif" WIDTH="71" HEIGHT="40" BORDER=0 ALT="Easy Software Products Home Page"></A>
+<IMG SRC="../images/navbar.gif" WIDTH="540" HEIGHT="40" USEMAP="#navbar" BORDER=0>
+
+<H1>Printers on {server_name}</H1>
+
+<TABLE BORDER="1">
+<TR>
+       <TH>Name</TH>
+       <TH>Information</TH>
+</TR>
+<TR>
+       <TD COLSPAN="2"><IMG SRC="images/add-printer.gif"></TD>
+</TR>
+{[printer_name]
+<TR>
+       <TD VALIGN=TOP><A HREF="{printer_uri}">
+       <IMG SRC="../images/printer-idle.gif" BORDER="0"><BR>{printer_name}</A></TD>
+       <TD VALIGN=TOP>Make and Model: {printer_make_and_model}<BR>
+       Location: {printer_location}<BR>
+       Printer State: {printer_idle},
+       {printer_is_accepting_jobs=0?rejecting jobs:accepting jobs}.
+       <P>
+       <IMG SRC="../images/print-test-page.gif">
+       <IMG SRC="../images/modify-printer.gif">
+       <IMG SRC="../images/start-printer.gif">
+       <IMG SRC="../images/stop-printer.gif">
+       <IMG SRC="../images/accept-jobs.gif">
+       <IMG SRC="../images/reject-jobs.gif">
+       <IMG SRC="../images/delete-printer.gif">
+       </TD>
+</TR>
+}
+</TABLE>
+</CENTER>
+<HR>
+<P>The Common UNIX Printing System, CUPS, and the CUPS logo are the
+trademark property of <A HREF="http://www.easysw.com">Easy Software
+Products</A>. CUPS is copyright 1997-1999 by Easy Software Products,
+All Rights Reserved.
+</BODY>
+</HTML>
diff --git a/templates/option-boolean.tmpl b/templates/option-boolean.tmpl
new file mode 100644 (file)
index 0000000..64e3b00
--- /dev/null
@@ -0,0 +1,62 @@
+<HTML>
+<HEAD>
+       <TITLE>Printers on {server_name} - {cups_version}</TITLE>
+       <LINK REL=STYLESHEET TYPE="text/css" HREF="/cups.css">
+       <MAP NAME="navbar">
+               <AREA SHAPE="RECT" COORDS="10,10,85,30" HREF="/printers" ALT="Current Printer Status">
+               <AREA SHAPE="RECT" COORDS="95,10,175,30" HREF="/classes" ALT="Current Printer Classes Status">
+               <AREA SHAPE="RECT" COORDS="185,10,235,30" HREF="/jobs" ALT="Current Jobs Status">
+               <AREA SHAPE="RECT" COORDS="245,10,395,30" HREF="/documentation.html" ALT="Read CUPS Documentation On-Line">
+               <AREA SHAPE="RECT" COORDS="405,10,490,30" HREF="http://www.cups.org" ALT="Download the Current CUPS Software">
+       </MAP>
+       <STYLE>
+BODY { background-color: #cccc99 }
+H1 { font-family: sans-serif; }
+H2 { font-family: sans-serif; }
+TH { background-color: #999966 }
+       </STYLE>
+</HEAD>
+<BODY>
+<P>
+<A HREF="http://www.easysw.com" ALT="Easy Software Products Home Page">
+<IMG SRC="../images/logo.gif" WIDTH="71" HEIGHT="40" BORDER=0 ALT="Easy Software Products Home Page"></A>
+<IMG SRC="../images/navbar.gif" WIDTH="540" HEIGHT="40" USEMAP="#navbar" BORDER=0>
+
+<H1>Printers on {server_name}</H1>
+
+<TABLE BORDER="1">
+<TR>
+       <TH>Name</TH>
+       <TH>Information</TH>
+</TR>
+<TR>
+       <TD COLSPAN="2"><IMG SRC="images/add-printer.gif"></TD>
+</TR>
+{[printer_name]
+<TR>
+       <TD VALIGN=TOP><A HREF="{printer_uri}">
+       <IMG SRC="../images/printer-idle.gif" BORDER="0"><BR>{printer_name}</A></TD>
+       <TD VALIGN=TOP>Make and Model: {printer_make_and_model}<BR>
+       Location: {printer_location}<BR>
+       Printer State: {printer_idle},
+       {printer_is_accepting_jobs=0?rejecting jobs:accepting jobs}.
+       <P>
+       <IMG SRC="../images/print-test-page.gif">
+       <IMG SRC="../images/modify-printer.gif">
+       <IMG SRC="../images/start-printer.gif">
+       <IMG SRC="../images/stop-printer.gif">
+       <IMG SRC="../images/accept-jobs.gif">
+       <IMG SRC="../images/reject-jobs.gif">
+       <IMG SRC="../images/delete-printer.gif">
+       </TD>
+</TR>
+}
+</TABLE>
+</CENTER>
+<HR>
+<P>The Common UNIX Printing System, CUPS, and the CUPS logo are the
+trademark property of <A HREF="http://www.easysw.com">Easy Software
+Products</A>. CUPS is copyright 1997-1999 by Easy Software Products,
+All Rights Reserved.
+</BODY>
+</HTML>
diff --git a/templates/option-header.tmpl b/templates/option-header.tmpl
new file mode 100644 (file)
index 0000000..64e3b00
--- /dev/null
@@ -0,0 +1,62 @@
+<HTML>
+<HEAD>
+       <TITLE>Printers on {server_name} - {cups_version}</TITLE>
+       <LINK REL=STYLESHEET TYPE="text/css" HREF="/cups.css">
+       <MAP NAME="navbar">
+               <AREA SHAPE="RECT" COORDS="10,10,85,30" HREF="/printers" ALT="Current Printer Status">
+               <AREA SHAPE="RECT" COORDS="95,10,175,30" HREF="/classes" ALT="Current Printer Classes Status">
+               <AREA SHAPE="RECT" COORDS="185,10,235,30" HREF="/jobs" ALT="Current Jobs Status">
+               <AREA SHAPE="RECT" COORDS="245,10,395,30" HREF="/documentation.html" ALT="Read CUPS Documentation On-Line">
+               <AREA SHAPE="RECT" COORDS="405,10,490,30" HREF="http://www.cups.org" ALT="Download the Current CUPS Software">
+       </MAP>
+       <STYLE>
+BODY { background-color: #cccc99 }
+H1 { font-family: sans-serif; }
+H2 { font-family: sans-serif; }
+TH { background-color: #999966 }
+       </STYLE>
+</HEAD>
+<BODY>
+<P>
+<A HREF="http://www.easysw.com" ALT="Easy Software Products Home Page">
+<IMG SRC="../images/logo.gif" WIDTH="71" HEIGHT="40" BORDER=0 ALT="Easy Software Products Home Page"></A>
+<IMG SRC="../images/navbar.gif" WIDTH="540" HEIGHT="40" USEMAP="#navbar" BORDER=0>
+
+<H1>Printers on {server_name}</H1>
+
+<TABLE BORDER="1">
+<TR>
+       <TH>Name</TH>
+       <TH>Information</TH>
+</TR>
+<TR>
+       <TD COLSPAN="2"><IMG SRC="images/add-printer.gif"></TD>
+</TR>
+{[printer_name]
+<TR>
+       <TD VALIGN=TOP><A HREF="{printer_uri}">
+       <IMG SRC="../images/printer-idle.gif" BORDER="0"><BR>{printer_name}</A></TD>
+       <TD VALIGN=TOP>Make and Model: {printer_make_and_model}<BR>
+       Location: {printer_location}<BR>
+       Printer State: {printer_idle},
+       {printer_is_accepting_jobs=0?rejecting jobs:accepting jobs}.
+       <P>
+       <IMG SRC="../images/print-test-page.gif">
+       <IMG SRC="../images/modify-printer.gif">
+       <IMG SRC="../images/start-printer.gif">
+       <IMG SRC="../images/stop-printer.gif">
+       <IMG SRC="../images/accept-jobs.gif">
+       <IMG SRC="../images/reject-jobs.gif">
+       <IMG SRC="../images/delete-printer.gif">
+       </TD>
+</TR>
+}
+</TABLE>
+</CENTER>
+<HR>
+<P>The Common UNIX Printing System, CUPS, and the CUPS logo are the
+trademark property of <A HREF="http://www.easysw.com">Easy Software
+Products</A>. CUPS is copyright 1997-1999 by Easy Software Products,
+All Rights Reserved.
+</BODY>
+</HTML>
diff --git a/templates/option-pickmany.tmpl b/templates/option-pickmany.tmpl
new file mode 100644 (file)
index 0000000..64e3b00
--- /dev/null
@@ -0,0 +1,62 @@
+<HTML>
+<HEAD>
+       <TITLE>Printers on {server_name} - {cups_version}</TITLE>
+       <LINK REL=STYLESHEET TYPE="text/css" HREF="/cups.css">
+       <MAP NAME="navbar">
+               <AREA SHAPE="RECT" COORDS="10,10,85,30" HREF="/printers" ALT="Current Printer Status">
+               <AREA SHAPE="RECT" COORDS="95,10,175,30" HREF="/classes" ALT="Current Printer Classes Status">
+               <AREA SHAPE="RECT" COORDS="185,10,235,30" HREF="/jobs" ALT="Current Jobs Status">
+               <AREA SHAPE="RECT" COORDS="245,10,395,30" HREF="/documentation.html" ALT="Read CUPS Documentation On-Line">
+               <AREA SHAPE="RECT" COORDS="405,10,490,30" HREF="http://www.cups.org" ALT="Download the Current CUPS Software">
+       </MAP>
+       <STYLE>
+BODY { background-color: #cccc99 }
+H1 { font-family: sans-serif; }
+H2 { font-family: sans-serif; }
+TH { background-color: #999966 }
+       </STYLE>
+</HEAD>
+<BODY>
+<P>
+<A HREF="http://www.easysw.com" ALT="Easy Software Products Home Page">
+<IMG SRC="../images/logo.gif" WIDTH="71" HEIGHT="40" BORDER=0 ALT="Easy Software Products Home Page"></A>
+<IMG SRC="../images/navbar.gif" WIDTH="540" HEIGHT="40" USEMAP="#navbar" BORDER=0>
+
+<H1>Printers on {server_name}</H1>
+
+<TABLE BORDER="1">
+<TR>
+       <TH>Name</TH>
+       <TH>Information</TH>
+</TR>
+<TR>
+       <TD COLSPAN="2"><IMG SRC="images/add-printer.gif"></TD>
+</TR>
+{[printer_name]
+<TR>
+       <TD VALIGN=TOP><A HREF="{printer_uri}">
+       <IMG SRC="../images/printer-idle.gif" BORDER="0"><BR>{printer_name}</A></TD>
+       <TD VALIGN=TOP>Make and Model: {printer_make_and_model}<BR>
+       Location: {printer_location}<BR>
+       Printer State: {printer_idle},
+       {printer_is_accepting_jobs=0?rejecting jobs:accepting jobs}.
+       <P>
+       <IMG SRC="../images/print-test-page.gif">
+       <IMG SRC="../images/modify-printer.gif">
+       <IMG SRC="../images/start-printer.gif">
+       <IMG SRC="../images/stop-printer.gif">
+       <IMG SRC="../images/accept-jobs.gif">
+       <IMG SRC="../images/reject-jobs.gif">
+       <IMG SRC="../images/delete-printer.gif">
+       </TD>
+</TR>
+}
+</TABLE>
+</CENTER>
+<HR>
+<P>The Common UNIX Printing System, CUPS, and the CUPS logo are the
+trademark property of <A HREF="http://www.easysw.com">Easy Software
+Products</A>. CUPS is copyright 1997-1999 by Easy Software Products,
+All Rights Reserved.
+</BODY>
+</HTML>
diff --git a/templates/option-pickone.tmpl b/templates/option-pickone.tmpl
new file mode 100644 (file)
index 0000000..64e3b00
--- /dev/null
@@ -0,0 +1,62 @@
+<HTML>
+<HEAD>
+       <TITLE>Printers on {server_name} - {cups_version}</TITLE>
+       <LINK REL=STYLESHEET TYPE="text/css" HREF="/cups.css">
+       <MAP NAME="navbar">
+               <AREA SHAPE="RECT" COORDS="10,10,85,30" HREF="/printers" ALT="Current Printer Status">
+               <AREA SHAPE="RECT" COORDS="95,10,175,30" HREF="/classes" ALT="Current Printer Classes Status">
+               <AREA SHAPE="RECT" COORDS="185,10,235,30" HREF="/jobs" ALT="Current Jobs Status">
+               <AREA SHAPE="RECT" COORDS="245,10,395,30" HREF="/documentation.html" ALT="Read CUPS Documentation On-Line">
+               <AREA SHAPE="RECT" COORDS="405,10,490,30" HREF="http://www.cups.org" ALT="Download the Current CUPS Software">
+       </MAP>
+       <STYLE>
+BODY { background-color: #cccc99 }
+H1 { font-family: sans-serif; }
+H2 { font-family: sans-serif; }
+TH { background-color: #999966 }
+       </STYLE>
+</HEAD>
+<BODY>
+<P>
+<A HREF="http://www.easysw.com" ALT="Easy Software Products Home Page">
+<IMG SRC="../images/logo.gif" WIDTH="71" HEIGHT="40" BORDER=0 ALT="Easy Software Products Home Page"></A>
+<IMG SRC="../images/navbar.gif" WIDTH="540" HEIGHT="40" USEMAP="#navbar" BORDER=0>
+
+<H1>Printers on {server_name}</H1>
+
+<TABLE BORDER="1">
+<TR>
+       <TH>Name</TH>
+       <TH>Information</TH>
+</TR>
+<TR>
+       <TD COLSPAN="2"><IMG SRC="images/add-printer.gif"></TD>
+</TR>
+{[printer_name]
+<TR>
+       <TD VALIGN=TOP><A HREF="{printer_uri}">
+       <IMG SRC="../images/printer-idle.gif" BORDER="0"><BR>{printer_name}</A></TD>
+       <TD VALIGN=TOP>Make and Model: {printer_make_and_model}<BR>
+       Location: {printer_location}<BR>
+       Printer State: {printer_idle},
+       {printer_is_accepting_jobs=0?rejecting jobs:accepting jobs}.
+       <P>
+       <IMG SRC="../images/print-test-page.gif">
+       <IMG SRC="../images/modify-printer.gif">
+       <IMG SRC="../images/start-printer.gif">
+       <IMG SRC="../images/stop-printer.gif">
+       <IMG SRC="../images/accept-jobs.gif">
+       <IMG SRC="../images/reject-jobs.gif">
+       <IMG SRC="../images/delete-printer.gif">
+       </TD>
+</TR>
+}
+</TABLE>
+</CENTER>
+<HR>
+<P>The Common UNIX Printing System, CUPS, and the CUPS logo are the
+trademark property of <A HREF="http://www.easysw.com">Easy Software
+Products</A>. CUPS is copyright 1997-1999 by Easy Software Products,
+All Rights Reserved.
+</BODY>
+</HTML>
diff --git a/templates/option-trailer.tmpl b/templates/option-trailer.tmpl
new file mode 100644 (file)
index 0000000..64e3b00
--- /dev/null
@@ -0,0 +1,62 @@
+<HTML>
+<HEAD>
+       <TITLE>Printers on {server_name} - {cups_version}</TITLE>
+       <LINK REL=STYLESHEET TYPE="text/css" HREF="/cups.css">
+       <MAP NAME="navbar">
+               <AREA SHAPE="RECT" COORDS="10,10,85,30" HREF="/printers" ALT="Current Printer Status">
+               <AREA SHAPE="RECT" COORDS="95,10,175,30" HREF="/classes" ALT="Current Printer Classes Status">
+               <AREA SHAPE="RECT" COORDS="185,10,235,30" HREF="/jobs" ALT="Current Jobs Status">
+               <AREA SHAPE="RECT" COORDS="245,10,395,30" HREF="/documentation.html" ALT="Read CUPS Documentation On-Line">
+               <AREA SHAPE="RECT" COORDS="405,10,490,30" HREF="http://www.cups.org" ALT="Download the Current CUPS Software">
+       </MAP>
+       <STYLE>
+BODY { background-color: #cccc99 }
+H1 { font-family: sans-serif; }
+H2 { font-family: sans-serif; }
+TH { background-color: #999966 }
+       </STYLE>
+</HEAD>
+<BODY>
+<P>
+<A HREF="http://www.easysw.com" ALT="Easy Software Products Home Page">
+<IMG SRC="../images/logo.gif" WIDTH="71" HEIGHT="40" BORDER=0 ALT="Easy Software Products Home Page"></A>
+<IMG SRC="../images/navbar.gif" WIDTH="540" HEIGHT="40" USEMAP="#navbar" BORDER=0>
+
+<H1>Printers on {server_name}</H1>
+
+<TABLE BORDER="1">
+<TR>
+       <TH>Name</TH>
+       <TH>Information</TH>
+</TR>
+<TR>
+       <TD COLSPAN="2"><IMG SRC="images/add-printer.gif"></TD>
+</TR>
+{[printer_name]
+<TR>
+       <TD VALIGN=TOP><A HREF="{printer_uri}">
+       <IMG SRC="../images/printer-idle.gif" BORDER="0"><BR>{printer_name}</A></TD>
+       <TD VALIGN=TOP>Make and Model: {printer_make_and_model}<BR>
+       Location: {printer_location}<BR>
+       Printer State: {printer_idle},
+       {printer_is_accepting_jobs=0?rejecting jobs:accepting jobs}.
+       <P>
+       <IMG SRC="../images/print-test-page.gif">
+       <IMG SRC="../images/modify-printer.gif">
+       <IMG SRC="../images/start-printer.gif">
+       <IMG SRC="../images/stop-printer.gif">
+       <IMG SRC="../images/accept-jobs.gif">
+       <IMG SRC="../images/reject-jobs.gif">
+       <IMG SRC="../images/delete-printer.gif">
+       </TD>
+</TR>
+}
+</TABLE>
+</CENTER>
+<HR>
+<P>The Common UNIX Printing System, CUPS, and the CUPS logo are the
+trademark property of <A HREF="http://www.easysw.com">Easy Software
+Products</A>. CUPS is copyright 1997-1999 by Easy Software Products,
+All Rights Reserved.
+</BODY>
+</HTML>
index 64e3b006ce20b078db85e4d2e0f798816cfb5c8f..c79710bdd3974c98ca80c95e161aa2e1a48e05ce 100644 (file)
@@ -1,62 +1,24 @@
-<HTML>
-<HEAD>
-       <TITLE>Printers on {server_name} - {cups_version}</TITLE>
-       <LINK REL=STYLESHEET TYPE="text/css" HREF="/cups.css">
-       <MAP NAME="navbar">
-               <AREA SHAPE="RECT" COORDS="10,10,85,30" HREF="/printers" ALT="Current Printer Status">
-               <AREA SHAPE="RECT" COORDS="95,10,175,30" HREF="/classes" ALT="Current Printer Classes Status">
-               <AREA SHAPE="RECT" COORDS="185,10,235,30" HREF="/jobs" ALT="Current Jobs Status">
-               <AREA SHAPE="RECT" COORDS="245,10,395,30" HREF="/documentation.html" ALT="Read CUPS Documentation On-Line">
-               <AREA SHAPE="RECT" COORDS="405,10,490,30" HREF="http://www.cups.org" ALT="Download the Current CUPS Software">
-       </MAP>
-       <STYLE>
-BODY { background-color: #cccc99 }
-H1 { font-family: sans-serif; }
-H2 { font-family: sans-serif; }
-TH { background-color: #999966 }
-       </STYLE>
-</HEAD>
-<BODY>
-<P>
-<A HREF="http://www.easysw.com" ALT="Easy Software Products Home Page">
-<IMG SRC="../images/logo.gif" WIDTH="71" HEIGHT="40" BORDER=0 ALT="Easy Software Products Home Page"></A>
-<IMG SRC="../images/navbar.gif" WIDTH="540" HEIGHT="40" USEMAP="#navbar" BORDER=0>
-
-<H1>Printers on {server_name}</H1>
-
 <TABLE BORDER="1">
 <TR>
        <TH>Name</TH>
        <TH>Information</TH>
 </TR>
-<TR>
-       <TD COLSPAN="2"><IMG SRC="images/add-printer.gif"></TD>
-</TR>
 {[printer_name]
 <TR>
        <TD VALIGN=TOP><A HREF="{printer_uri}">
-       <IMG SRC="../images/printer-idle.gif" BORDER="0"><BR>{printer_name}</A></TD>
+       <IMG SRC="../images/printer-{printer_state=3?idle:{printer_state=4?processing:stopped}}.gif" BORDER="0"><BR>{printer_name}</A></TD>
        <TD VALIGN=TOP>Make and Model: {printer_make_and_model}<BR>
+       Description: {printer_info}<BR>
        Location: {printer_location}<BR>
-       Printer State: {printer_idle},
+       Printer State: {printer_state=3?idle:{printer_state=4?processing:stopped}},
        {printer_is_accepting_jobs=0?rejecting jobs:accepting jobs}.
        <P>
-       <IMG SRC="../images/print-test-page.gif">
-       <IMG SRC="../images/modify-printer.gif">
-       <IMG SRC="../images/start-printer.gif">
-       <IMG SRC="../images/stop-printer.gif">
-       <IMG SRC="../images/accept-jobs.gif">
-       <IMG SRC="../images/reject-jobs.gif">
-       <IMG SRC="../images/delete-printer.gif">
+       <IMG SRC="../images/print-test-page.gif" ALT="Print Test Page">
+       <IMG SRC="../images/start-printer.gif" ALT="Start Printer">
+       <IMG SRC="../images/stop-printer.gif" ALT="Stop Printer">
+       <IMG SRC="../images/accept-jobs.gif" ALT="Accept Jobs">
+       <IMG SRC="../images/reject-jobs.gif" ALT="Reject Jobs">
        </TD>
 </TR>
 }
 </TABLE>
-</CENTER>
-<HR>
-<P>The Common UNIX Printing System, CUPS, and the CUPS logo are the
-trademark property of <A HREF="http://www.easysw.com">Easy Software
-Products</A>. CUPS is copyright 1997-1999 by Easy Software Products,
-All Rights Reserved.
-</BODY>
-</HTML>
diff --git a/templates/trailer.tmpl b/templates/trailer.tmpl
new file mode 100644 (file)
index 0000000..7470693
--- /dev/null
@@ -0,0 +1,7 @@
+<HR>
+<P>The Common UNIX Printing System, CUPS, and the CUPS logo are the
+trademark property of <A HREF="http://www.easysw.com">Easy Software
+Products</A>. CUPS is copyright 1997-2000 by Easy Software Products,
+All Rights Reserved.
+</BODY>
+</HTML>