0){ $person = $content[1]; $requests[$number] = $person; } } } /* print "
";
print_r($requests);
print "
"; */ // Get Game Results // Open File for Grid and show winngers $parse_file = $file_path . "_grid.txt"; $handle = @fopen($parse_file, "r"); $replace = array(" ", "'"); if ($handle) { while (!feof($handle)) { $content = fgetcsv($handle, 4096); $number = $content[0]; $person = $content[1]; $winners_array[$number] = $person; if (!in_array($person, $people)){ $people[] = $person; } } } // Open File and Start the Parse Job. $parse_file = $file_path . "_results.txt"; $handle = @fopen($parse_file, "r"); $replace = array(" ", "'"); if ($handle) { while (!feof($handle)) { $line++; $content = fgetcsv($handle, 4096); // list($date,$away,$away_score,$home,$home_score) = explode(",", $content); $date = trim($content[0]); $winnings = trim($content[1]); $away = trim($content[2]); $away_score = trim($content[3]); $home = trim($content[4]); $home_score = trim($content[5]); $away_final = substr($away_score, -1); $home_final = substr($home_score, -1); if (strpos($away, 'Reverse') !== false) { 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; } } 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 = $file_path . "_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]; // 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
"; // $grid .= "
$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"; } // Request Square if ($person == "Available"){ if (array_key_exists($number, $requests)){ $person = "Hold: " . $requests[$number] . ""; } else { $person = "Request"; // $person = "Available"; $remaining++; } } // 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
"; // $gridtop .= "
$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,$combined); } } // 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 "); } // How many buckets remain if ($remaining > 0){ $remaining_display = "

Only $remaining buckets remain.

"; } else { $remaining_display = "

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

"; } /* // 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.

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

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

$remaining_display

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.

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

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

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

2018 Edition

2017 Edition

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