def fatal_exception(exc, tourney=None): cgicommon.print_html_head("Player View") cgicommon.writeln("<body>") if tourney: cgicommon.show_sidebar(tourney) cgicommon.writeln("<div class=\"mainpane\">") cgicommon.show_tourney_exception(exc) cgicommon.writeln("</div>") cgicommon.writeln("</body></html>") sys.exit(1)
def fatal_exception(exc, tourney=None): cgicommon.print_html_head("Table Index") cgicommon.writeln("<body>") if tourney: cgicommon.show_sidebar(tourney, show_misc_table_links=True) cgicommon.writeln("<div class=\"mainpane\">") cgicommon.show_tourney_exception(exc) cgicommon.writeln("</div>") cgicommon.writeln("</body></html>") sys.exit(1)
if (renames != null) { for (var i = 0; i < renames.length; ++i) { renames[i].style.display = "none"; } } } </script> """) cgicommon.assert_client_from_localhost() if tourneyname is not None: try: tourney = countdowntourney.tourney_open(tourneyname, cgicommon.dbdir) except countdowntourney.TourneyException as e: cgicommon.show_tourney_exception(e) cgicommon.show_sidebar(tourney) cgicommon.writeln("<div class=\"mainpane\">") cgicommon.writeln("<h1>Division Setup</h1>") if tourneyname is None: cgicommon.writeln("<h1>Sloblock</h1>") cgicommon.writeln( "<p>No tourney name specified. <a href=\"/cgi-bin/home.py\">Home</a></p>" ) elif not tourney: cgicommon.writeln("<p>No valid tourney name specified</p>") else: #print '<p><a href="%s?tourney=%s">%s</a></p>' % (baseurl, urllib.quote_plus(tourneyname), cgicommon.escape(tourneyname));
cgicommon.writeln("const %s = %d;" % (mode["id"], mode["num"])) cgicommon.writeln("</script>") # Load main.js first cgicommon.writeln("<script src=\"/teleost/main.js\"></script>") # Now load everything under teleost/views, loading the files and contents of # directories in alphabetical order. The order is important, because some files # depend on others. include_scripts("./teleost/views", "/teleost/views") # Finally, load main_post.js cgicommon.writeln("<script src=\"/teleost/main_post.js\"></script>") if tourney_name is None: cgicommon.show_tourney_exception( countdowntourney.TourneyException("No tourney name specified.")) cgicommon.writeln("</body>") cgicommon.writeln("</html>") sys.exit(0) cgicommon.writeln("<div id=\"teleostbanner\">") cgicommon.writeln("</div>") cgicommon.writeln("<div id=\"displaymainpane\">") cgicommon.writeln("</div>") cgicommon.writeln("</body>") cgicommon.writeln("</html>")