//------------------------------------------ Team Picked Content Begin -----------------------------------//
if (($team) && ($team !== "index")) { ?>
";
//
";
} ?>
} //------------------------------------------- Team Picked Content End ------------------------------------// ?>
//------------------------------------------- Display Team Choices -----------------------------------//
if ($team == "") { ?>
NFL Team Statistics for echo $teamname; ?>
$query = "Select * from zz_teams_summary where team = '$teamname' order by year desc"; $query2 = mysql_query($query) or die("Select Failed!"); while ($query3 = mysql_fetch_array($query2)) { $year = $query3['year']; $league = $query3['league']; $coach = $query3['coaches']; $wins = $query3['wins']; $losses = $query3['losses']; $ties = $query3['ties']; $offpt = $query3['off_pts']; $offyd = $query3['off_yrds']; $defpt = $query3['def_pts']; $defyd = $query3['def_yrds']; $lpass = $query3['pass_leader']; $lrush = $query3['rush_leader']; $lreceive = $query3['receive_leader']; $queryb = "Select * from zz_master where ID = '$lpass'"; $queryb2 = mysql_query($queryb) or die("Select #2 Failed!"); $queryb3 = mysql_fetch_array($queryb2); $passfirstname = $queryb3['firstname']; $passlastname = $queryb3['lastname']; $queryc = "Select * from zz_master where ID = '$lrush'"; $queryc2 = mysql_query($queryc) or die("Select #2 Failed!"); $queryc3 = mysql_fetch_array($queryc2); $rushfirstname = $queryc3['firstname']; $rushlastname = $queryc3['lastname']; $queryd = "Select * from zz_master where ID = '$lreceive'"; $queryd2 = mysql_query($queryd) or die("Select #2 Failed!"); $queryd3 = mysql_fetch_array($queryd2); $receivefirstname = $queryd3['firstname']; $receivelastname = $queryd3['lastname']; echo "$league $year $teamname Record (W-L-T): $wins-$losses-$ties
//
echo "
Offence - Points: $offpt Yards: $offyd
// Defence - Points: $defpt Yards: $defyd
// Passing Leader: $passfirstname $passlastname
Receiving Leader: $receivefirstname $receivelastname
Rushing Leader: $rushfirstname $rushlastname
Head Coach: $coach
National Football League (NFL) Team Statistics and Histories
echo "";
// Active Teams Section
$count = 0;
$query = "select * from zz_teams where defunct !='yes' order by teamname asc";
$query2 = mysql_query($query);
$results = mysql_num_rows($query2);
echo "
"; } // If rounded down number divided into the rows (divided by columns) isn't zero then there is an orphin div from the loop that needs to be closed
// End Active Teams Section
echo "Currently $results Active NFL Teams
"; $columns = 4; // How many columns to display on the webpage $howmanyrows = ($results / $columns); // How many rows are there when dividing against columns required in the page. $rowsrounddown = floor($howmanyrows); // Round the number of rows down. This is a holding number to determine if the columns required divide into rows evenly $isnumberround = ($howmanyrows - $rowsrounddown); // Determine if number of rows divides evenly into the rounded down number. This is the funky magic. If number isn't zero then we need to close a div while ($query3 = mysql_fetch_array($query2)) { $count++; $rowcount++; $team = $query3['team']; $teamname = $query3['teamname']; if ($count == "1") { echo ""; }
echo "";
if ($count == "$columns") { echo "
"; $count = 0; }
}
if ($isnumberround != "0") { echo "";
// Defunct Teams Section
$count = 0;
$query = "select * from zz_teams where defunct = 'yes' order by teamname asc";
$query2 = mysql_query($query);
$results = mysql_num_rows($query2);
echo "
"; } // If rounded down number divided into the rows (divided by columns) isn't zero then there is an orphin div from the loop that needs to be closed
// End Defunct Teams Section
echo "Currently Listing $results Defunct NFL Teams
"; $columns = 2; // How many columns to display on the webpage $howmanyrows = ($results / $columns); // How many rows are there when dividing against columns required in the page. $rowsrounddown = floor($howmanyrows); // Round the number of rows down. This is a holding number to determine if the columns required divide into rows evenly $isnumberround = ($howmanyrows - $rowsrounddown); // Determine if number of rows divides evenly into the rounded down number. This is the funky magic. If number isn't zero then we need to close a div while ($query3 = mysql_fetch_array($query2)) { $team = $query3['team']; $teamname = $query3['teamname']; $defunct = $query3['defunct']; $years = $query3['years']; if ($count == "1") { echo ""; }
echo "";
if ($count == "$columns") { echo "
"; $count = 0; }
}
if ($isnumberround != "0") { echo "