"; if ($_GET["DEBUG"] == 1) { $DEBUG = 1; } //set tab default $TABID = 1; if ($_GET["TABID"] == 2) { $TABID = 2; }elseif ($_GET["TABID"] == 3) { $TABID = 3; } //print $TABID . "
"; //set INACTIVE level $INACTIVE = 0; //print $_GET["INACTIVE"] . "
"; if ($_GET["INACTIVE"] == 1) { $INACTIVE = 1; $ACTION_STRING = $ACTION_STRING . "?INACTIVE=1"; } $been_hereselect = (isset($_POST['been_hereselect'])) ? $been_hereselect + 1 : 0; ?> \n"; $selected = mysql_select_db($dbname) or DIE("Could not select requested db $dbname"); ?>
"; ?>
"; }else { print "
"; } ?>

Open Divisions

"; /* if ($INACTIVE == 1){ $query_divisions = "SELECT div_id, div_name_st, div_status, div_name from $divisions_table where league = 'open' order by display_order asc"; }else { $query_divisions = "SELECT div_id, div_name_st, div_status, div_name from $divisions_table where div_status = \"ACTIVE\" and league = 'open' order by display_order asc"; } //print "date before division sql " . date('l jS \of F Y h:i:s A'); $result_divisions = mysql_query($query_divisions) or DIE("Could not Execute Query on table divisions"); //print "date after division sql " . date('l jS \of F Y h:i:s A'); */ //populate division array while ($row_divisions = mysql_fetch_array($result_divisions)) { //print "divisions = " . $row_divisions{div_name_st} . "
"; $div_info[div_ids][] = $row_divisions{div_id}; $div_info[divisions][] = $row_divisions{div_name_st}; $div_info[div_status][] = $row_divisions{div_status}; $div_info[div_name][] = $row_divisions{div_name}; } print "

\n"; print "

