// 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"];
     if (!empty($lastProofer)) {
         $lastProoferLink = private_message_link($lastProofer);
     }
     $class = $data = "";
     // if there is no proofreader's name, the round was likely skipped
     // or the page has never been worked on
     if (empty($lastProofer)) {
         // placeholder
     } elseif ($pageIsDoneInRound && $timesChecked > 0) {
         $class = "class='WC'";
         $data = "{$timesChecked}: {$lastProoferLink}";
     } elseif ($pageIsDoneInRound && $timesChecked == 0 && $timeProofed < @$t_wordcheck_start) {
         $class = "class='preWC'";
         $data = $lastProoferLink;
     } elseif ($pageIsDoneInRound && $timesChecked == 0) {
         $class = "class='noWC'";
         $data = "{$timesChecked}: {$lastProoferLink}";
    }
    echo "</a>";
    echo "</p>";
    foreach ($word_suggestions as $suggestion) {
        list($time, $round, $page, $proofer, $words) = $suggestion;
        // get a context string
        list($context_strings, $totalLines) = _get_word_context_on_page($projectid, $page, $round, $word);
        # If the word was suggested on a page, but then changed before
        # being saved, let the PM know about it.
        if (!count($context_strings)) {
            echo "<p>" . sprintf(_('The word was suggested in round %1$s for page %2$s, but no longer exists in the saved text for that round.'), $round, $page) . "</p>";
            continue;
        }
        echo "<p><b>" . _("Date") . "</b>: " . strftime($datetime_format, $time) . "<br>";
        echo "<b>" . _("Round") . "</b>: {$round} &nbsp; | &nbsp; ";
        echo "<b>" . _("Proofreader") . "</b>: " . private_message_link($proofer) . "<br>";
        echo "<b>" . _("Page") . "</b>: <a href='displayimage.php?project={$projectid}&amp;imagefile={$page}&amp;showreturnlink=0' target='imageframe'>{$page}</a><br>";
        foreach ($context_strings as $lineNum => $context_string) {
            $context_string = _highlight_word(html_safe($context_string, ENT_NOQUOTES), $word);
            echo "<b>" . _("Line") . "</b>: ", sprintf(_('~%1$d of %2$d'), $lineNum, $totalLines), " &nbsp; | &nbsp; ";
            echo "<b>" . _("Context") . "</b>:<br><span class='mono'>{$context_string}</span><br>";
        }
        echo "</p>";
        echo "<hr>";
    }
    exit;
}
if ($frame == "right") {
    slim_header(_("Image Frame"));
    echo "<p>" . _("Select one of the page links to view the page image (scan).") . "</p>";
    exit;
Esempio n. 3
0
function private_message_link_for_uid($u_id)
{
    $username = get_username_for_uid($u_id);
    $link = private_message_link($username, NULL);
    return $link;
}