Exemplo n.º 1
0
echo "<td width='23%' align='center'><b><a href='mbr_list.php?" . $uname . "mstart={$mstart}&order=date_created&direction={$newdirection}'>" . sprintf(_("Date Joined %s"), $site_abbreviation) . "</a></b></td>";
echo "<td width='23%' align='center'><b>" . _("Options") . "</b></td>";
echo "</tr>";
if (!empty($mRows)) {
    $i = 0;
    while ($row = mysql_fetch_assoc($mResult)) {
        if ($i % 2 == 0) {
            echo "<tr bgcolor='" . $theme['color_mainbody_bg'] . "'>";
        } else {
            echo "<tr bgcolor='" . $theme['color_navbar_bg'] . "'>";
        }
        if (can_reveal_details_about($row['username'], $row['u_privacy'])) {
            echo "<td width='5%' align='center'><b>" . $row['u_id'] . "</b></td>";
            echo "<td width='25%'>" . $row['username'] . "</td>";
            echo "<td width='22%' align='center'>" . date("m/d/Y", $row['date_created']) . "</td>";
            $contact_url = get_url_to_compose_message_to_user($row['username']);
            echo "<td width='23%' align='center'><b><a href='mdetail.php?id=" . $row['u_id'] . "'>" . _("Statistics") . "</a>&nbsp;|&nbsp;<a href='{$contact_url}'>" . _("PM") . "</a></b></td>\n";
        } else {
            // Print Anonymous Info
            echo "<td width='5%' align='center'><b>---</b></td>";
            echo "<td width='25%'>" . _("Anonymous") . "</td>";
            echo "<td width='22%' align='center'>---</td>";
            echo "<td width='23%' align='center'>" . _("None") . "</td>";
        }
        echo "</tr>";
        $i++;
    }
} else {
    echo "<tr bgcolor='" . $theme['color_mainbody_bg'] . "'><td colspan='6' align='center'><b>" . _("No more members available.") . "</b></td></tr>";
}
echo "<tr bgcolor='" . $theme['color_mainbody_bg'] . "'><td colspan='3' align='left'>";
$strmsg = sprintf(_("%s Mentor pages"), $mentoring_round->id);
echo "<h2>{$strmsg}</h2>";
$tbl->SetRows($page_rows);
$filter_proofer = null;
$filter_project = null;
$i = 0;
foreach ($proofers as $username => $proofer) {
    $filter_proofer = $username;
    $filter_project = null;
    $allcount = $proofer['total_count'];
    $pagecount = $proofer['proofer_page_count'];
    $mentoringcount = $proofer['mentoring_count'];
    $yourcount = $proofer['your_count'];
    $uid = $proofer['uid'];
    $privmsg = _("PM");
    $send_pm_url = get_url_to_compose_message_to_user($username);
    echo "\n<hr>\n";
    $proofer_link = "<a href=\"{$code_url}/stats/members/mdetail.php?id={$uid}\" target=\"_blank\">{$username}</a>\n    [ <a href='{$send_pm_url}' target='_blank'>{$privmsg}</a> ]\n";
    $pgs_to_mentor = _("Pages to mentor");
    $being_mentored = _("being mentored");
    $by_you = _("by you");
    $pages_total = _("Pages Total");
    echo "<h3>{$proofer_link} - {$pgs_to_mentor}: {$pagecount} \n          {$being_mentored}: {$mentoringcount}  {$by_you}\n          {$yourcount} ({$proofer_round_id} {$pages_total}: {$allcount})</h3>\n";
    $projects =& $proofer['projects'];
    foreach ($projects as $proj => $info) {
        $title = $info['title'];
        $project_link = _project_link($proj, $title);
        $project_page_count = $info['project_page_count'];
        $mentoring_project_count = $info['mentoring_project_count'];
        $your_project_count = $info['your_project_count'];
        $filter_project = $proj;
Exemplo n.º 3
0
function do_smooth_reading()
{
    global $project, $code_url, $pguser, $date_format;
    if ($project->state != PROJ_POST_FIRST_CHECKED_OUT) {
        return;
    }
    $projectid = $project->projectid;
    $current_user_can_manage_SR_for_this_project = $project->PPer_is_current_user || user_is_a_sitemanager();
    // i.e., can:
    // -- make the project available for SR (initially or again),
    // -- replace the SR-able text,
    // -- see SR-commitments, and
    // -- read SR'ed texts
    echo "<h4>", _('Smooth Reading'), "</h4>";
    echo "<ul>";
    if ($project->smoothread_deadline == 0) {
        echo "<li>";
        echo _('This project has not been made available for Smooth Reading.');
        echo "</li>";
        if ($current_user_can_manage_SR_for_this_project) {
            echo "<li>";
            echo _("But you can make it available.");
            echo _('Choose how long you want to make it available for.');
            $link_start = "<a href='{$code_url}/tools/upload_text.php?project={$projectid}&stage=smooth_avail&weeks";
            echo "<ul>";
            echo "<li>{$link_start}=1'>" . _("one week") . "</a>";
            echo "<li>{$link_start}=2'>" . _("two weeks") . "</a>";
            echo "<li>{$link_start}=4'>" . _("four weeks") . "</a>";
            echo "</ul>";
            echo "</li>\n";
        }
    } else {
        // Project has been made available for SR
        if (time() < $project->smoothread_deadline) {
            $sr_deadline_str = strftime($date_format, $project->smoothread_deadline);
            $sr_sentence = sprintf(_('This project has been made available for Smooth Reading until %s.'), "<b>{$sr_deadline_str}</b>");
            echo "<li>";
            echo $sr_sentence;
            echo "</li>\n";
            if ($current_user_can_manage_SR_for_this_project) {
                echo "<li>";
                echo "<a href='{$code_url}/tools/upload_text.php?project={$projectid}&stage=smooth_avail&weeks=replace'>";
                echo _("Replace the currently available Smooth Reading file.");
                echo "</a>";
                echo "</li>";
            }
            if (!$project->PPer_is_current_user) {
                echo_download_zip(_("Download zipped text for Smooth Reading"), '_smooth_avail');
                // We don't allow guests to upload the results of smooth-reading.
                global $user_is_logged_in;
                if ($user_is_logged_in) {
                    echo "<li>";
                    echo "<a href='{$code_url}/tools/upload_text.php?project={$projectid}&stage=smooth_done'>";
                    echo _("Upload a smooth-read text");
                    echo "</a>";
                    echo "</li>\n";
                    // The upload does not cause the project to change state --
                    // it's still checked out to PPer.
                    if (!sr_user_is_committed($projectid, $pguser)) {
                        echo "<li>";
                        echo _('You can volunteer to smoothread this project for the PPer by pressing:');
                        sr_echo_commitment_form($projectid);
                        echo "</li>\n";
                    } else {
                        echo "<li>";
                        echo _('You have volunteered to smoothread this project.');
                        echo "<br />";
                        echo _('If you wish to withdraw from smoothreading it, please press:');
                        sr_echo_withdrawal_form($projectid);
                        echo "</li>";
                    }
                } else {
                    echo "<li>";
                    echo _('Please note that while unregistered guests are welcome to download texts for Smooth Reading, only registered volunteers are able to upload annotated texts.');
                    echo "\n";
                    echo _('A registration link is available at the top of this page.');
                    echo "</li>\n";
                }
            }
        } else {
            echo "<li>";
            echo _('The Smooth Reading deadline for this project has passed.');
            echo "</li>";
            if ($current_user_can_manage_SR_for_this_project) {
                echo "<li>";
                echo _("But you can make it available for Smooth Reading for an additional period.") . " ";
                echo _('Choose how long you want to make it available for.');
                $link_start = "<a href='{$code_url}/tools/upload_text.php?project={$projectid}&stage=smooth_avail&weeks";
                echo "<ul>";
                echo "<li>{$link_start}=1'>" . _("one week") . "</a>";
                echo "<li>{$link_start}=2'>" . _("two weeks") . "</a>";
                echo "<li>{$link_start}=4'>" . _("four weeks") . "</a>";
                echo "</ul>";
                echo "</li>\n";
            }
        }
        if ($current_user_can_manage_SR_for_this_project) {
            $sr_list = sr_get_committed_users($projectid);
            echo "<li>";
            if (count($sr_list) == 0) {
                echo _('No one has volunteered to smoothread this project.');
            } else {
                echo _('The following users have volunteered to smoothread this project:');
                echo "<ul>";
                foreach ($sr_list as $sr_user) {
                    $user_privmsg_url = get_url_to_compose_message_to_user($sr_user);
                    echo "<li>";
                    echo "<a href={$user_privmsg_url}>{$sr_user}</a>";
                    echo "</li>\n";
                }
                echo "</ul>\n";
            }
            echo "</li>\n";
            echo "<li>";
            echo_uploaded_zips('_smooth_done_', _('smoothread'));
            echo "</li>";
        }
    }
    echo "</ul>\n";
}
Exemplo n.º 4
0
 // Total Pages
 echo "<td align=\"center\">{$project->n_pages}</td>\n";
 // PM
 echo "<td align=\"center\">";
 if ($project->username != '') {
     $contact_url = get_url_to_compose_message_to_user($project->username);
     print "<a href='{$contact_url}'>{$project->username}</a>";
 }
 echo "</td>\n";
 // Checked Out By
 echo "<td align=\"center\">";
 if ($project->checkedoutby != "") {
     // Maybe we should get this info via a
     // left outer join in the big select query.
     // (Actually, I tried it in a few cases and the left outer join was always slower.)
     $contact_url = get_url_to_compose_message_to_user($project->checkedoutby);
     print "<a href='{$contact_url}'>{$project->checkedoutby}</a>";
 }
 echo "</td>\n";
 // Project Status
 echo "<td valign='middle'>\n";
 echo_project_state_changer($project);
 echo "</td>\n";
 // Options
 if ($show_options_column) {
     echo "<td align=center>";
     if (user_is_a_sitemanager() || user_is_proj_facilitator() || $project->username == $pguser) {
         echo _("Edit") . ":";
         echo " ";
         echo "<a href=\"editproject.php?action=edit&project={$projectid}\">" . _("Info") . "</a>";
         echo " | ";
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);
            $contact_url = attr_safe($contact_url);
            echo "<b>" . _("User") . ":</b> {$b_user} " . "(<a href='{$contact_url}'>" . _("Private Message") . "</a>)<br>";
        }
        if (!empty($b_code)) {
            echo "<b>" . _("Reason") . ":</b> {$PAGE_BADNESS_REASONS[$b_code]}</br>";
        }
        echo "</p>";
    }
    echo "<p>" . _("From here you can") . ":</p>";
    echo "<ul>";
    echo "<li><a href='handle_bad_page.php?projectid={$projectid}&image={$image}&modify=text'>" . _("Update page text from previous round") . "</a></li>";
    echo "<li><a href='handle_bad_page.php?projectid={$projectid}&image={$image}&modify=image'>" . _("Update page image") . "</a></li>";
    if ($is_a_bad_page) {
        echo "<li>" . _("Mark page as") . ":";
        echo "<form action='handle_bad_page.php' method='post'>";
        echo "<input type='hidden' name='projectid' value='{$projectid}'>";
        echo "<input type='hidden' name='image' value='{$image}'>";
        echo "<input type='hidden' name='state' value='{$state}'>";
        echo "<input name='resolution' value='fixed' type='radio'> " . _("Fixed") . "<br>";
        echo "<input name='resolution' value='invalid' type='radio'> " . _("Invalid Report") . "<br>";
        echo "<input name='resolution' value='unfixed' checked type='radio'> " . _("Not Fixed") . "<br>";
        echo "<input type='submit' value='" . attr_safe(_("Submit")) . "'>";
        echo "</li>";
    } else {
        echo "<li><a href='{$code_url}/tools/project_manager/page_detail.php?project={$projectid}'>" . "Return to page detail" . "</a></li>";
    }
    echo "</ul>";
}