$arank){$homerankcount++;}elseif($rank < $arank){$awayrankcount++;} $teamrankings1b = mysql_query("SELECT SUM(pa.pRS + pa.pMS) as teamspeed, pa.ptttID FROM player_atts AS pa INNER JOIN tecmoplayer AS tp ON tp.pID = pa.pUID WHERE ((pa.pPos = 0 AND pString = 1) || (pa.pPos = 1 AND pString = 1) || (pa.pPos = 1 AND pString = 2) || (pa.pPos = 2 AND pString = 1) || (pa.pPos = 2 AND pString = 2) || (pa.pPos = 3 AND pString = 1)) AND pa.psUID = " . $theseason . " GROUP BY ptttID, psUID ORDER BY teamspeed DESC "); $counta = 1; while($row = mysql_fetch_array($teamrankings1b)){ if($row['ptttID'] == $hometeamid){if($counta == "1"){ $flipcount = 28; }elseif($counta == "2"){ $flipcount = 27; }elseif($counta == "3"){ $flipcount = 26; }elseif($counta == "4"){ $flipcount = 25; }elseif($counta == "5"){ $flipcount = 24; }elseif($counta == "6"){ $flipcount = 23; }elseif($counta == "7"){ $flipcount = 22; }elseif($counta == "8"){ $flipcount = 21; }elseif($counta == "9"){ $flipcount = 20; }elseif($counta == "10"){ $flipcount = 19; }elseif($counta == "11"){ $flipcount = 18; }elseif($counta == "12"){ $flipcount = 17; }elseif($counta == "13"){ $flipcount = 16; }elseif($counta == "14"){ $flipcount = 15; }elseif($counta == "15"){ $flipcount = 14; }elseif($counta == "16"){ $flipcount = 13; }elseif($counta == "17"){ $flipcount = 12; }elseif($counta == "18"){ $flipcount = 11; }elseif($counta == "19"){ $flipcount = 10; }elseif($counta == "20"){ $flipcount = 9; }elseif($counta == "21"){ $flipcount = 8; }elseif($counta == "22"){ $flipcount = 7; }elseif($counta == "23"){ $flipcount = 6; }elseif($counta == "24"){ $flipcount = 5; }elseif($counta == "25"){ $flipcount = 4; }elseif($counta == "26"){ $flipcount = 3; }elseif($counta == "27"){ $flipcount = 2; }elseif($counta == "28"){ $flipcount = 1; } $rank = $flipcount;} if($row['ptttID'] == $awayteamid){if($counta == "1"){ $flipcount = 28; }elseif($counta == "2"){ $flipcount = 27; }elseif($counta == "3"){ $flipcount = 26; }elseif($counta == "4"){ $flipcount = 25; }elseif($counta == "5"){ $flipcount = 24; }elseif($counta == "6"){ $flipcount = 23; }elseif($counta == "7"){ $flipcount = 22; }elseif($counta == "8"){ $flipcount = 21; }elseif($counta == "9"){ $flipcount = 20; }elseif($counta == "10"){ $flipcount = 19; }elseif($counta == "11"){ $flipcount = 18; }elseif($counta == "12"){ $flipcount = 17; }elseif($counta == "13"){ $flipcount = 16; }elseif($counta == "14"){ $flipcount = 15; }elseif($counta == "15"){ $flipcount = 14; }elseif($counta == "16"){ $flipcount = 13; }elseif($counta == "17"){ $flipcount = 12; }elseif($counta == "18"){ $flipcount = 11; }elseif($counta == "19"){ $flipcount = 10; }elseif($counta == "20"){ $flipcount = 9; }elseif($counta == "21"){ $flipcount = 8; }elseif($counta == "22"){ $flipcount = 7; }elseif($counta == "23"){ $flipcount = 6; }elseif($counta == "24"){ $flipcount = 5; }elseif($counta == "25"){ $flipcount = 4; }elseif($counta == "26"){ $flipcount = 3; }elseif($counta == "27"){ $flipcount = 2; }elseif($counta == "28"){ $flipcount = 1; } $arank = $flipcount;} $counta++; }$homerank .= $rank.","; $awayrank .= $arank.",";if($rank > $arank){$homerankcount++;}elseif($rank < $arank){$awayrankcount++;} $teamrankings1c = mysql_query("SELECT SUM(pa.pREC) as teamrec, pa.ptttID FROM player_atts AS pa INNER JOIN tecmoplayer AS tp ON tp.pID = pa.pUID WHERE ((pa.pPos = 1 AND pString = 1) || (pa.pPos = 1 AND pString = 2) || (pa.pPos = 2 AND pString = 1) || (pa.pPos = 2 AND pString = 2) || (pa.pPos = 3 AND pString = 1)) AND pa.psUID = " . $theseason . " GROUP BY ptttID, psUID ORDER BY teamrec DESC "); $counta = 1; while($row = mysql_fetch_array($teamrankings1c)){ if($row['ptttID'] == $hometeamid){if($counta == "1"){ $flipcount = 28; }elseif($counta == "2"){ $flipcount = 27; }elseif($counta == "3"){ $flipcount = 26; }elseif($counta == "4"){ $flipcount = 25; }elseif($counta == "5"){ $flipcount = 24; }elseif($counta == "6"){ $flipcount = 23; }elseif($counta == "7"){ $flipcount = 22; }elseif($counta == "8"){ $flipcount = 21; }elseif($counta == "9"){ $flipcount = 20; }elseif($counta == "10"){ $flipcount = 19; }elseif($counta == "11"){ $flipcount = 18; }elseif($counta == "12"){ $flipcount = 17; }elseif($counta == "13"){ $flipcount = 16; }elseif($counta == "14"){ $flipcount = 15; }elseif($counta == "15"){ $flipcount = 14; }elseif($counta == "16"){ $flipcount = 13; }elseif($counta == "17"){ $flipcount = 12; }elseif($counta == "18"){ $flipcount = 11; }elseif($counta == "19"){ $flipcount = 10; }elseif($counta == "20"){ $flipcount = 9; }elseif($counta == "21"){ $flipcount = 8; }elseif($counta == "22"){ $flipcount = 7; }elseif($counta == "23"){ $flipcount = 6; }elseif($counta == "24"){ $flipcount = 5; }elseif($counta == "25"){ $flipcount = 4; }elseif($counta == "26"){ $flipcount = 3; }elseif($counta == "27"){ $flipcount = 2; }elseif($counta == "28"){ $flipcount = 1; } $rank = $flipcount;} if($row['ptttID'] == $awayteamid){if($counta == "1"){ $flipcount = 28; }elseif($counta == "2"){ $flipcount = 27; }elseif($counta == "3"){ $flipcount = 26; }elseif($counta == "4"){ $flipcount = 25; }elseif($counta == "5"){ $flipcount = 24; }elseif($counta == "6"){ $flipcount = 23; }elseif($counta == "7"){ $flipcount = 22; }elseif($counta == "8"){ $flipcount = 21; }elseif($counta == "9"){ $flipcount = 20; }elseif($counta == "10"){ $flipcount = 19; }elseif($counta == "11"){ $flipcount = 18; }elseif($counta == "12"){ $flipcount = 17; }elseif($counta == "13"){ $flipcount = 16; }elseif($counta == "14"){ $flipcount = 15; }elseif($counta == "15"){ $flipcount = 14; }elseif($counta == "16"){ $flipcount = 13; }elseif($counta == "17"){ $flipcount = 12; }elseif($counta == "18"){ $flipcount = 11; }elseif($counta == "19"){ $flipcount = 10; }elseif($counta == "20"){ $flipcount = 9; }elseif($counta == "21"){ $flipcount = 8; }elseif($counta == "22"){ $flipcount = 7; }elseif($counta == "23"){ $flipcount = 6; }elseif($counta == "24"){ $flipcount = 5; }elseif($counta == "25"){ $flipcount = 4; }elseif($counta == "26"){ $flipcount = 3; }elseif($counta == "27"){ $flipcount = 2; }elseif($counta == "28"){ $flipcount = 1; } $arank = $flipcount;} $counta++; }$homerank .= $rank.","; $awayrank .= $arank.",";if($rank > $arank){$homerankcount++;}elseif($rank < $arank){$awayrankcount++;} $teamrankings1d = mysql_query("SELECT SUM(pa.pHP) as olhp, pa.ptttID FROM player_atts AS pa INNER JOIN tecmoplayer AS tp ON tp.pID = pa.pUID WHERE (pa.pPos = 4) AND pa.psUID = " . $theseason . " GROUP BY ptttID, psUID ORDER BY olhp DESC "); $counta = 1; while($row = mysql_fetch_array($teamrankings1d)){ if($row['ptttID'] == $hometeamid){if($counta == "1"){ $flipcount = 28; }elseif($counta == "2"){ $flipcount = 27; }elseif($counta == "3"){ $flipcount = 26; }elseif($counta == "4"){ $flipcount = 25; }elseif($counta == "5"){ $flipcount = 24; }elseif($counta == "6"){ $flipcount = 23; }elseif($counta == "7"){ $flipcount = 22; }elseif($counta == "8"){ $flipcount = 21; }elseif($counta == "9"){ $flipcount = 20; }elseif($counta == "10"){ $flipcount = 19; }elseif($counta == "11"){ $flipcount = 18; }elseif($counta == "12"){ $flipcount = 17; }elseif($counta == "13"){ $flipcount = 16; }elseif($counta == "14"){ $flipcount = 15; }elseif($counta == "15"){ $flipcount = 14; }elseif($counta == "16"){ $flipcount = 13; }elseif($counta == "17"){ $flipcount = 12; }elseif($counta == "18"){ $flipcount = 11; }elseif($counta == "19"){ $flipcount = 10; }elseif($counta == "20"){ $flipcount = 9; }elseif($counta == "21"){ $flipcount = 8; }elseif($counta == "22"){ $flipcount = 7; }elseif($counta == "23"){ $flipcount = 6; }elseif($counta == "24"){ $flipcount = 5; }elseif($counta == "25"){ $flipcount = 4; }elseif($counta == "26"){ $flipcount = 3; }elseif($counta == "27"){ $flipcount = 2; }elseif($counta == "28"){ $flipcount = 1; } $rank = $flipcount;} if($row['ptttID'] == $awayteamid){if($counta == "1"){ $flipcount = 28; }elseif($counta == "2"){ $flipcount = 27; }elseif($counta == "3"){ $flipcount = 26; }elseif($counta == "4"){ $flipcount = 25; }elseif($counta == "5"){ $flipcount = 24; }elseif($counta == "6"){ $flipcount = 23; }elseif($counta == "7"){ $flipcount = 22; }elseif($counta == "8"){ $flipcount = 21; }elseif($counta == "9"){ $flipcount = 20; }elseif($counta == "10"){ $flipcount = 19; }elseif($counta == "11"){ $flipcount = 18; }elseif($counta == "12"){ $flipcount = 17; }elseif($counta == "13"){ $flipcount = 16; }elseif($counta == "14"){ $flipcount = 15; }elseif($counta == "15"){ $flipcount = 14; }elseif($counta == "16"){ $flipcount = 13; }elseif($counta == "17"){ $flipcount = 12; }elseif($counta == "18"){ $flipcount = 11; }elseif($counta == "19"){ $flipcount = 10; }elseif($counta == "20"){ $flipcount = 9; }elseif($counta == "21"){ $flipcount = 8; }elseif($counta == "22"){ $flipcount = 7; }elseif($counta == "23"){ $flipcount = 6; }elseif($counta == "24"){ $flipcount = 5; }elseif($counta == "25"){ $flipcount = 4; }elseif($counta == "26"){ $flipcount = 3; }elseif($counta == "27"){ $flipcount = 2; }elseif($counta == "28"){ $flipcount = 1; } $arank = $flipcount;} $counta++; }$homerank .= $rank.","; $awayrank .= $arank.",";if($rank > $arank){$homerankcount++;}elseif($rank < $arank){$awayrankcount++;} $teamrankings1e = mysql_query("SELECT SUM(pa.pRS + pa.pRP + pa.pMS) as teamdspeed, pa.ptttID FROM player_atts AS pa INNER JOIN tecmoplayer AS tp ON tp.pID = pa.pUID WHERE ((pa.pPos = 5) || (pa.pPos = 6) || (pa.pPos = 7)) AND pa.psUID = " . $theseason . " GROUP BY ptttID, psUID ORDER BY teamdspeed DESC "); $counta = 1; while($row = mysql_fetch_array($teamrankings1e)){ if($row['ptttID'] == $hometeamid){if($counta == "1"){ $flipcount = 28; }elseif($counta == "2"){ $flipcount = 27; }elseif($counta == "3"){ $flipcount = 26; }elseif($counta == "4"){ $flipcount = 25; }elseif($counta == "5"){ $flipcount = 24; }elseif($counta == "6"){ $flipcount = 23; }elseif($counta == "7"){ $flipcount = 22; }elseif($counta == "8"){ $flipcount = 21; }elseif($counta == "9"){ $flipcount = 20; }elseif($counta == "10"){ $flipcount = 19; }elseif($counta == "11"){ $flipcount = 18; }elseif($counta == "12"){ $flipcount = 17; }elseif($counta == "13"){ $flipcount = 16; }elseif($counta == "14"){ $flipcount = 15; }elseif($counta == "15"){ $flipcount = 14; }elseif($counta == "16"){ $flipcount = 13; }elseif($counta == "17"){ $flipcount = 12; }elseif($counta == "18"){ $flipcount = 11; }elseif($counta == "19"){ $flipcount = 10; }elseif($counta == "20"){ $flipcount = 9; }elseif($counta == "21"){ $flipcount = 8; }elseif($counta == "22"){ $flipcount = 7; }elseif($counta == "23"){ $flipcount = 6; }elseif($counta == "24"){ $flipcount = 5; }elseif($counta == "25"){ $flipcount = 4; }elseif($counta == "26"){ $flipcount = 3; }elseif($counta == "27"){ $flipcount = 2; }elseif($counta == "28"){ $flipcount = 1; } $rank = $flipcount;} if($row['ptttID'] == $awayteamid){if($counta == "1"){ $flipcount = 28; }elseif($counta == "2"){ $flipcount = 27; }elseif($counta == "3"){ $flipcount = 26; }elseif($counta == "4"){ $flipcount = 25; }elseif($counta == "5"){ $flipcount = 24; }elseif($counta == "6"){ $flipcount = 23; }elseif($counta == "7"){ $flipcount = 22; }elseif($counta == "8"){ $flipcount = 21; }elseif($counta == "9"){ $flipcount = 20; }elseif($counta == "10"){ $flipcount = 19; }elseif($counta == "11"){ $flipcount = 18; }elseif($counta == "12"){ $flipcount = 17; }elseif($counta == "13"){ $flipcount = 16; }elseif($counta == "14"){ $flipcount = 15; }elseif($counta == "15"){ $flipcount = 14; }elseif($counta == "16"){ $flipcount = 13; }elseif($counta == "17"){ $flipcount = 12; }elseif($counta == "18"){ $flipcount = 11; }elseif($counta == "19"){ $flipcount = 10; }elseif($counta == "20"){ $flipcount = 9; }elseif($counta == "21"){ $flipcount = 8; }elseif($counta == "22"){ $flipcount = 7; }elseif($counta == "23"){ $flipcount = 6; }elseif($counta == "24"){ $flipcount = 5; }elseif($counta == "25"){ $flipcount = 4; }elseif($counta == "26"){ $flipcount = 3; }elseif($counta == "27"){ $flipcount = 2; }elseif($counta == "28"){ $flipcount = 1; } $arank = $flipcount;} $counta++; }$homerank .= $rank.","; $awayrank .= $arank.",";if($rank > $arank){$homerankcount++;}elseif($rank < $arank){$awayrankcount++;} $teamrankings1f = mysql_query("SELECT SUM(pa.pINT) as teamdint, pa.ptttID FROM player_atts AS pa INNER JOIN tecmoplayer AS tp ON tp.pID = pa.pUID WHERE ((pa.pPos = 5) || (pa.pPos = 6) || (pa.pPos = 7)) AND pa.psUID = " . $theseason . " GROUP BY ptttID, psUID ORDER BY teamdint DESC "); $counta = 1; while($row = mysql_fetch_array($teamrankings1f)){ if($row['ptttID'] == $hometeamid){if($counta == "1"){ $flipcount = 28; }elseif($counta == "2"){ $flipcount = 27; }elseif($counta == "3"){ $flipcount = 26; }elseif($counta == "4"){ $flipcount = 25; }elseif($counta == "5"){ $flipcount = 24; }elseif($counta == "6"){ $flipcount = 23; }elseif($counta == "7"){ $flipcount = 22; }elseif($counta == "8"){ $flipcount = 21; }elseif($counta == "9"){ $flipcount = 20; }elseif($counta == "10"){ $flipcount = 19; }elseif($counta == "11"){ $flipcount = 18; }elseif($counta == "12"){ $flipcount = 17; }elseif($counta == "13"){ $flipcount = 16; }elseif($counta == "14"){ $flipcount = 15; }elseif($counta == "15"){ $flipcount = 14; }elseif($counta == "16"){ $flipcount = 13; }elseif($counta == "17"){ $flipcount = 12; }elseif($counta == "18"){ $flipcount = 11; }elseif($counta == "19"){ $flipcount = 10; }elseif($counta == "20"){ $flipcount = 9; }elseif($counta == "21"){ $flipcount = 8; }elseif($counta == "22"){ $flipcount = 7; }elseif($counta == "23"){ $flipcount = 6; }elseif($counta == "24"){ $flipcount = 5; }elseif($counta == "25"){ $flipcount = 4; }elseif($counta == "26"){ $flipcount = 3; }elseif($counta == "27"){ $flipcount = 2; }elseif($counta == "28"){ $flipcount = 1; } $rank = $flipcount;} if($row['ptttID'] == $awayteamid){if($counta == "1"){ $flipcount = 28; }elseif($counta == "2"){ $flipcount = 27; }elseif($counta == "3"){ $flipcount = 26; }elseif($counta == "4"){ $flipcount = 25; }elseif($counta == "5"){ $flipcount = 24; }elseif($counta == "6"){ $flipcount = 23; }elseif($counta == "7"){ $flipcount = 22; }elseif($counta == "8"){ $flipcount = 21; }elseif($counta == "9"){ $flipcount = 20; }elseif($counta == "10"){ $flipcount = 19; }elseif($counta == "11"){ $flipcount = 18; }elseif($counta == "12"){ $flipcount = 17; }elseif($counta == "13"){ $flipcount = 16; }elseif($counta == "14"){ $flipcount = 15; }elseif($counta == "15"){ $flipcount = 14; }elseif($counta == "16"){ $flipcount = 13; }elseif($counta == "17"){ $flipcount = 12; }elseif($counta == "18"){ $flipcount = 11; }elseif($counta == "19"){ $flipcount = 10; }elseif($counta == "20"){ $flipcount = 9; }elseif($counta == "21"){ $flipcount = 8; }elseif($counta == "22"){ $flipcount = 7; }elseif($counta == "23"){ $flipcount = 6; }elseif($counta == "24"){ $flipcount = 5; }elseif($counta == "25"){ $flipcount = 4; }elseif($counta == "26"){ $flipcount = 3; }elseif($counta == "27"){ $flipcount = 2; }elseif($counta == "28"){ $flipcount = 1; } $arank = $flipcount;} $counta++; }$homerank .= $rank.","; $awayrank .= $arank.",";if($rank > $arank){$homerankcount++;}elseif($rank < $arank){$awayrankcount++;} $teamrankings1g = mysql_query("SELECT SUM(pa.pHP) as teamdhp, pa.ptttID FROM player_atts AS pa INNER JOIN tecmoplayer AS tp ON tp.pID = pa.pUID WHERE ((pa.pPos = 5) || (pa.pPos = 6) || (pa.pPos = 7)) AND pa.psUID = " . $theseason . " GROUP BY ptttID, psUID ORDER BY teamdhp DESC "); $counta = 1; while($row = mysql_fetch_array($teamrankings1g)){ if($row['ptttID'] == $hometeamid){if($counta == "1"){ $flipcount = 28; }elseif($counta == "2"){ $flipcount = 27; }elseif($counta == "3"){ $flipcount = 26; }elseif($counta == "4"){ $flipcount = 25; }elseif($counta == "5"){ $flipcount = 24; }elseif($counta == "6"){ $flipcount = 23; }elseif($counta == "7"){ $flipcount = 22; }elseif($counta == "8"){ $flipcount = 21; }elseif($counta == "9"){ $flipcount = 20; }elseif($counta == "10"){ $flipcount = 19; }elseif($counta == "11"){ $flipcount = 18; }elseif($counta == "12"){ $flipcount = 17; }elseif($counta == "13"){ $flipcount = 16; }elseif($counta == "14"){ $flipcount = 15; }elseif($counta == "15"){ $flipcount = 14; }elseif($counta == "16"){ $flipcount = 13; }elseif($counta == "17"){ $flipcount = 12; }elseif($counta == "18"){ $flipcount = 11; }elseif($counta == "19"){ $flipcount = 10; }elseif($counta == "20"){ $flipcount = 9; }elseif($counta == "21"){ $flipcount = 8; }elseif($counta == "22"){ $flipcount = 7; }elseif($counta == "23"){ $flipcount = 6; }elseif($counta == "24"){ $flipcount = 5; }elseif($counta == "25"){ $flipcount = 4; }elseif($counta == "26"){ $flipcount = 3; }elseif($counta == "27"){ $flipcount = 2; }elseif($counta == "28"){ $flipcount = 1; } $rank = $flipcount;} if($row['ptttID'] == $awayteamid){if($counta == "1"){ $flipcount = 28; }elseif($counta == "2"){ $flipcount = 27; }elseif($counta == "3"){ $flipcount = 26; }elseif($counta == "4"){ $flipcount = 25; }elseif($counta == "5"){ $flipcount = 24; }elseif($counta == "6"){ $flipcount = 23; }elseif($counta == "7"){ $flipcount = 22; }elseif($counta == "8"){ $flipcount = 21; }elseif($counta == "9"){ $flipcount = 20; }elseif($counta == "10"){ $flipcount = 19; }elseif($counta == "11"){ $flipcount = 18; }elseif($counta == "12"){ $flipcount = 17; }elseif($counta == "13"){ $flipcount = 16; }elseif($counta == "14"){ $flipcount = 15; }elseif($counta == "15"){ $flipcount = 14; }elseif($counta == "16"){ $flipcount = 13; }elseif($counta == "17"){ $flipcount = 12; }elseif($counta == "18"){ $flipcount = 11; }elseif($counta == "19"){ $flipcount = 10; }elseif($counta == "20"){ $flipcount = 9; }elseif($counta == "21"){ $flipcount = 8; }elseif($counta == "22"){ $flipcount = 7; }elseif($counta == "23"){ $flipcount = 6; }elseif($counta == "24"){ $flipcount = 5; }elseif($counta == "25"){ $flipcount = 4; }elseif($counta == "26"){ $flipcount = 3; }elseif($counta == "27"){ $flipcount = 2; }elseif($counta == "28"){ $flipcount = 1; } $arank = $flipcount;} $counta++; }$homerank .= $rank.","; $awayrank .= $arank.",";if($rank > $arank){$homerankcount++;}elseif($rank < $arank){$awayrankcount++;} $teamavg1 = mysql_query("select tt.tID, tt.tname, tt.city, tt.abrev as ttAbrev, SUM(gs.gsCond) AS gp, ((sum(gs.gsPassYards)+sum(gs.gsRushYards))/ COUNT(DISTINCT(gs.gsgUID))) as totavg, sum(gs.gsPassYards)/COUNT(DISTINCT(gs.gsgUID)) as pavg, sum(gs.gsRushYards)/COUNT(DISTINCT(gs.gsgUID)) as ravg FROM tecmoteam as tt INNER JOIN game_stats AS gs ON tt.tID = gs.gsTeam WHERE gsSeason = '" . $theseason . "' AND gsTeam = " . $hometeamid . " GROUP BY gsTeam"); while($row = mysql_fetch_array($teamavg1)){ $hometeamtotypg = $row["totavg"]; $hometeampypg = $row["pavg"]; $hometeamrypg = $row["ravg"]; } $teamavg1a = mysql_query("select tt.tID, tt.tname, tt.city, tt.abrev as ttAbrev, SUM(gs.gsCond) AS gp, ((sum(gs.gsPassYards)+sum(gs.gsRushYards))/ COUNT(DISTINCT(gs.gsgUID))) as totaavg, sum(gs.gsPassYards)/COUNT(DISTINCT(gs.gsgUID)) as paavg, sum(gs.gsRushYards)/COUNT(DISTINCT(gs.gsgUID)) as raavg FROM tecmoteam as tt INNER JOIN game_stats AS gs ON tt.tID = gs.gsOpp WHERE gsSeason = '" . $theseason . "' AND tID = " . $hometeamid . " GROUP BY gsOpp"); while($row = mysql_fetch_array($teamavg1a)){ $hometeamtotaypg = $row["totaavg"]; $hometeampyapg = $row["paavg"]; $hometeamryapg = $row["raavg"]; } $teamavg2 = mysql_query("select tt.tID, tt.tname, tt.city, tt.abrev as ttAbrev, SUM(gs.gsCond) AS gp, ((sum(gs.gsPassYards)+sum(gs.gsRushYards))/ COUNT(DISTINCT(gs.gsgUID))) as totavg, sum(gs.gsPassYards)/COUNT(DISTINCT(gs.gsgUID)) as pavg, sum(gs.gsRushYards)/COUNT(DISTINCT(gs.gsgUID)) as ravg FROM tecmoteam as tt INNER JOIN game_stats AS gs ON tt.tID = gs.gsTeam WHERE gsSeason = '" . $theseason . "' AND gsTeam = " . $awayteamid . " GROUP BY gsTeam"); while($row = mysql_fetch_array($teamavg2)){ $awayteamtotypg = $row["totavg"]; $awayteampypg = $row["pavg"]; $awayteamrypg = $row["ravg"]; } $teamavg2a = mysql_query("select tt.tID, tt.tname, tt.city, tt.abrev as ttAbrev, SUM(gs.gsCond) AS gp, ((sum(gs.gsPassYards)+sum(gs.gsRushYards))/ COUNT(DISTINCT(gs.gsgUID))) as totaavg, sum(gs.gsPassYards)/COUNT(DISTINCT(gs.gsgUID)) as paavg, sum(gs.gsRushYards)/COUNT(DISTINCT(gs.gsgUID)) as raavg FROM tecmoteam as tt INNER JOIN game_stats AS gs ON tt.tID = gs.gsOpp WHERE gsSeason = '" . $theseason . "' AND tID = " . $awayteamid . " GROUP BY gsOpp"); while($row = mysql_fetch_array($teamavg2a)){ $awayteamtotaypg = $row["totaavg"]; $awayteampyapg = $row["paavg"]; $awayteamryapg = $row["raavg"]; } } ?> <?php echo $site_title; ?>Game Preview
Season : Week

