function show_user_wap($user) { wap_begin(); if (!$user) { echo "<br/>User not found!<br/>"; wap_end(); return; } // keep a 'running tab' in wapstr in case exceeds 1K WAP limit $wapstr = PROJECT . "<br/>Account Data<br/>for {$user->name}<br/>Time: " . wap_timestamp(); $wapstr .= show_credit_wap($user); if ($user->teamid) { $team = BoincTeam::lookup_id($user->teamid); $wapstr .= "<br/>Team: {$team->name}<br/>"; $wapstr .= "Team TotCred: " . format_credit($team->total_credit) . "<br/>"; $wapstr .= "Team AvgCred: " . format_credit($team->expavg_credit) . "<br/>"; } else { $wapstr .= "<br/>Team: None<br/>"; } // don't want to send more than 1KB probably? if (strlen($wapstr) > 1024) { echo substr($wapstr, 0, 1024); } else { echo $wapstr; } wap_end(); }
function show_user_wap($userid) { wap_begin(); $user = BoincUser::lookup_id($userid); if (!$user) { echo "<br/>" . tra("User not found!") . "<br/>"; wap_end(); return; } if ($user->teamid) { $team = BoincTeam::lookup_id($user->teamid); } $wapstr = PROJECT . "<br/>" . tra("Account Data<br/>for %1<br/>Time:", $user->name) . " " . wap_timestamp(); $wapstr .= show_credit_wap($user); if ($user->teamid && $team) { $wapstr .= "<br/>" . tra("Team:") . " " . $team->name . "<br/>"; $wapstr .= tra("Team TotCred:") . " " . format_credit($team->total_credit) . "<br/>"; $wapstr .= tra("Team AvgCred:") . " " . format_credit($team->expavg_credit) . "<br/>"; } else { $wapstr .= "<br/>" . tra("Team: None") . "<br/>"; } // don't want to send more than 1KB (WAP limit) // if (strlen($wapstr) > 1024) { $wapstr = substr($wapstr, 0, 1024); } echo $wapstr; wap_end(); }
function show_user($user) { echo "\n <tr class=row1>\n <td>", user_links($user), " (ID {$user->id})</td>\n "; if ($user->teamid) { $team = BoincTeam::lookup_id($user->teamid); echo "\n <td> <a href=team_display.php?teamid={$team->id}>{$team->name}</a> </td>\n "; } else { echo "<td><br></td>"; } echo "\n <td align=right>", format_credit($user->expavg_credit), "</td>\n <td align=right>", format_credit_large($user->total_credit), "</td>\n <td>", $user->country, "</td>\n <td>", time_str($user->create_time), "</td>\n </tr>\n "; }
function show_list($list) { start_table(); echo "\n <tr>\n <th>" . tra("Team name") . "</th>\n <th>" . tra("Description") . "</th>\n <th>" . tra("Average credit") . "</th>\n <th>" . tra("Type") . "</th>\n <th>" . tra("Country") . "</th>\n </tr>\n "; $i = 0; foreach ($list as $team) { $type = team_type_name($team->type); $j = $i++ % 2; echo "<tr class=row{$j}>\n <td><a href=team_display.php?teamid={$team->id}>{$team->name}</a></td>\n <td><span class=note>" . sanitize_html($team->description) . "</span></td>\n <td>" . format_credit($team->expavg_credit) . "</td>\n <td>{$type}</td>\n <td>{$team->country}</td>\n </tr>\n "; } echo "</table>"; }
function show_list($list) { start_table(); echo "<tr>\n\t\t<th>Team name</th>\n\t\t<th>Description</th>\n\t\t<th>Average credit</th>\n\t\t<th>Type</th>\n\t\t<th>Country</th>\n\t\t</tr>"; $i = 0; foreach ($list as $team) { $type = team_type_name($team->type); $j = $i++ % 2; echo '<tr class="row$j"> <td><a href="team_display.php?teamid=$team->id">$team->name</a></td> <td><span class="note">' . sanitize_html($team->description) . '</span></td> <td>' . format_credit($team->expavg_credit) . '</td> <td>$type</td> <td>$team->country</td> </tr> '; } echo "</table>"; }
echo "<p>\n <form method=\"post\" action=\"team_founder_transfer_action.php\">\n <input type=\"hidden\" name=\"action\" value=\"decline\">\n <input type=\"hidden\" name=\"teamid\" value=\"" . $team->id . "\">\n <input type=\"submit\" value=\"" . tra("decline request") . "\">\n </form>\n <p>\n " . tra("If you don't decline the request by %1, %2 will have the option of assuming team foundership.<br /><br />\n To accept the request, assign foundership to %3 using the form below.", $x, $ping_user->name, $ping_user->name) . "\n </p>\n <hr>\n <p>\n "; } } else { echo tra("No transfer request is pending.") . "<br /><br />"; } echo tra("To assign foundership of this team to another member, check the box next to member name and click <strong>Change founder</strong> below.") . "<form method=post action=team_change_founder_action.php>\n <input type=hidden name=teamid value={$team->id}>"; echo form_tokens($user->authenticator); start_table(); echo "<tr>\n <th>" . tra("New founder?") . "</th>\n <th>" . tra("Name") . "</th>\n <th>" . tra("Total credit") . "</th>\n <th>" . tra("Recent average credit") . "</th>\n </tr>\n"; $users = BoincUser::enum("teamid={$team->id}"); $navailable_users = 0; foreach ($users as $user) { if ($user->id != $team->userid) { //don't show current founder $user_total_credit = format_credit($user->total_credit); $user_expavg_credit = format_credit($user->expavg_credit); $selected = $user->id == $team->ping_user ? "selected" : ""; echo ' <tr> <td align="center"><input type="radio" name="userid" value="' . $user->id . '"> <td>' . $user->name . '</td> <td align=right>' . $user_total_credit . '</td> <td align=right>' . $user_expavg_credit . '</td> </tr> '; $navailable_users++; } } if ($navailable_users > 0) { echo "<input type=hidden name=navailable_users value={$navailable_users}>"; end_table();
echo " <workunitid>" . $result->workunitid . "</workunitid>\n"; echo " <hostid>" . $result->hostid . "</hostid>\n"; echo " <claimed_credit>" . $result->claimed_credit . "</claimed_credit>\n"; echo " <received_time>" . $result->received_time . "</received_time>\n"; echo "</result>\n"; $sum += $result->claimed_credit; } echo "<total_claimed_credit>" . $sum . "</total_claimed_credit>\n"; echo "</pending_credit>\n"; } else { $user = get_logged_in_user(); $sum = 0; page_head(tra("Pending credit")); start_table(); echo "<tr><th>" . tra("Result ID") . "</th><th>" . tra("Workunit ID") . "</th><th>" . tra("Host ID") . "</th><th>" . tra("Claimed credit") . "</th></tr>\n"; $results = BoincResult::enum("userid={$user->id} AND (validate_state=0 OR validate_state=4) AND claimed_credit > 0"); foreach ($results as $result) { echo "<tr>\n"; echo "<td><a href=\"result.php?resultid={$result->id}\">{$result->id}</a></td>\n"; echo "<td><a href=\"workunit.php?wuid={$result->workunitid}\">{$result->workunitid}</a></td>\n"; echo "<td><a href=\"show_host_detail.php?hostid={$result->hostid}\">{$result->hostid}</a></td>\n"; echo "<td>" . format_credit($result->claimed_credit) . "</td>\n"; echo "</tr>\n"; $sum += $result->claimed_credit; } end_table(); echo tra("Pending credit: %1", format_credit($sum)); page_tail(); } $cvs_version_tracker[] = "\$Id\$"; //Generated automatically - do not edit
if (profile_screening()) { $query = "select * from profile, user where profile.userid=user.id " . " and has_picture>0 " . " and verification=0 " . " limit 20"; } else { $query = "select * from profile, user where profile.userid=user.id " . " and has_picture>0 " . " and verification=0 " . " and uotd_time is null " . " and expavg_credit>1 " . " and (response1 <> '' or response2 <> '') " . " order by recommend desc limit 20"; } } $result = _mysql_query($query); $n = 0; echo "<form action=profile_screen_action.php>\n"; $found = false; while ($profile = _mysql_fetch_object($result)) { $found = true; start_table(); echo "<tr><td valign=top width=20%>"; buttons($n); echo "\n <br>\n <br>Name: {$profile->name}\n <br>recommends: {$profile->recommend}\n <br>rejects: {$profile->reject}\n <br>RAC: " . format_credit($profile->expavg_credit) . "\n <br>\n "; echo "</td><td>"; start_table(); show_profile($profile, $g_logged_in_user, true); end_table(); echo "</td></tr><tr><td colspan=2></td></tr>\n"; echo "<input type=\"hidden\" name=\"userid{$n}\" value=\"{$profile->userid}\">\n"; $n++; end_table(); } if ($found) { echo "\n <input type=\"hidden\" name=\"n\" value=\"{$n}\">\n <input class=\"btn btn-default\" type=\"submit\" value=\"OK\">\n "; } else { echo "No more profiles to screen."; } echo "\n </form>\n";
$plain = get_int("plain", true); $team = BoincTeam::lookup_id($teamid); if (!$team) { error_page(tra("no such team")); } require_founder_login($user, $team); if ($plain) { header("Content-type: text/plain"); } else { page_head(tra("%1 Email List", $team->name)); start_table(); table_header(array(tra("Member list of %1", $team->name), "colspan=\"6\"")); table_header(tra("Name"), tra("Email address"), tra("Total credit"), tra("Recent average credit"), tra("Country")); } $users = BoincUser::enum_fields("id, email_addr, send_email, name, total_credit, expavg_credit, has_profile, donated, country, cross_project_id, create_time, url", "teamid={$team->id}"); foreach ($users as $user) { if ($plain) { $e = $user->send_email ? "<{$user->email_addr}>" : ""; echo "{$user->name} {$e}\n"; } else { $e = $user->send_email ? "{$user->email_addr}" : ""; table_row(user_links($user, BADGE_HEIGHT_MEDIUM), $e, format_credit($user->total_credit), format_credit($user->expavg_credit), $user->country); } } if (!$plain) { end_table(); echo "<p><a href=\"team_email_list.php?teamid=" . $teamid . "&plain=1\">" . tra("Show as plain text") . "</a></p>"; page_tail(); } $cvs_version_tracker[] = "\$Id\$"; //Generated automatically - do not edit
function show_row($item, $apps, $is_team, $i) { $j = $i % 2; if ($is_team) { $team = BoincTeam::lookup_id($item->teamid); if (!$team) { return; } $x = "<td>" . team_links($team) . "</td>\n"; } else { $user = BoincUser::lookup_id($item->userid); if (!$user) { return; } $x = "<td>" . user_links($user, BADGE_HEIGHT_MEDIUM) . "</td>\n"; } echo "<tr class=row{$j}>"; echo "<td>{$i}</td>\n"; echo $x; foreach ($apps as $app) { if ($app->id == $item->appid) { $c = $item; } else { if ($is_team) { $c = BoincCreditTeam::lookup("teamid={$item->teamid} and appid={$app->id}"); } else { $c = BoincCreditUser::lookup("userid={$item->userid} and appid={$app->id}"); } if (!$c) { $c = new StdClass(); $c->expavg = 0; $c->total = 0; } } echo "<td align=right>" . format_credit($c->expavg) . "</td><td align=right>" . format_credit_large($c->total) . "</td>\n"; } echo "</tr>\n"; }
function show_list($list) { start_table(); echo "\n <tr>\n <th>" . tra("Team name") . "</th>\n "; if (defined("SHOW_NONVALIDATED_TEAMS")) { echo "<th>Validated?</th>\n"; } echo "\n <th>" . tra("Description") . "</th>\n <th>" . tra("Average credit") . "</th>\n <th>" . tra("Type") . "</th>\n <th>" . tra("Country") . "</th>\n </tr>\n "; $i = 0; foreach ($list as $team) { $type = team_type_name($team->type); $j = $i++ % 2; echo "<tr class=row{$j}>\n <td><a href=team_display.php?teamid={$team->id}>{$team->name}</a></td>\n "; if (defined("SHOW_NONVALIDATED_TEAMS")) { $user = BoincUser::lookup_id($team->userid); echo "<td>"; echo $user->email_validated ? "Yes" : "No"; echo "</td>\n"; } echo "\n <td><p class=\"text-muted\">" . sanitize_html($team->description) . "</p></td>\n <td>" . format_credit($team->expavg_credit) . "</td>\n <td>{$type}</td>\n <td>{$team->country}</td>\n </tr>\n "; } echo "</table>"; }
require_once "../inc/boinc_db.inc"; require_once "../inc/result.inc"; $wuid = get_int("wuid"); $wu = BoincWorkunit::lookup_id($wuid); if (!$wu) { error_page("Can't find workunit"); } page_head("Workunit {$wuid}"); $app = BoincApp::lookup_id($wu->appid); start_table(); row2("name", $wu->name); row2("application", $app->user_friendly_name); row2("created", time_str($wu->create_time)); if ($wu->canonical_resultid) { row2('canonical result', '<a href="result.php?resultid=$wu->canonical_resultid">$wu->canonical_resultid</a>'); row2("granted credit", format_credit($wu->canonical_credit)); } // if app is using adaptive replication and no canonical result yet, // don't show anything more // (so that bad guys can't tell if they have an unreplicated job) if ($app->target_nresults > 0 && !$wu->canonical_resultid) { row2("Tasks in progress", "suppressed pending completion"); end_table(); } else { row2("minimum quorum", $wu->min_quorum); row2("initial replication", $wu->target_nresults); row2("max # of error/total/success tasks", "{$wu->max_error_results}, {$wu->max_total_results}, {$wu->max_success_results}"); if ($wu->error_mask) { row2("errors", wu_error_mask_str($wu->error_mask)); } if ($wu->need_validate) {
$plain = get_int("plain", true); $team = BoincTeam::lookup_id($teamid); if (!$team) { error_page(tra("no such team")); } require_founder_login($user, $team); if ($plain) { header("Content-type: text/plain"); } else { page_head(tra("%1 Email List", $team->name)); start_table(); table_header(array(tra("Member list of %1", $team->name), "colspan=\"6\"")); table_header(tra("Name"), tra("Email address"), tra("Total credit"), tra("Recent average credit"), tra("Country")); } $users = BoincUser::enum_fields("id, email_addr, send_email, name, total_credit, expavg_credit, has_profile, donated, country, cross_project_id, create_time, url", "teamid={$team->id}"); foreach ($users as $user) { if ($plain) { $e = $user->send_email ? "<{$user->email_addr}>" : ""; echo "{$user->name} {$e}\n"; } else { $e = $user->send_email ? "{$user->email_addr}" : ""; table_row(user_links($user), $e, format_credit($user->total_credit), format_credit($user->expavg_credit), $user->country); } } if (!$plain) { end_table(); echo "<p><a href=\"team_email_list.php?teamid=" . $teamid . "&plain=1\">" . tra("Show as plain text") . "</a></p>"; page_tail(); } $cvs_version_tracker[] = "\$Id\$"; //Generated automatically - do not edit
echo "\t<workunitid>" . $result->workunitid . "</workunitid>\n"; echo "\t<hostid>" . $result->hostid . "</hostid>\n"; echo "\t<claimed_credit>" . $result->claimed_credit . "</claimed_credit>\n"; echo "\t<received_time>" . $result->received_time . "</received_time>\n"; echo "</result>\n"; $sum += $result->claimed_credit; } echo "<total_claimed_credit>" . $sum . "</total_claimed_credit>\n"; echo "</pending_credit>\n"; } else { $user = get_logged_in_user(); $sum = 0; page_head("Pending credit"); start_table(); echo "<tr><th>Result ID</th><th>Workunit ID</th><th>Host ID</th><th>Claimed credit</th></tr>\n"; $results = BoincResult::enum("userid={$user->id} AND (validate_state=0 OR validate_state=4) AND claimed_credit > 0"); foreach ($results as $result) { echo "<tr>\n"; echo "<td><a href=\"result.php?resultid={$result->id}\">{$result->id}</a></td>\n"; echo "<td><a href=\"workunit.php?wuid={$result->workunitid}\">{$result->workunitid}</a></td>\n"; echo "<td><a href=\"show_host_detail.php?hostid={$result->hostid}\">{$result->hostid}</a></td>\n"; echo "<td>" . format_credit($result->claimed_credit) . "</td>\n"; echo "</tr>\n"; $sum += $result->claimed_credit; } end_table(); echo "Pending credit: " . format_credit($sum); page_tail(); } $cvs_version_tracker[] = "\$Id: pending.php 16686 2008-12-14 22:18:49Z davea \$"; //Generated automatically - do not edit