/[qa]/trunk/pts/www/cgi-bin/set-csspref.cgi
ViewVC logotype

Contents of /trunk/pts/www/cgi-bin/set-csspref.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2166 - (show annotations) (download)
Sun Mar 8 17:08:06 2009 UTC (4 years, 2 months ago) by hertzog
File size: 532 byte(s)
Rewrite style switcher in python since PHP is no more available.
1 #!/usr/bin/python
2 # vim: expandtab
3
4 # Copyright 2009 Raphael Hertzog
5 # Available under the terms of the General Public License version 2
6 # or (at your option) any later version.
7
8 import cgi, Cookie, os
9 #import cgitb
10 #cgitb.enable()
11
12 form = cgi.FieldStorage()
13 if (form.has_key("csspref")):
14 c = Cookie.SimpleCookie()
15 c["csspref"] = form["csspref"].value
16 c["csspref"]["max-age"] = 1531263600
17 c["csspref"]["path"] = "/"
18 print c
19
20 print "Location: " + os.getenv("HTTP_REFERER", "http://packages.qa.debian.org")
21 print
22

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5