require "config.php"; require "functions.php"; if ($_GET["eventId"] != "" && $_GET["game_type"] != "" && $_GET["print"] == "standings") { $eventId = $_GET["eventId"]; $game_type = $_GET["game_type"]; $fetch_event = mysql_query("SELECT * FROM `web_events` WHERE id='{$eventId}' LIMIT 1"); if (mysql_num_rows($fetch_event) == "0") { show_error("Unable to load data"); exit; } $game_title = fetch_game_title($eventId, $game_type); $eventRow = mysql_fetch_assoc($fetch_event); $team_advance = $eventRow[playoff_advance1]; if ($_GET["cycle"] == "true") { printSimpleHeader($eventId, "{$game_title} Standings"); print "\n<meta http-equiv=\"refresh\" content=\"6; URL=./schedule.php?getEvent={$eventId}&getType={$game_type}&printPage=cycle\">\n\n"; } else { print_header($eventId, "{$game_title} Standings"); } ?> <table width="550" cellspacing="1" cellpadding="2" align="center" bgcolor="#dadada"> <?php if ($game_type == "pre") { print " <tr bgcolor=\"#ffffff\" height=\"25\">\n <td colspan=\"5\" align=\"center\" class=\"print\">Top <b>{$team_advance}</b> teams advance to playoffs</td>\n </tr>\n"; } ?> <tr bgcolor="#ffffff"> <td width="50" align="center" class=\"print\"><b>Rank</b></td> <td width="200" align="center" class=\"print\"><b>Team</b></td> <td width="75" align="center" class=\"print\"><b>Points</b></td>
if (!$update_center) { show_error("Failed to update center"); } else { echo "<p align=\"center\"><b>Player center changed</b></p>\n\n"; echo "<p align=\"center\">You will be automatically redirected...</p>\n\n"; echo "<p align=\"center\"><a href=\"./teams.php?eventId={$eventId}\">Click here to continue</a></p>\n\n"; echo "<META HTTP-EQUIV=Refresh CONTENT=\"1; URL=./teams.php?eventId={$eventId}\">\n\n"; } } print_footer(); } } elseif ($_GET["eventId"] != "" && $_GET["do"] == "print") { $eventId = $_GET["eventId"]; if ($_GET["cycle"] == "true") { $game_type = $_GET["game_type"]; printSimpleHeader($eventId, "Rosters"); if ($game_type == "con") { print "\n<meta http-equiv=\"refresh\" content=\"6; URL=./team_scores.php?game_type=fin&eventId={$eventId}&print=standings&cycle=true\">\n\n"; } elseif ($game_type == "fin") { print "\n<meta http-equiv=\"refresh\" content=\"6; URL=./team_scores.php?game_type=con&eventId={$eventId}&print=standings&cycle=true\">\n\n"; } else { print "\n<meta http-equiv=\"refresh\" content=\"6; URL=./team_scores.php?game_type={$game_type}&eventId={$eventId}&print=standings&cycle=true\">\n\n"; } } else { print_header($eventId, "Rosters"); } print "<table width=\"720\" cellspacing=\"1\" cellpadding=\"3\" align=\"center\" bgcolor=\"#000000\">\n"; print " <tr>\n"; $fetch_teams = mysql_query("SELECT * FROM `web_teams` WHERE team_event='{$eventId}' ORDER BY `team_name` ASC"); $teamCount = mysql_num_rows($fetch_teams); if ($teamCount == "0") {
$row++; } $col++; } print "<p align=\"center\"><b>Schedule Built</b></p>\n\n"; print "<p align=\"center\"><a href=\"./schedule.php?game_type={$game_type}&eventId={$eventId}\">Click here to continue</a></p>\n\n"; print_footer(); } elseif ($_GET["getEvent"] != "" && $_GET["getType"] != "" && $_GET["printPage"] != "") { //Updated June 22, 2009 $getEvent = $_GET["getEvent"]; $getType = $_GET["getType"]; $gameInfo = fetch_game_info($getEvent, $getType); $hex_array = fetch_hex_array($gameInfo[game_pack_sets], $gameInfo[game_format]); $soft_hex_array = fetch_soft_hex_array($gameInfo[game_pack_sets], $gameInfo[game_format]); if ($_GET["printPage"] == "cycle") { printSimpleHeader($getEvent, "{$gameInfo['game_title']} Schedule"); print "\n<meta http-equiv=\"refresh\" content=\"6; URL=./teams.php?eventId={$getEvent}&do=print&cycle=true&game_type={$getType}\">\n\n"; } else { print_header($getEvent, "{$gameInfo['game_title']} Schedule"); } $fetch_teams = mysql_query("SELECT * FROM `web_teams` WHERE team_event='{$getEvent}' ORDER BY `team_id` ASC"); if (mysql_num_rows($fetch_teams) == "0") { fatalError("Unable to load teams"); } while ($teamRow = mysql_fetch_assoc($fetch_teams)) { $team_id = $teamRow["team_id"]; $team_name = $teamRow["team_name"]; $team_names[$team_id] = $team_name; } if ($gameInfo[game_pack_sets] > 4) { $table_width = 920;