From 7adeddaa0f345149d9747596fff9573197c65b10 Mon Sep 17 00:00:00 2001 From: sienkiew Date: Wed, 31 Aug 2011 17:55:26 +0000 Subject: checkpoint git-svn-id: https://svn.stsci.edu/svn/ssb/etal/steuermann/trunk@388 d34015c8-bcbb-4646-8ac8-8ba5febf221d --- scripts/steuermann_report.cgi | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 scripts/steuermann_report.cgi (limited to 'scripts/steuermann_report.cgi') diff --git a/scripts/steuermann_report.cgi b/scripts/steuermann_report.cgi new file mode 100644 index 0000000..fb82b89 --- /dev/null +++ b/scripts/steuermann_report.cgi @@ -0,0 +1,36 @@ +#! python + +import cgi +import cgitb + +cgitb.enable() + +form = cgi.FieldStorage(keep_blank_values=1) +cginame = os.getenv("SCRIPT_NAME") + +import sqlite3 + +if not 'action' in form : + print 'content-type: text/html' + print '' + db = sqlite3.connect('db.sr') + c = db.cursor() + c.execute('SELECT DISTINCT run FROM status ORDER BY run ASC') + for run, in c : + print "%s
"%(cginame, run, run) + return + +action = form['action'].value + +if action == 'report' : + import steuermann.report + print 'content-type: text/html' + print '' + run = form['run'].value + print steuermann.report.report_html( db, run ) + return + +print 'content-type: text/html' +print '' +print 'no action?' + -- cgit