\n"; //if (($i == 3) or ($i == 8) or ($i == 13)){ if (($i == 2) or ($i == 9) or ($i == 10)){ print ""; $maxrows = 7; } print "
\n"; for ( $i = 0; $i < 6; $i++ ) { $teamarray = array(); //get teams information by division sorted by scores //$query = "SELECT * FROM $teams_table where `team_division` = '" . $div_info[divisions][$i] . "' order by `rank` desc"; if ($INACTIVE == 1){ $query = "SELECT * FROM $teams_table where `team_div_id` = '" . $div_info[div_ids][$i] . "' and league = 'open' order by `rank` asc"; }else { $query = "SELECT * FROM $teams_table where `team_div_id` = '" . $div_info[div_ids][$i] . "' AND team_status = \"ACTIVE\" and league = 'open' order by `rank` asc"; } if ($DEBUG) {print $query;} //print "date before teams sql " . date('l jS \of F Y h:i:s A'); $result = mysql_query($query) or DIE("Could not Execute Query on table teams"); //print "date after teams sql " . date('l jS \of F Y h:i:s A'); if ($result) { print "\n"; if ($i == 0){ print "\n\n"; }else { print "\n\n"; } print "\n\n"; $x = 0; while ($row = mysql_fetch_array($result)) { $pointtotal = 0; $goalsfor = 0; $goalsagainst = 0; $goalsdiff = 0; $wins = 0; $losses = 0; $ties = 0; $winsbyforfeit = 0; $lossesbyforfeit = 0; $totaldeducted = 0; $x = $x + 1; // print "\n"; // print "\n"; $homepoints_query = "select mu_week_num, mu_home_points, mu_home_score, mu_visiting_points, mu_visiting_score, mu_home_forfeit, mu_visiting_forfeit from $matchups_table where mu_home_score is not null and mu_home_id = " . $row{team_id} . " order by mu_week_num;"; $result_homepoints = mysql_query($homepoints_query) or DIE("Could not Execute Query on table matchups"); while ($rowhomepoints = mysql_fetch_array($result_homepoints)) { $pointtotal = $pointtotal + $rowhomepoints{mu_home_points}; $goalsfor = $goalsfor + $rowhomepoints{mu_home_score}; $goalsagainst = $goalsagainst + $rowhomepoints{mu_visiting_score}; $goalsdiff = $goalsfor - $goalsagainst; if ($DEBUG) {print $row{team_id} . " home score - " . $rowhomepoints{mu_home_score} . "
";} ////////////home_points //wins, losses, ties, forfeits if (($rowhomepoints{mu_home_points} - $rowhomepoints{mu_visiting_points}) > 0){$wins = $wins +1;}elseif (($rowhomepoints{mu_home_points} - $rowhomepoints{mu_visiting_points}) == 0){ //print "its a tie
"; $ties = $ties +1;} elseif (($rowhomepoints{mu_home_points} - $rowhomepoints{mu_visiting_points}) < 0){$losses = $losses + 1;} //print $row{team_name} . ":week = ". $rowhomepoints{mu_week_num} . ", " . $wins . ", " . $losses . ", " . $ties . "
"; if ($rowhomepoints{mu_home_forfeit} > 0) {$lossesbyforfeit = $lossesbyforfeit + 1;} if ($rowhomepoints{mu_visiting_forfeit} > 0) {$winsbyforfeit = $winsbyforfeit + 1;} if ($DEBUG) { print "V-Winsbyforfeit = " . $winbyforfeit . "
"; print "V-Lossesbyforfeit = " . $lossesbyforfeit . "
"; } //////// } $visitingpoints_query = "select mu_week_num, mu_visiting_points, mu_home_points, mu_home_score, mu_visiting_score, mu_home_forfeit, mu_visiting_forfeit from $matchups_table where mu_visiting_score is not null and mu_visiting_id = " . $row{team_id} . " order by mu_week_num;"; //print $visitingpoints_query; $result_visitingpoints = mysql_query($visitingpoints_query) or DIE("Could not Execute Query on table matchups"); while ($rowvisitingpoints = mysql_fetch_array($result_visitingpoints)) { $pointtotal = $pointtotal + $rowvisitingpoints{mu_visiting_points}; $goalsfor = $goalsfor + $rowvisitingpoints{mu_visiting_score}; $goalsagainst = $goalsagainst + $rowvisitingpoints{mu_home_score}; $goalsdiff = $goalsfor - $goalsagainst; if ($DEBUG) {print $row{team_id} . " visiting score - " . $rowvisitingpoints{mu_visiting_score} . "
";} ////////////////Visiting //wins, losses, ties if (($rowvisitingpoints{mu_visiting_points} - $rowvisitingpoints{mu_home_points}) > 0){$wins = $wins +1;} elseif (($rowvisitingpoints{mu_visiting_points} - $rowvisitingpoints{mu_home_points}) == 0){ //print "its a tie
"; $ties = $ties +1;} elseif (($rowvisitingpoints{mu_visiting_points} - $rowvisitingpoints{mu_home_points}) < 0){$losses = $losses + 1;} if ($rowvisitingpoints{mu_home_forfeit} > 0) {$winsbyforfeit = $winsbyforfeit + 1;} if ($rowvisitingpoints{mu_visiting_forfeit} > 0) {$lossesbyforfeit = $lossesbyforfeit + 1;} if ($DEBUG) { print "V-Winsbyforfeit = " . $winbyforfeit . "
"; print "V-Lossesbyforfeit = " . $lossesbyforfeit . "
"; } ///////////// } ///////////////////////////////////////////////// $query_deductions = "SELECT team_id, points_deducted from $deductions_table where team_id = " . $row{team_id} . ";"; //print "game deductions query = " . $query_deductions . "
"; $result_deducts = mysql_query($query_deductions) or DIE("Could not Execute Query on table deductions"); ////////////////////////////////////////////// //populate deduction array //deductions while ($row_deducts = mysql_fetch_array($result_deducts)) { $pointtotal = $pointtotal - $row_deducts{points_deducted}; $totaldeducted = $totaldeducted + $row_deducts{points_deducted}; // $deduct_info[d_points_deducted][] = $row_deducts{points_deducted}; } $teamarray[] = array( "pointtotal" => $pointtotal, "name" => $row{team_name}, "GF" => $goalsfor, "GA"=>$goalsagainst, "GD" => $goalsdiff, "GW"=>$wins, "GL"=>$losses, "GT"=>$ties, "WF"=>$winsbyforfeit, "LF"=>$lossesbyforfeit, "PD"=>$totaldeducted); //////////////////////////////////////////////////////// // print "\n"; // print "\n"; //print "\n"; //print "\n"; //print "\n"; //print ""; } // end of team info while loop array_multisort(array_map(function($element) { return $element[2]['pointtotal']; }, $teamarray), SORT_DESC, $teamarray); $teamarrayrev = array_reverse($teamarray); foreach ( $teamarrayrev as $teamvar ) { print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print ""; //print "\n", $teamvar['name'], "\t\t
points= ", $teamvar['pointtotal'], "\t\tGD= ", $teamvar['GD'], "\t\tGF= ",$teamvar['GF'], "\t\tGA= ", $teamvar['GA'], "\t\twins= ",$teamvar['GW'],"\t\tlosses= ", $teamvar['GL'],"\t\tties= ",$teamvar['GT'], "
"; } $x1 = $x; while ($x1 < $maxrows){ print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print ""; $x1 = $x1 + 1; } } // end of result if print "
Division " . $div_info[divisions][$i] . "
Division " . $div_info[divisions][$i] . "
Team NamePointsGFGAGDGWGLGTFWFLPD
" .$row{team_name}. " " . $row{points}. "" . $pointtotal . "" . $goalsfor . "" . $goalsagainst . "" . $goalsdiff . "
" .$teamvar['name'] . " " . $teamvar['pointtotal'] . "" . $teamvar['GF'] . "" . $teamvar['GA'] . "" . $teamvar['GD'] . "" . $teamvar['GW'] . "" . $teamvar['GL'] . "" . $teamvar['GT'] . "" . $teamvar['WF'] . "" . $teamvar['LF'] . "" . $teamvar['PD'] . "
                     
