summaryrefslogtreecommitdiffstats
path: root/info.cgi
blob: 6b653010ec1aadbe30f4070828a74ee9d10b7cfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/python

import cgi, cgitb, os, time, urllib, sch
cgitb.enable()

form = cgi.FieldStorage()

if not form.has_key("fname"):
    sch.error("No file name passed to script file")

fname = form["fname"].value

if not sch.valid_fname(fname):
    sch.error("Fuck off!")

sch.print_header("File Info for '%s'" % fname)
sch.run_proc('/usr/local/bin/syrep --info "%s/%s" ' % (sch.repository_directory, fname))
sch.print_footer()