echo "<h2>" . _("All rounds") . "</h2>";
    $word_checkbox = build_checkbox_array($all_suggestions_w_freq, 'all');
    echo_checkbox_selects(count($all_suggestions_w_freq), 'all');
    echo_checkbox_form_submit($submit_label);
    printTableFrequencies($initialFreq, $cutoffOptions, $all_suggestions_w_freq, $instances--, array($all_suggestions_w_occurrences, $context_array), $word_checkbox);
    echo_checkbox_form_submit($submit_label);
}
// now per round
foreach ($rounds as $round) {
    // if there are no words for this round, skip it
    if (count($round_suggestions_w_occurrences[$round]) == 0) {
        continue;
    }
    foreach ($round_suggestions_w_occurrences[$round] as $word => $occur) {
        $encWord = encode_word($word);
        $context_array[$word] = recycle_window_link("show_good_word_suggestions_detail.php?projectid={$projectid}&amp;word={$encWord}", _("Context"), "context");
    }
    $round_suggestions_w_occurrences[$round]["[[TITLE]]"] = _("Times Suggested");
    $round_suggestions_w_occurrences[$round]["[[STYLE]]"] = "text-align: right;";
    $round_string = sprintf(_("Round %s"), $round);
    $page_num_string = sprintf(_("Number of pages with suggestions: %d"), $round_page_count[$round]);
    echo "<h2>{$round_string}</h2>";
    echo "<p>{$page_num_string}</p>";
    if (count($round_suggestions_w_freq[$round]) == 0) {
        echo "<p>" . _("None of the suggested words remain in the saved text for this round.") . "</p>";
        continue;
    }
    $word_checkbox = build_checkbox_array($round_suggestions_w_freq[$round], $round);
    echo_checkbox_selects(count($round_suggestions_w_freq[$round]), $round);
    echo_checkbox_form_submit($submit_label);
    printTableFrequencies($initialFreq, $cutoffOptions, $round_suggestions_w_freq[$round], $instances--, array($round_suggestions_w_occurrences[$round], $context_array), $word_checkbox);
// deployed on the site
// build a list of user column names for the select statement
// this avoids "select *" which unnecessarily pulls in the large
// text fields
$roundColumns = array();
foreach ($Round_for_round_id_ as $round) {
    $roundColumns[] = $round->user_column_name;
    $roundColumns[] = $round->time_column_name;
}
$roundColumns = implode(", ", $roundColumns);
// cycle through all pages, creating rows as we go
$res = mysql_query("SELECT image, state, {$roundColumns} FROM {$projectid} ORDER BY image ASC") or die(mysql_error());
while ($result = mysql_fetch_assoc($res)) {
    $page = $result["image"];
    echo "<tr>";
    echo "<td>" . recycle_window_link("displayimage.php?project={$projectid}&amp;imagefile={$page}", $page, "pageView") . "</td>";
    echo "<td>" . $result["state"] . "</td>";
    // get the current round for the page
    $currentRound = get_Round_for_page_state($result["state"]);
    // foreach round print out the available info
    foreach ($Round_for_round_id_ as $round) {
        $roundID = $round->id;
        // the ' + 0' forces timesChecked to be numeric
        $timesChecked = @$wordcheck_usage[$page][$roundID] + 0;
        $lastProofer = $result[$round->user_column_name];
        $timeProofed = $result[$round->time_column_name];
        // determine if the page has been marked 'Done' in $round.
        // If one of the following is true, it's done:
        // * $round is prior to the page's current round, or
        // * $round is the page's current round and the page is in that round's done state.
        $pageIsDoneInRound = $currentRound->round_number > $round->round_number || $round->page_save_state == $result["state"];