Esempio n. 1
0
$tournamentKey = $_GET['tournament'];
if (!isset($result)) {
    die("The requested result (scores/chits/pool) was not included in the URL");
}
if ($tournamentKey) {
    $t = GetTournament($connection, $tournamentKey);
    if (isset($t)) {
        $td = GetTournamentDetails($connection, $tournamentKey);
        switch ($result) {
            case 'scores':
                ShowResultsHeader($connection, $t, 'Scores', '');
                if (isset($td->ScoresFile) && !empty($td->ScoresFile)) {
                    ShowFile($web_site, $td->ScoresFile);
                } else {
                    if ($t->MatchPlay) {
                        ShowMatchResults($connection, $t->TournamentKey);
                    } else {
                        $scoresResults = GetScoresResults($connection, $tournamentKey, $t->Stableford);
                        ShowScoresResults($scoresResults, $t->Stableford, $t->StartDate !== $t->EndDate);
                    }
                }
                break;
            case 'chits':
                ShowResultsHeader($connection, $t, 'Chits', '');
                if (isset($td->ChitsFile) && !empty($td->ChitsFile)) {
                    ShowFile($web_site, $td->ChitsFile);
                } else {
                    $chitsResults = GetChitsResults($connection, $tournamentKey);
                    ShowChitsResults($chitsResults, $t->MatchPlay);
                }
                break;
Esempio n. 2
0
                    echo '<td style="border:none"><a href="' . $script_folder_href . 'signups.php?tournament=' . $currentTournaments[$i]->TournamentKey . '">View Signups</a></td>';
                } else {
                    if ($details->TeeTimesPostedDate != TournamentDetails::EMPTYDATE) {
                        $friendlyDate = date('M d', strtotime($details->TeeTimesPostedDate));
                        echo '<td style="border:none"><a href="' . $script_folder_href . 'tee_times.php?tournament=' . $currentTournaments[$i]->TournamentKey . '">Tee Times</a> (<span style="font-size:small;">posted ' . $friendlyDate . '</span>)</td>';
                        echo '<td style="border:none"><a href="' . $script_folder_href . 'contact_chairman.php?tournament=' . $currentTournaments[$i]->TournamentKey . '">Tournament Director</a></td>';
                    } else {
                        echo '<td style="border:none">Tee Times (<span style="font-size:small;">pending</span>)</td>';
                        echo '<td style="border:none"><a href="' . $script_folder_href . 'contact_chairman.php?tournament=' . $currentTournaments[$i]->TournamentKey . '">Tournament Director</a></td>';
                    }
                }
            }
            echo '</tr>' . PHP_EOL;
            if ($currentTournaments[$i]->MatchPlay == 1) {
                echo '<tr><td style="border:none" colspan="6">' . PHP_EOL;
                ShowMatchResults($connection, $currentTournaments[$i]->TournamentKey);
                echo '</td></tr>' . PHP_EOL;
            }
        }
    }
    echo '</table>' . PHP_EOL;
}
ShowRecentlyCompletedTournaments($connection, $script_folder_href);
$connection->close();
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>
		<h2 id="post-<?php 
        the_ID();
        ?>