$home"; $home_score = "$home_score"; $winner = "$home_final-$away_final"; $find_winner = $home_final . $away_final; } else if ($home_score > $away_score){ $away = "$away"; $away_score = "$away_score"; $winner = "$away_final-$home_final"; $find_winner = $away_final . $home_final; } } else { if ($home_score > $away_score){ $home = "$home"; $home_score = "$home_score"; $winner = "$home_final-$away_final"; $find_winner = $home_final . $away_final; } else if ($home_score < $away_score){ $away = "$away"; $away_score = "$away_score"; $winner = "$away_final-$home_final"; $find_winner = $away_final . $home_final; } } // if ($find_winner){ $winning_person = $winners_array[$find_winner]; // Find person and then add their values to totals array $find_person = array_search($winning_person,$people); $totals[$find_person] = $totals[$find_person] + $winnings; $winningscore[$find_winner] = $winningscore[$find_winner] + $winnings; } $results .= (" $date $$winnings $winner $winning_person
$away
$home
$away_score
$home_score
"); unset($winner,$winning_person,$find_winner); } } // Reopen File for Grid and see if we can build the grid $start = 1; $gridtop .= "
 
"; $parse_file = $_SERVER['DOCUMENT_ROOT'] . "/2017/_grid.txt"; $handle = @fopen($parse_file, "r"); $replace = array(" ", "'"); if ($handle) { while (!feof($handle)) { $content = fgetcsv($handle, 4096); $number = $content[0]; $person = $content[1]; $class = $content[2]; if ($person == "Available"){ $person = "$person"; } // This Count Drives a bunch of formating $count++; // Build the Start of the row if ($count == 1){ $gridside_number = substr($number, -1); $grid .= "
L$gridside_number
"; } // Haven't paid? Throw a class if ($class){ $extra_class = $class; } // Let's see if we can show money in the squares if (array_key_exists($number, $winningscore)){ $win = $winningscore[$number]; $win_display = "
$$win
"; $win_wrap = "winner"; } // Build the primary grid $grid .= ("
$win_display$person
"); // Builds the header bar if ($start == 1){ $gridtop_number = substr($number, 0, 1); $gridtop .= "
W$gridtop_number
"; if ($count == 10){ unset($start);} } // Force that line break if ($count == 10){ $grid .= "
 
"; unset($count); } // Unset some values; unset($extra_class,$win_display,$win_wrap); } } // Break for the Gridbar $gridtop .= "
 
"; // Now sort array from most to least arsort($totals); foreach ($totals as $key => $total){ $display_person = $people[$key]; $leaderboard .= (" $$total $display_person "); } /* // Extra text

$25 a square, Paypal me at aidanshealy@gmail.com

Once pool is full, we will draw numbers, just like the Super Bowl pool, top row and side column.

*/ print <<< CONTENT Make Dem Buckets
Thanks everyone for another awesome year of buckets. I will start paying everyone out tomorrow.
$gridtop $grid

Welcome to the 2017 NCAA Bucket Challenge. With 68 chances to win money, this is by far my favorite format for the tourney.

Pool is filled, numbers are drawn. Enjoy the tourney.

The top row will represent the Winning teams last digit in score, and the left column will represent the Losing teams last digit in score. (Example, Syracuse 75, Villanova 77), go over to the 7, down to the 5. Winner winner chicken dinner.

Each square is $25.

Will payout at the end of the tourney. I used to pay out every round, but that is quite the PITA.

 
Leaderboard $leaderboard
Results $results
Here is the payouts:
Legend
Winners
People who have not paid.
Send me money to aidanshealy@gmail.com
 
CONTENT; ?>