Index: pykota/trunk/README
===================================================================
--- pykota/trunk/README (revision 2151)
+++ pykota/trunk/README (revision 2153)
@@ -200,5 +200,6 @@
           More to come.
           
-        - Web based print quota monitor and data dumper are included.  
+        - Web enabled print quota monitor, data dumper, and print quote
+          generator.
         
         - An On Screen Display X-Window print quota monitor is included.
Index: pykota/trunk/cgi-bin/pykotme.cgi
===================================================================
--- pykota/trunk/cgi-bin/pykotme.cgi (revision 2152)
+++ pykota/trunk/cgi-bin/pykotme.cgi (revision 2153)
@@ -29,4 +29,5 @@
 import cgi
 import urllib
+import cStringIO
 
 from pykota import version
@@ -44,5 +45,5 @@
   </head>
   <body>
-    <form action="pykotme.cgi" method="POST">
+    <form action="pykotme.cgi" method="POST" enctype="multipart/form-data">
       <table>
         <tr>
@@ -91,20 +92,20 @@
             self.body = '<p><font color="red">%s</font></p>\n%s' % (message, self.body)
         
-#    def htmlListPrinters(self, selected=[], mask="*") :    
-#        """Displays the printers multiple selection list."""
-#        printers = self.storage.getMatchingPrinters(mask)
-#        selectednames = [p.Name for p in selected]
-#        message = '<table><tr><td valign="top">%s :</td><td valign="top"><select name="printers" multiple="multiple">' % _("Printer")
-#        for printer in printers :
-#            if printer.Name in selectednames :
-#                message += '<option value="%s" selected="selected">%s (%s)</option>' % (printer.Name, printer.Name, printer.Description)
-#            else :
-#                message += '<option value="%s">%s (%s)</option>' % (printer.Name, printer.Name, printer.Description)
-#        message += '</select></td></tr></table>'
-#        return message
+    def htmlListPrinters(self, selected=[], mask="*") :    
+        """Displays the printers multiple selection list."""
+        printers = self.storage.getMatchingPrinters(mask)
+        selectednames = [p.Name for p in selected]
+        message = '<table><tr><td valign="top">%s :</td><td valign="top"><select name="printers" multiple="multiple">' % _("Printer")
+        for printer in printers :
+            if printer.Name in selectednames :
+                message += '<option value="%s" selected="selected">%s (%s)</option>' % (printer.Name, printer.Name, printer.Description)
+            else :
+                message += '<option value="%s">%s (%s)</option>' % (printer.Name, printer.Name, printer.Description)
+        message += '</select></td></tr></table>'
+        return message
         
     def guiAction(self) :
         """Main function"""
-        printers = None
+        printers = inputfile = None
         self.body = "<p>%s</p>\n" % _("Please click on the above button")
         if self.form.has_key("report") :
@@ -116,7 +117,20 @@
             else :    
                 printers = self.storage.getMatchingPrinters("*")
+            if self.form.has_key("inputfile") :    
+                inputfile = self.form["inputfile"].value
                 
-        #self.body += self.htmlListPrinters(printers or [])            
-        #self.body += "<br />"
+        self.body += self.htmlListPrinters(printers or [])            
+        self.body += "<br />"
+        self.body += _("Filename") + " : "
+        self.body += '<input type="file" size="64" name="inputfile" />'
+        self.body += "<br />"
+        if inputfile :
+            try :
+                parser = PDLAnalyzer(cStringIO.StringIO(inputfile))
+                jobsize = parser.getJobSize()
+            except PDLAnalyzerError, msg :    
+                self.body += '<font color="red">%s</font>' % msg
+            else :    
+                self.body += _("This file is %i pages long.") % jobsize
             
 if __name__ == "__main__" :
Index: pykota/trunk/cgi-bin/README
===================================================================
--- pykota/trunk/cgi-bin/README (revision 2146)
+++ pykota/trunk/cgi-bin/README (revision 2153)
@@ -25,4 +25,6 @@
 Be sure to restrict access to these CGI scripts as necessary.
 
+For now, pykotme.cgi doesn't need any restriction.
+
 If you protect access to printquota.cgi or dumpykota.cgi with 
 username+password authentication, the REMOTE_USER CGI environment variable
