"; $Link = $_GET["link"]; if ($Link == "Y") { $Team = $_GET["team"]; $Season = $_GET["season"]; } else { $Team = $_POST["team"]; $Season = $_POST["season"]; } $FirstYear = 1950; $Season = $Season + 0; $PrevYear = $Season - 1; $FollYear = $Season + 1; if ($SearchTeam == "") { $SearchTeam = $Team; } if ($LastYear == "") { $LastYear = 2023; } $DispSeas = $PrevYear."-".substr($Season,strlen($Season)-(2)); if (($Season < $FirstYear) || ($Season > $LastYear)) { $NoGames = "Y"; print "".$DispSeas." ".$Team.""; print ""; print ""; print "

".$Team." franchise did not play any games in ".$DispSeas."

"; } $sqlquery = "SELECT *,Month(datelong) as SQLMonth, DayofMonth(datelong) as SQLDate, Weekday(datelong) as SQLDay FROM cb WHERE ((visteam = '".$SearchTeam."')"; $sqlquery = $sqlquery." or (hometeam = '".$SearchTeam."'))"; $sqlquery = $sqlquery." and (year = ".$Season.")"; $sqlquery = $sqlquery." order by datelong"; $result = mysql_query($sqlquery, $conn) or die("The SELECT statement failed. MySQL says this is the reason:

".mysql_error()); $DispTeam = str_replace(".","&",$Team); if ($NoGames != "Y") { print "".$DispSeas." ".$DispTeam.""; print ""; print ""; print ""; include('../includes/head.txt'); print "
".$DispSeas." ".$DispTeam; $FoundConf = "false"; while ($data = mysql_fetch_array($result)) { $AtVs = $data["atvs"]; $GameType = $data["gametype"]; $VisTeam = $data["visteam"]; $HomeTeam = $data["hometeam"]; $HomeScore = $data["homescore"]; $Conf1 = $data["conf1"]; $VisTeam = $data["visteam"]; $VisScore = $data["visscore"]; $Conf2 = $data["conf2"]; $RegOT = $data["regot"]; if ($FoundConf == "false") { if ($VisTeam == $SearchTeam) { $Conf = $Conf1; } if ($HomeTeam == $SearchTeam) { $Conf = $Conf2; } } if ($HomeScore > $VisScore) { $WinTeam = $HomeTeam; $WinScore = $HomeScore; $LosTeam = $VisTeam; $LosScore = $VisScore; } else { $WinTeam = $VisTeam; $WinScore = $VisScore; $LosTeam = $HomeTeam; $LosScore = $HomeScore; } if (($WinTeam == $SearchTeam) && ($WinScore != -1)) { $PriWins = $PriWins + 1; } else { if (($LosTeam == $SearchTeam) && ($LosScore != -1)) { $PriLoss = $PriLoss + 1; } } if (($VisTeam == $SearchTeam) && ($VisScore == -1)) { $Upcoming = $Upcoming + 1; } else { if (($HomeTeam == $SearchTeam) && ($VisScore == -1)) { $Upcoming = $Upcoming + 1; } } } $DispConf = $Conf; switch ($Conf) { case "A10": $DispConf = "Atlantic 10"; break; case "Amer": $DispConf = "American"; break; case "B10": $DispConf = "Big Ten"; break; case "B12": $DispConf = "Big 12"; break; case "BSth": $DispConf = "Big South"; break; case "BWest": $DispConf = "Big West"; break; case "Pat": $DispConf = "Patriot"; break; case "Summ": $DispConf = "Summit"; break; case "Slnd": $DispConf = "Southland"; break; case "AEast": $DispConf = "America East"; break; case "ASun": $DispConf = "Atlantic Sun"; break; case "BEast": $DispConf = "Big East"; break; case "BSky": $DispConf = "Big Sky"; break; case "CUSA": $DispConf = "Conference USA"; break; case "GWC": $DispConf = "Great West"; break; case "Horz": $DispConf = "Horizon"; break; case "Ind": $DispConf = "Independents"; break; case "Ivy": $DispConf = "Ivy League"; break; case "Pac12": $DispConf = "Pac 12"; break; case "Pac10": $DispConf = "Pac 10"; break; case "SoCon": $DispConf = "Southern"; break; case "Slnd": $DispConf = "Southland"; break; case "SBelt": $DispConf = "Sun Belt"; break; case "WCC": $DispConf = "West Coast"; break; case "AWest": $DispConf = "American West"; break; case "NAtl": $DispConf = "North Atlantic"; break; } print " (".$PriWins."-".$PriLoss.") $DispConf

"; $Total_Games = $PriWins + $PriLoss + $Upcoming; $Half_Games = $Total_Games / 2; $Floor = floor($Half_Games); if ($Floor == $Half_Games) { $GoTo2ndColumn = $Floor + 1; } else { $GoTo2ndColumn = $Floor + 2; } print "
"; if ($PrevYear < $FirstYear) { print "Previous Year | "; } else { print "Previous Year | "; } if ($FollYear > $LastYear) { print "Following Year | "; } else { print "Following Year | "; } } if ($NoGames == "Y") { print "
"; } print "Team History | "; print "Coll Bask Team for a Season

"; if ($NoGames != "Y") { print "
"; ?>
".mysql_error()); $i = 1; $savei = 1; while ($data = mysql_fetch_array($result)) { $NumGame = $NumGame + 1; $GameType = $data["gametype"]; if (($GameType == "P") && ($Playoff == "N")) { print "
"; $Playoff = "Y"; } if (($NumGame == $GoTo2ndColumn) || ($NumGame == $GoTo3rdColumn)) { print "
"; $i = $savei + 1; $savei = $i; } if (($i % 2) == 1) { print ""; } else { print ""; } ?>
"; } } print $Date." ".$LinkMonth; if (($VisScore != -1) && ($Conf != "x")) { print ""; } ?> $HomeScore) { $WinTeam = $VisTeam; $WinScore = $VisScore; $LosTeam = $HomeTeam; $LosScore = $HomeScore; } else { $WinTeam = $HomeTeam; $WinScore = $HomeScore; $LosTeam = $VisTeam; $LosScore = $VisScore; } $RegOT = $data["regot"]; if ($VisTeam == $SearchTeam) { $OtherTeam = $HomeTeam; $OtherConf = $HomeConf; } else { $OtherTeam = $VisTeam; $OtherConf = $VisConf; } if (($WinTeam == $SearchTeam) && ($WinScore != -1)) { $PriWins2 = $PriWins2 + 1; print "W"; $MyScore = $WinScore; $OtherScore = $LosScore; } else { if ($WinScore != -1) { $PriLoss2 = $PriLoss2 + 1; print "L"; $MyScore = $LosScore; $OtherScore = $WinScore; } } ?> ".$DispOtherTeam.""; } } else { if ($OtherConf == "x") { print "at ".$DispOtherTeam; } else { print "at ".$DispOtherTeam.""; } } } else { if ($AtVs == "vs") { if ($OtherConf == "x") { print "vs ".$OtherTeam; } else { print "vs ".$DispOtherTeam.""; } } else { if ($OtherConf == "x") { print $OtherTeam; } else { print "".$DispOtherTeam.""; } } } ?>
"; } print "
"; include('../includes/tailvalid.txt');