include("includes/settings.php"); $page = "schedule"; $activeMainMenu = 2; if (($_GET['season_type'] != "League" and $_GET['season_type'] != "Playoffs" and $_GET['season_type'] != "Exhibition") or intval($_GET['season_id']) == 0 or !isset($_GET["month_selection"])) { header('Location: /schedule.php?season_type=' . $row_global_game_type_id["game_type_name"] . '&season_id=' . $row_global_season['season_id'] . '&month_selection=' . date("n"), true, 301); } else { $season_type = mysqli_real_escape_string($db_conn, $_GET['season_type']); // $season_id = intval($_GET['season_id']); // $month = intval($_GET['month_selection']); // $get_team_id = intval($_GET['team_selection']); // $get_game_type = intval($_GET['games_show']); $season_id = ($_GET['season_id']); $month = ($_GET['month_selection']); $get_team_id = ($_GET['team_selection']); $get_game_type = ($_GET['games_show']); } if (!isset($_GET['month_selection'])) { $month = date("n"); } if ($season_type != "" and $season_id != "") { $getSeasonID = mysqli_fetch_assoc(mysqli_query($db_conn, " select * FROM `game_types` WHERE game_type_name LIKE '{$season_type}' AND season_id={$season_id} ")); $game_type_id = $getSeasonID["game_type_id"]; if (intval($game_type_id) == 0) { show_error_code(404); } $getSeasonYears = mysqli_fetch_assoc(mysqli_query($db_conn, "select * from seasons WHERE season_id = '" . $season_id . "' ")); $seasonYears = $getSeasonYears["season_start"] . "-" . $getSeasonYears["season_end"]; // if the user selects the current game type we show default if ($game_type_id == $row_general_settings['game_type_id']) { $default = 1; } else { $default = 0; } } else { // default season $default = 1; $getSeasonType = mysqli_fetch_assoc(mysqli_query($db_conn, " select game_type_name FROM `game_types` WHERE game_type_id={$row_general_settings['game_type_id']} ")); $game_type_id = $row_general_settings['game_type_id']; $season_type = $getSeasonType["game_type_name"]; $season_id = $row_general_settings['season_id']; $seasonYears = $row_global_season["season_start"] . " - " . $row_global_season["season_end"]; } ############################################################################################################ ?>