]> TLD Linux GIT Repositories - tld-ftp-admin.git/blobdiff - cgi-bin/index.py
- tldized
[tld-ftp-admin.git] / cgi-bin / index.py
diff --git a/cgi-bin/index.py b/cgi-bin/index.py
deleted file mode 100755 (executable)
index 208a66a..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/env python
-# vi: encoding=utf-8 ts=8 sts=4 sw=4 et
-
-# Printing errors (no SyntaxErrors though, but that's not a problem)
-import sys, os
-sys.stderr=sys.stdout
-
-contenttypesent=False
-
-def myexceptionhandler(type, value, traceback):
-    if contenttypesent:
-        print '<pre>'
-        sys.__excepthook__(type, value, traceback)
-        print '</pre>'
-    else:
-        print "Content-Type: text/plain\n"
-        sys.__excepthook__(type, value, traceback)
-    sys.exit(1)
-
-sys.excepthook=myexceptionhandler
-# End printing errors
-
-sys.path.insert(0, '../modules')
-
-import wwwiface, user
-
-opts, cks = wwwiface.getopts()
-u=user.User(cks, opts)
-
-if u.loggedin:
-    wwwiface.addheader('Logged in: '+u.login)
-    wwwiface.addmenu(file='loggedinmenu')
-    import wwwcmds
-    wwwcmds.handlecmds(opts)
-else:
-    wwwiface.addheader('Login form')
-    wwwiface.addcontent(file='regform')
-
-wwwiface.sendhttpheaders()
-contenttypesent=True
-
-wwwiface.sendhtml()
-