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)
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 show_error(err_str): cgicommon.writeln("Content-Type: text/html; charset=utf-8") cgicommon.writeln("") cgicommon.print_html_head("Tourney: %s" % tourney_name) cgicommon.writeln("<body>") cgicommon.show_sidebar(tourney) cgicommon.writeln("<div class=\"mainpane\">") cgicommon.writeln("<p><strong>%s</strong></p>" % err_str) cgicommon.writeln("</div>") cgicommon.writeln("</body>") cgicommon.writeln("</html>")
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)); name_to_position = dict() name_to_div_position = dict()
cgicommon.print_html_head("Tim Down Award: %s" % (tourney_name)) cgicommon.writeln("<body>") cgicommon.assert_client_from_localhost() if tourney_name is None: cgicommon.writeln("<h1>No tourney specified</h1>") cgicommon.writeln("<p><a href=\"/cgi-bin/home.py\">Home</a></p>") cgicommon.writeln("</body></html>") sys.exit(0) try: tourney = countdowntourney.tourney_open(tourney_name, cgicommon.dbdir) cgicommon.show_sidebar(tourney, show_misc_table_links=True) num_losing_games = cgicommon.int_or_none(form.getfirst( "numlosinggames", 3)) if num_losing_games is None or num_losing_games < 0: num_losing_games = 3 cgicommon.writeln("<div class=\"mainpane\">") cgicommon.writeln("<h1>Tim Down Award</h1>") cgicommon.writeln("<form action=\"%s\" method=\"GET\">" % (baseurl)) cgicommon.writeln("<p>") cgicommon.writeln( "The Tim Down Award goes to the player whose opponents have the highest average standings position, and who lost " )