Blame Scripts/Python/Webenv/cgi-bin/webenv.cgi

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