Team Attributes (Home & Away)

$awayteamwinp){ $homeadvantage++; }elseif($hometeamwinp == $awayteamwinp){ }else{ $awayadvantage++; } if($hometeamppg > $awayteamppg){ $homeadvantage++; }elseif($hometeamppg == $awayteamppg){ }else{ $awayadvantage++; } if($hometeampapg < $awayteampapg){ $homeadvantage++; }elseif($hometeamppg == $awayteamppg){ }else{ $awayadvantage++; } if(($hometeamtotypg > $awayteamtotypg) && ($hometeamtotaypg < $awayteamtotaypg)){ $homeadvantage++; }elseif($hometeamtotaypg == $awayteamtotaypg){ }elseif(($hometeamtotypg < $awayteamtotypg) && ($hometeamtotaypg > $awayteamtotaypg)){ $awayadvantage++; } if($homerankcount > $awayrankcount){ $homeadvantage++; }elseif($homerankcount == $awayrankcount){ }else{ $awayadvantage++; } $favorite = $homeadvantage - $awayadvantage; $prediction = ", , , , And now for Lacys pick. "; if($favorite == "7"){ $prediction .= "This has blow out written all over it. " . $homecoach . " and the " . $hometeamlast . ", in a landslide. " . $hometeamfirst . " by 28. "; $lpick = "❮ ❮ ❮ + 28"; }elseif($favorite == "6"){ $prediction .= "This ones a lock boys. Ive got " . $homecoach . " and the home team " . $hometeamlast . ", as major favorites. " . $hometeamfirst . " by 21. "; $lpick = "❮ ❮ ❮ + 21"; }elseif($favorite == "5"){ $prediction .= "I have coach " . $homecoach . " and the home team " . $hometeamlast . ", as heavy favorites. " . $hometeamlast . " by 17. "; $lpick = "❮ ❮ ❮ +17"; }elseif($favorite == "4"){ $prediction .= "I take coach " . $homecoach . " and the home team " . $hometeamlast . ", as moderate favorites over " . $awaycoach . " and the " . $awayteamlast . ". " . $hometeamfirst . " by 14. "; $lpick = "❮ ❮ ❮ +14"; }elseif($favorite == "3"){ $prediction .= "I will take coach " . $homecoach . " and the home team " . $hometeamlast . ", as the favorite over " . $awaycoach . " and the " . $awayteamlast . ". " . $hometeamfirst . " by 10. "; $lpick = "❮ ❮ ❮ +10"; }elseif($favorite == "2"){ $prediction .= "I see coach " . $homecoach . " and the home team " . $hometeamlast . ", as slight favorites over " . $awaycoach . " and the " . $awayteamlast . ". " . $hometeamfirst . " by 7. "; $lpick = "❮ ❮ ❮ +7"; }elseif($favorite == "1"){ $prediction .= "Coach " . $homecoach . " and the home team " . $hometeamlast . ", in a tight one, over " . $awaycoach . " and the " . $awayteamlast . ". " . $hometeamlast . " by a field goal. "; $lpick = "❮ ❮ ❮ +3"; }elseif($favorite == "0"){ $prediction .= "Its a toss up. Sorry boys, but this one is too close to call. "; $lpick = " ❮❯ "; }elseif($favorite == "-1"){ $prediction .= "Coach " . $awaycoach . " and the away team " . $awayteamlast . ", steal one on the road over " . $homecoach . " and the " . $hometeamlast . ". " . $awayteamlast . " by 3. "; $lpick = "-3 ❯ ❯ ❯"; }elseif($favorite == "-2"){ $prediction .= "I have Coach " . $awaycoach . " and the away team " . $awayteamlast . ", edging " . $homecoach . " and the " . $hometeamlast . ". " . $awayteamlast . " by 7. "; $lpick = "-7 ❯ ❯ ❯"; }elseif($favorite == "-3"){ $prediction .= "I have Coach " . $awaycoach . " and the road team " . $awayteamlast . ", winning a close one on the road over " . $homecoach . " and the " . $hometeamlast . ". " . $awayteamfirst . " by 10. "; $lpick = "-10 ❯ ❯ ❯"; }elseif($favorite == "-4"){ $prediction .= " " . $awaycoach . " and the away team " . $awayteamlast . ", are the favorites against " . $homecoach . " and the " . $hometeamlast . ". " . $awayteamfirst . " by 14. "; $lpick = "-14 ❯ ❯ ❯"; }elseif($favorite == "-5"){ $prediction .= "Look for " . $awaycoach . " and the " . $awayteamlast . ", to win big on the road. " . $awayteamlast . " by 17. "; $lpick = "-17 ❯ ❯ ❯"; }elseif($favorite == "-6"){ $prediction .= "No question here boys. " . $awaycoach . " and the " . $awayteamlast . ", will roll against " . $homecoach . " and the " . $hometeamlast . ". " . $awayteamlast . " by 21. ,"; $lpick = "-21 ❯ ❯ ❯"; }elseif($favorite == "-7"){ $prediction .= "Oh wow, what a mismatch. " . $awaycoach . " should cruise to victory. " . $awayteamlast . " by 28. "; $lpick = "-28 ❯ ❯ ❯"; } $pause = " , "; if($homecoachid == 865 || $awaycoachid == 865){ $ps = ". Hey! Have you noticed that Old Dirty Tecmos fucking face. looks like an OLD DIRTY CUNT?"; } ?>

Lacy's
Preview