Changeset 2232 for pykota/trunk/cgi-bin
- Timestamp:
- 05/05/05 23:52:49 (20 years ago)
- Location:
- pykota/trunk/cgi-bin
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/cgi-bin/pykotme.cgi
r2229 r2232 145 145 try : 146 146 user = self.storage.getUser(remuser) 147 for printer in printers : 148 upquota = self.storage.getUserPQuota(user, printer) 149 cost = upquota.computeJobPrice(jobsize) 150 self.body += "<p>%s</p>" % (_("Cost on printer %s : %.2f") % (printer.Name, cost)) 147 if user.Exists : 148 for printer in printers : 149 upquota = self.storage.getUserPQuota(user, printer) 150 if upquota.Exists : 151 cost = upquota.computeJobPrice(jobsize) 152 self.body += "<p>%s</p>" % (_("Cost on printer %s : %.2f") % (printer.Name, cost)) 151 153 except : 152 154 self.body += '<p><font color="red">%s</font></p>' % self.crashed("CGI Error").replace("\n", "<br />") -
pykota/trunk/cgi-bin/README
r2153 r2232 25 25 Be sure to restrict access to these CGI scripts as necessary. 26 26 27 For now, pykotme.cgi doesn't need any restriction.28 29 27 If you protect access to printquota.cgi or dumpykota.cgi with 30 28 username+password authentication, the REMOTE_USER CGI environment variable … … 35 33 If no username+password authentication takes place, then access 36 34 is completely unrestricted. 35 36 If you don't protect access to pykotme.cgi with username+password 37 authentication, then only the job's size will be displayed 38 to you. This is due to the cost of a print job on a particular printer 39 depending on the user because of the overcharging factor's value. 40 So if you want pykotme.cgi to produce complete web quotes, you must 41 ensure that the user logs in from his web browser whenever he uses 42 this CGI script. 37 43 38 44 You must ensure that the user your web server runs as can read