root / pykota / trunk / cgi-bin / printquota.cgi @ 945

Revision 941, 2.0 kB (checked in by jalet, 22 years ago)

Now includes the logo

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1#! /usr/bin/python
2
3# PyKota Print Quota Reports generator
4#
5# PyKota - Print Quotas for CUPS
6#
7# (c) 2003 Jerome Alet <alet@librelogiciel.com>
8# This program is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 2 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program; if not, write to the Free Software
20# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
21#
22# $Id$
23#
24# $Log$
25# Revision 1.5  2003/04/17 21:30:09  jalet
26# Now includes the logo
27#
28# Revision 1.4  2003/04/08 21:20:25  jalet
29# CGI Script now displays a link to PyKota's website.
30#
31# Revision 1.3  2003/03/29 13:45:27  jalet
32# GPL paragraphs were incorrectly (from memory) copied into the sources.
33# Two README files were added.
34# Upgrade script for PostgreSQL pre 1.01 schema was added.
35#
36# Revision 1.2  2003/02/12 11:31:51  jalet
37# doesn't use the jaxml module anymore
38#
39# Revision 1.1  2003/02/10 13:41:38  jalet
40# repykota cgi script added.
41# cleaner doc.
42#
43
44import sys
45import os
46import cgi
47
48header = """Content-type: text/html
49
50<?xml version="1.0" encoding="iso-8859-1"?>
51<html>
52  <head>
53    <title>Print Quota Report</title>
54  </head>
55  <body>
56    <h2>Print Quota Report</h2>
57    <p>
58      <pre>"""
59
60footer = """
61      </pre>
62    </p> 
63    <p>
64      <a href="http://www.librelogiciel.com/software/"><img src="http://www.librelogiciel.com/software/PyKota/calllogo" /></a>
65      <br />
66      Report generated with <a href="http://www.librelogiciel.com/software/">PyKota</a>
67    </p>
68  </body>
69</html>""" 
70
71print header
72
73out = os.popen("repykota")
74print out.read().strip()
75out.close()
76
77print footer
Note: See TracBrowser for help on using the browser.