Ejemplo n.º 1
0
function ShowRecentlyCompletedTournaments($connection, $script_folder_href)
{
    $currentTournaments = GetRecentlyCompletedTournaments($connection);
    if (isset($currentTournaments) && count($currentTournaments) > 0) {
        echo '<h2>Recent Tournaments:</h2>';
        echo '<table style="border:none;margin-left:30px;"><tbody>' . PHP_EOL;
        for ($i = 0; $i < count($currentTournaments); ++$i) {
            echo '<tr style="background-color:white;font-size:large;">';
            ShowTournamentResults($connection, $currentTournaments[$i], 'style="border:none"', true, $script_folder_href, false);
            echo '</tr>' . PHP_EOL;
        }
        echo '</tbody></table>' . PHP_EOL;
    }
}
Ejemplo n.º 2
0
echo ' <div id="content-container" class="entry-content">';
echo '    <div id="content" role="main">';
$connection = new mysqli('p:' . $db_hostname, $db_username, $db_password, $db_database);
$tournaments = GetTournaments($connection, $year);
echo '<h2 style="text-align:center">' . $year . ' Tournament Schedule</h2><br>';
echo '<table style="border:none;margin-left:auto;margin-right:auto">' . PHP_EOL;
echo '<thead><tr class="header">';
echo '<th>Date</th>';
echo '<th>Name</th>';
echo '<th>Description</th>';
echo '<th>Scores</th>';
echo '<th>Chits</th>';
echo '<th>Pool</th>';
echo '<th>Closest to Pin</th>';
echo '</tr></thead>' . PHP_EOL;
echo '<tbody>' . PHP_EOL;
for ($i = 0; $i < count($tournaments); ++$i) {
    if ($i % 2 == 0) {
        echo '<tr class="d1">';
    } else {
        echo '<tr class="d0">';
    }
    ShowTournamentResults($connection, $tournaments[$i], '', false, '', true);
    echo '</tr>' . PHP_EOL;
}
echo '</tbody></table>' . PHP_EOL;
echo '    </div><!-- #content -->';
echo ' </div><!-- #content-container -->';
$connection->close();
get_sidebar();
get_footer();