\n"; } // end of open divisions for loop ?>
Click on the division name to link to division schedule.
GF = Goals For; GA = Goals Against; GD = Goal Differential; GW = Games Won; GL = Games Lossed; GT = Games Tied; FW = Forfeit Wins; FL = Forfeit Losses; PD = Points Deducted.

"; }else { print "
"; } ?>

Over 30 Divisions

"; if ($INACTIVE == 1){ $query_divisions = "SELECT div_id, div_name_st, div_status, display_order, div_name from $divisions_table where league = 'O30' order by display_order asc"; }else { $query_divisions = "SELECT div_id, div_name_st, div_status, display_order, div_name from $divisions_table where div_status = \"ACTIVE\" and league = 'O30' order by display_order asc"; } //print $query_divisions; $result_divisions = mysql_query($query_divisions) or DIE("Could not Execute Query on table divisions"); //populate division array while ($row_divisions = mysql_fetch_array($result_divisions)) { $div_info[div_ids][] = $row_divisions{div_id}; $div_info[divisions][] = $row_divisions{div_name_st}; $div_info[div_status][] = $row_divisions{div_status}; $div_info[div_order][] = $row_divisions{display_order}; $div_info[div_name][] = $row_divisions{div_name}; //print $row_divisions{div_name} . "
"; } print "

\n"; print "

