// 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"];
        if (!empty($lastProofer)) {
            $lastProoferLink = private_message_link($lastProofer);
        }
Ejemplo n.º 2
0
        if (!count($_FILES)) {
            show_image_update_form($projectid, $image);
            $show_resolution_form = FALSE;
        } else {
            update_image($projectid, $image);
        }
    }
    if ($show_resolution_form) {
        show_resolution_form($projectid, $image, $state, $prev_round_num, $is_a_bad_page, $b_User, $b_Code);
    }
} else {
    //Get variables passed from form
    $state = get_enumerated_param($_POST, 'state', null, $PAGE_STATES_IN_ORDER);
    //If the PM fixed the problem or stated the report was invalid update the database to reflect
    if ($resolution == "fixed" || $resolution == "invalid") {
        $round = get_Round_for_page_state($state);
        Page_eraseBadMark($projectid, $image, $round, $pguser);
    }
    //Redirect the user back to the project detail page.
    header("Location: {$code_url}/tools/project_manager/page_detail.php?project={$projectid}");
}
#----------------------------------------------------------------------------
function show_resolution_form($projectid, $image, $state, $prev_round_num, $is_a_bad_page, $b_user, $b_code)
{
    global $code_url, $PAGE_BADNESS_REASONS;
    if ($is_a_bad_page) {
        echo "<h2>" . _("Resolve bad page") . "</h2>";
        echo "<p>" . _("This page has been marked bad by the following user.") . "</p>";
        echo "<p>";
        if (!empty($b_user)) {
            $contact_url = get_url_to_compose_message_to_user($b_user);