diff --git a/Scripts/CentOS-Web/centos-web.cgi b/Scripts/CentOS-Web/centos-web.cgi index 0606401..dfc5679 100755 --- a/Scripts/CentOS-Web/centos-web.cgi +++ b/Scripts/CentOS-Web/centos-web.cgi @@ -1,8 +1,24 @@ #!/usr/bin/python -from Apps import xhtml +import os +import cgi +import cgitb; cgitb.enable() def main(): - xhtml.main() + qs = cgi.parse(os.environ['QUERY_STRING']) + if 'app' in qs.keys(): + app = qs['app'][0].lower() + else: + app = 'home' + + if app == 'home': + 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() if __name__ == '__main__': main()