Example #1
0
function ShowResultsHeader($connection, $tournament, $result, $script_folder_href)
{
    $year = date('Y', strtotime($tournament->StartDate));
    $friendlyDate = GetFriendlyTournamentDates($tournament);
    echo '<h2 style="text-align:center">' . $tournament->Name . '</h2>' . PHP_EOL;
    echo '<h4 style="text-align:center">' . $friendlyDate . ', ' . $year . '</h4>' . PHP_EOL;
    echo '<h3 style="text-align:center"><i>' . $result . '</i></h3><br>' . PHP_EOL;
    echo '<table style="border:none;margin-left:auto;margin-right:auto"><tbody>' . PHP_EOL;
    echo '<tr style="background-color:white;">';
    ShowTournamentResultsLinks($connection, $tournament, 'style="border:none"', $result, $script_folder_href);
    echo '</tr>' . PHP_EOL;
    echo '</tbody></table>' . PHP_EOL;
}
function ShowTournamentResults($connection, $tournament, $style, $abbreviated, $script_folder_href, $showAnnouncements)
{
    echo '<td ' . $style . '>' . GetFriendlyTournamentDates($tournament) . '</td>';
    if ($tournament->AnnouncementOnly) {
        if ($showAnnouncements) {
            echo '<td colspan="6" style="text-align:center" ' . $style . '> ------ ' . $tournament->Name . ' ------ </td>';
        }
        return;
    }
    echo '<td ' . $style . '>' . $tournament->Name . '</td>';
    if (!$abbreviated) {
        if ($tournament->TournamentDescriptionKey > 0) {
            echo '<td ' . $style . '><a href="' . $script_folder_href . 'tournament_description.php?tournament=' . $tournament->TournamentKey . '">Description</a></td>';
        } else {
            echo '<td ' . $style . '> Description </td>';
        }
    }
    ShowTournamentResultsLinks($connection, $tournament, $style, '', $script_folder_href);
}