\n\n"; if (($i == 9) or ($i == 17) or ($i == 26)){ print ""; $maxrows = 9; } print "
\n"; //print "
\n"; //for ( $i = 0; $i < count($div_info[div_ids]); $i++ ) { for ( $i = 6; $i < 13; $i++ ) { $teamarray = array(); //get teams information by division sorted by scores //$query = "SELECT * FROM $teams_table where `team_division` = '" . $div_info[divisions][$i] . "' order by `rank` desc"; if ($INACTIVE == 1){ $query = "SELECT * FROM $teams_table where `team_div_id` = '" . $div_info[div_ids][$i] . "' and league = 'O30' order by `rank` asc"; }else { $query = "SELECT * FROM $teams_table where `team_div_id` = '" . $div_info[div_ids][$i] . "' AND team_status = \"ACTIVE\" and league = 'O30' order by `rank` asc"; } if ($DEBUG) {print $query;} $result = mysql_query($query) or DIE("Could not Execute Query on table teams"); if ($result) { print "\n"; if ($i == 0){ print "\n\n"; }else { print "\n\n"; } print "\n\n"; $x = 0; while ($row = mysql_fetch_array($result)) { $pointtotal = 0; $goalsfor = 0; $goalsagainst = 0; $goalsdiff = 0; $wins = 0; $losses = 0; $ties = 0; $winsbyforfeit = 0; $lossesbyforfeit = 0; $totaldeducted = 0; $x = $x + 1; $homepoints_query = "select mu_id, mu_week_num, mu_home_points, mu_home_score, mu_visiting_points, mu_visiting_score, mu_home_forfeit, mu_visiting_forfeit from $matchups_table where mu_home_score is not null and mu_home_id = " . $row{team_id} . " order by mu_week_num;"; //$homepoints_query = "select mu_home_points, mu_home_score, mu_visiting_score from $matchups_table where mu_home_id = " . $row{team_id} . ";"; //print $homepoints_query; $result_homepoints = mysql_query($homepoints_query) or DIE("Could not Execute Query on table matchups"); while ($rowhomepoints = mysql_fetch_array($result_homepoints)) { $pointtotal = $pointtotal + $rowhomepoints{mu_home_points}; $goalsfor = $goalsfor + $rowhomepoints{mu_home_score}; $goalsagainst = $goalsagainst + $rowhomepoints{mu_visiting_score}; $goalsdiff = $goalsfor - $goalsagainst; if ($DEBUG) {print $row{team_id} . " home score - " . $rowhomepoints{mu_home_score} . "
";} //////////// //wins, losses, ties, forfeits if (($rowhomepoints{mu_home_points} - $rowhomepoints{mu_visiting_points}) > 0){$wins = $wins +1;}elseif (($rowhomepoints{mu_home_points} - $rowhomepoints{mu_visiting_points}) == 0){ //print "its a tie
"; $ties = $ties +1;} elseif (($rowhomepoints{mu_home_points} - $rowhomepoints{mu_visiting_points}) < 0){$losses = $losses + 1;} //print $row{team_name} . ":week = ". $rowhomepoints{mu_week_num} . ", " . $wins . ", " . $losses . ", " . $ties . "
"; if ($rowhomepoints{mu_home_forfeit} > 0) {$lossesbyforfeit = $lossesbyforfeit + 1;} if ($rowhomepoints{mu_visiting_forfeit} > 0) {$winsbyforfeit = $winsbyforfeit + 1;} if ($DEBUG) { print $row{team_id} . "-" . $rowhomepoints{mu_id} ."H-Winsbyforfeit = " . $winbyforfeit . "
"; print $row{team_id} . "-" . $rowhomepoints{mu_id} . "H-Lossesbyforfeit = " . $lossesbyforfeit . "
"; } //////// } $visitingpoints_query = "select mu_id, mu_week_num, mu_visiting_points, mu_home_points, mu_home_score, mu_visiting_score, mu_home_forfeit, mu_visiting_forfeit from $matchups_table where mu_visiting_score is not null and mu_visiting_id = " . $row{team_id} . " order by mu_week_num;"; //$visitingpoints_query = "select mu_visiting_points, mu_home_score, mu_visiting_score from $matchups_table where mu_visiting_id = " . $row{team_id} . ";"; //print $visitingpoints_query; $result_visitingpoints = mysql_query($visitingpoints_query) or DIE("Could not Execute Query on table matchups"); while ($rowvisitingpoints = mysql_fetch_array($result_visitingpoints)) { $pointtotal = $pointtotal + $rowvisitingpoints{mu_visiting_points}; $goalsfor = $goalsfor + $rowvisitingpoints{mu_visiting_score}; $goalsagainst = $goalsagainst + $rowvisitingpoints{mu_home_score}; $goalsdiff = $goalsfor - $goalsagainst; ////////////////Visiting //wins, losses, ties if (($rowvisitingpoints{mu_visiting_points} - $rowvisitingpoints{mu_home_points}) > 0){$wins = $wins +1;} elseif (($rowvisitingpoints{mu_visiting_points} - $rowvisitingpoints{mu_home_points}) == 0){ //print "its a tie
"; $ties = $ties +1;} elseif (($rowvisitingpoints{mu_visiting_points} - $rowvisitingpoints{mu_home_points}) < 0){$losses = $losses + 1;} if ($rowvisitingpoints{mu_home_forfeit} > 0) {$winsbyforfeit = $winsbyforfeit + 1;} if ($rowvisitingpoints{mu_visiting_forfeit} > 0) {$lossesbyforfeit = $lossesbyforfeit + 1;} if ($DEBUG) { print $row{team_id} . "-" . $rowvisitingpoints{mu_id} . "V-Winsbyforfeit = " . $winbyforfeit . "
"; print $row{team_id} . "-" . $rowvisitingpoints{mu_id} . "V-Lossesbyforfeit = " . $lossesbyforfeit . "
"; } if ($DEBUG) {print $row{team_id} . " visiting score - " . $rowvisitingpoints{mu_visiting_score} . "
";} } ///////////////////////////////////////////////// $query_deductions = "SELECT team_id, points_deducted from $deductions_table where team_id = " . $row{team_id} . ";"; //print "game deductions query = " . $query_deductions . "
"; $result_deducts = mysql_query($query_deductions) or DIE("Could not Execute Query on table deductions"); ////////////////////////////////////////////// //populate deduction array //deductions while ($row_deducts = mysql_fetch_array($result_deducts)) { $pointtotal = $pointtotal - $row_deducts{points_deducted}; $totaldeducted = $totaldeducted + $row_deducts{points_deducted}; // $deduct_info[d_points_deducted][] = $row_deducts{points_deducted}; } $teamarray[] = array( "pointtotal" => $pointtotal, "name" => $row{team_name}, "GF" => $goalsfor, "GA"=>$goalsagainst, "GD" => $goalsdiff, "GW"=>$wins, "GL"=>$losses, "GT"=>$ties, "WF"=>$winsbyforfeit, "LF"=>$lossesbyforfeit, "PD"=>$totaldeducted); //print "\n"; //print "\n"; //print "\n"; //print "\n"; //print ""; } // end of team info while loop array_multisort(array_map(function($element) { return $element[2]['pointtotal']; }, $teamarray), SORT_DESC, $teamarray); $teamarrayrev = array_reverse($teamarray); foreach ( $teamarrayrev as $teamvar ) { print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print ""; //print "\n", $teamvar['name'], "\t\t
points= ", $teamvar['pointtotal'], "\t\tGD= ", $teamvar['GD'], "\t\tGF= ",$teamvar['GF'], "\t\tGA= ", $teamvar['GA'], "\t\twins= ",$teamvar['GW'],"\t\tlosses= ", $teamvar['GL'],"\t\tties= ",$teamvar['GT'], "
"; } $x1 = $x; while ($x1 < $maxrows){ print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print ""; $x1 = $x1 + 1; } } // end of result if print "
Division " . $div_info[divisions][$i] . "
Division " . $div_info[divisions][$i] . "
Team NamePointsGFGAGDGWGLGTFWFLPD
" . $pointtotal . "" . $goalsfor . "" . $goalsagainst . "" . $goalsdiff . "
" .$teamvar['name'] . " " . $teamvar['pointtotal'] . "" . $teamvar['GF'] . "" . $teamvar['GA'] . "" . $teamvar['GD'] . "" . $teamvar['GW'] . "" . $teamvar['GL'] . "" . $teamvar['GT'] . "" . $teamvar['WF'] . "" . $teamvar['LF'] . "" . $teamvar['PD'] . "
                     
\n"; } // end of open divisions for loop ?>
Click on the division name to link to division schedule.
GF = Goals For; GA = Goals Against; GD = Goal Differential; GW = Games Won; GL = Games Lossed; GT = Games Tied; FW = Forfeit Wins; FL = Forfeit Losses; PD = Points Deducted.

"; }else { print "
"; } ?>

Over 40 Division

\n"; print "\n\n"; if (($i == 14) or ($i == 15) or ($i == 26)){ print ""; } print "
\n"; //print "
\n"; //for ( $i = 0; $i < count($div_info[div_ids]); $i++ ) { for ( $i = 13; $i < 15; $i++ ) { $teamarray = array(); //get teams information by division sorted by scores //$query = "SELECT * FROM $teams_table where `team_division` = '" . $div_info[divisions][$i] . "' order by `rank` desc"; if ($INACTIVE == 1){ $query = "SELECT * FROM $teams_table where `team_div_id` = '" . $div_info[div_ids][$i] . "' and league = 'O40' order by `rank` asc"; }else { $query = "SELECT * FROM $teams_table where `team_div_id` = '" . $div_info[div_ids][$i] . "' AND team_status = \"ACTIVE\" and league = 'O40' order by `rank` asc"; } if ($DEBUG) {print $query;} $result = mysql_query($query) or DIE("Could not Execute Query on table teams"); if ($result) { print "\n"; if ($i == 0){ print "\n\n"; }else { print "\n\n"; } print "\n\n"; $x = 0; //print "
Division " . $div_info[divisions][$i] . "
Division " . $div_info[divisions][$i] . "
Team NamePointsGFGAGDGWGLGTFWFLPD
\n"; ////print "\n\n"; //print "\n\n"; //print "\n\n"; //$x = 0; while ($row = mysql_fetch_array($result)) { $pointtotal = 0; $goalsfor = 0; $goalsagainst = 0; $goalsdiff = 0; $wins = 0; $losses = 0; $ties = 0; $winsbyforfeit = 0; $lossesbyforfeit = 0; $totaldeducted = 0; $x = $x + 1; // print "\n"; // print "\n"; // print "\n"; $homepoints_query = "select mu_week_num, mu_home_points, mu_home_score, mu_visiting_points, mu_visiting_score, mu_home_forfeit, mu_visiting_forfeit from $matchups_table where mu_home_score is not null and mu_home_id = " . $row{team_id} . " order by mu_week_num;"; //$homepoints_query = "select mu_home_points, mu_home_score, mu_visiting_score from $matchups_table where mu_home_id = " . $row{team_id} . ";"; //print $homepoints_query; $result_homepoints = mysql_query($homepoints_query) or DIE("Could not Execute Query on table matchups"); while ($rowhomepoints = mysql_fetch_array($result_homepoints)) { $pointtotal = $pointtotal + $rowhomepoints{mu_home_points}; $goalsfor = $goalsfor + $rowhomepoints{mu_home_score}; $goalsagainst = $goalsagainst + $rowhomepoints{mu_visiting_score}; $goalsdiff = $goalsfor - $goalsagainst; if ($DEBUG) {print $row{team_id} . " home score - " . $rowhomepoints{mu_home_score} . "
";} ////////////home_points //wins, losses, ties, forfeits if (($rowhomepoints{mu_home_points} - $rowhomepoints{mu_visiting_points}) > 0){$wins = $wins +1;}elseif (($rowhomepoints{mu_home_points} - $rowhomepoints{mu_visiting_points}) == 0){ //print "its a tie
"; $ties = $ties +1;} elseif (($rowhomepoints{mu_home_points} - $rowhomepoints{mu_visiting_points}) < 0){$losses = $losses + 1;} //print $row{team_name} . ":week = ". $rowhomepoints{mu_week_num} . ", " . $wins . ", " . $losses . ", " . $ties . "
"; if ($rowhomepoints{mu_home_forfeit} > 0) {$lossesbyforfeit = $lossesbyforfeit + 1;} if ($rowhomepoints{mu_visiting_forfeit} > 0) {$winsbyforfeit = $winsbyforfeit + 1;} //////// } $visitingpoints_query = "select mu_week_num, mu_visiting_points, mu_home_points, mu_home_score, mu_visiting_score, mu_home_forfeit, mu_visiting_forfeit from $matchups_table where mu_visiting_score is not null and mu_visiting_id = " . $row{team_id} . " order by mu_week_num;"; //$visitingpoints_query = "select mu_visiting_points, mu_home_score, mu_visiting_score from $matchups_table where mu_visiting_id = " . $row{team_id} . ";"; //print $visitingpoints_query; $result_visitingpoints = mysql_query($visitingpoints_query) or DIE("Could not Execute Query on table matchups"); while ($rowvisitingpoints = mysql_fetch_array($result_visitingpoints)) { $pointtotal = $pointtotal + $rowvisitingpoints{mu_visiting_points}; $goalsfor = $goalsfor + $rowvisitingpoints{mu_visiting_score}; $goalsagainst = $goalsagainst + $rowvisitingpoints{mu_home_score}; $goalsdiff = $goalsfor - $goalsagainst; if ($DEBUG) {print $row{team_id} . " visiting score - " . $rowvisitingpoints{mu_visiting_score} . "
";} ////////////////Visiting //wins, losses, ties if (($rowvisitingpoints{mu_visiting_points} - $rowvisitingpoints{mu_home_points}) > 0){$wins = $wins +1;} elseif (($rowvisitingpoints{mu_visiting_points} - $rowvisitingpoints{mu_home_points}) == 0){ //print "its a tie
"; $ties = $ties +1;} elseif (($rowvisitingpoints{mu_visiting_points} - $rowvisitingpoints{mu_home_points}) < 0){$losses = $losses + 1;} if ($rowvisitingpoints{mu_home_forfeit} > 0) {$winsbyforfeit = $winsbyforfeit + 1;} if ($rowvisitingpoints{mu_visiting_forfeit} > 0) {$lossesbyforfeit = $lossesbyforfeit + 1;} //////// } ///////////////////////////////////////////////// $query_deductions = "SELECT team_id, points_deducted from $deductions_table where team_id = " . $row{team_id} . ";"; //print "game deductions query = " . $query_deductions . "
"; $result_deducts = mysql_query($query_deductions) or DIE("Could not Execute Query on table deductions"); ////////////////////////////////////////////// //populate deduction array //deductions while ($row_deducts = mysql_fetch_array($result_deducts)) { $pointtotal = $pointtotal - $row_deducts{points_deducted}; $totaldeducted = $totaldeducted + $row_deducts{points_deducted}; // $deduct_info[d_points_deducted][] = $row_deducts{points_deducted}; } $teamarray[] = array( "pointtotal" => $pointtotal, "name" => $row{team_name}, "GF" => $goalsfor, "GA"=>$goalsagainst, "GD" => $goalsdiff, "GW"=>$wins, "GL"=>$losses, "GT"=>$ties, "WF"=>$winsbyforfeit, "LF"=>$lossesbyforfeit, "PD"=>$totaldeducted); print ""; } // end of team info while loop array_multisort(array_map(function($element) { return $element[2]['pointtotal']; }, $teamarray), SORT_DESC, $teamarray); $teamarrayrev = array_reverse($teamarray); foreach ( $teamarrayrev as $teamvar ) { print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print ""; //print "\n", $teamvar['name'], "\t\t
points= ", $teamvar['pointtotal'], "\t\tGD= ", $teamvar['GD'], "\t\tGF= ",$teamvar['GF'], "\t\tGA= ", $teamvar['GA'], "\t\twins= ",$teamvar['GW'],"\t\tlosses= ", $teamvar['GL'],"\t\tties= ",$teamvar['GT'], "
"; } $x1 = $x; while ($x1 < $maxrows){ print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print ""; $x1 = $x1 + 1; } /* if ($x == 4){ print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print ""; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print ""; } */ } // end of result if print "
Division " . $div_info[divisions][$i] . "
Division " . $div_info[divisions][$i] . "
Team NamePointsGFGAGD
".$row{team_name}." " . $row{points}. "
" .$teamvar['name'] . " " . $teamvar['pointtotal'] . "" . $teamvar['GF'] . "" . $teamvar['GA'] . "" . $teamvar['GD'] . "" . $teamvar['GW'] . "" . $teamvar['GL'] . "" . $teamvar['GT'] . "" . $teamvar['WF'] . "" . $teamvar['LF'] . "" . $teamvar['PD'] . "
                     
         
         
\n"; } // end of open divisions for loop ?>
Click on the division name to link to division schedule.
GF = Goals For; GA = Goals Against; GD = Goal Differential; GW = Games Won; GL = Games Lossed; GT = Games Tied; FW = Forfeit Wins; FL = Forfeit Losses; PD = Points Deducted.