From 90811674e8fd4c5ac9221e95102735502638d75a Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Aug 29 2011 05:11:32 +0000 Subject: Update `CentOS-Web/centos-web.cgi'. --- diff --git a/Scripts/CentOS-Web/centos-web.cgi b/Scripts/CentOS-Web/centos-web.cgi index dfc5679..557558b 100755 --- a/Scripts/CentOS-Web/centos-web.cgi +++ b/Scripts/CentOS-Web/centos-web.cgi @@ -1,12 +1,46 @@ #!/usr/bin/python +# +# centos-web.cgi -- This script is an effort to organize The CentOS +# Project information in XHTML format for its publication on the +# Internet. The script is organized in a package named `Apps' which, +# in turn, is subdivided in other packages (e.g., `Home', `Sponsors', +# etc.) to cover each web application the organization demands. +# +# Notice that some of the web applications demanded (e.g., Wiki, +# Lists, Forums, Bugs, etc.) are not included in this script, but +# linked to their own locations. Moreover, in order to provide +# accessability among all different web applications, they need to be +# redesigned to share one unique visual style and one unique top-level +# navigation bar so the current web application can be remarked. +# +# Copyright (C) 2011 Alain Reguera Delgado +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +# ------------------------------------------------------------------ +# $Id$ +# ------------------------------------------------------------------ -import os import cgi import cgitb; cgitb.enable() def main(): - qs = cgi.parse(os.environ['QUERY_STRING']) - if 'app' in qs.keys(): + + qs = cgi.parse() + + if 'app' in qs: app = qs['app'][0].lower() else: app = 'home' @@ -15,9 +49,7 @@ def main(): from Apps.Home import page elif app == 'sponsors': from Apps.Sponsors import page - else: - from Apps.Home import page - + print 'Content-type: text/html' + "\n" print page.main()