*** empty log message ***

svn path=/trunk/boinc/; revision=9727
This commit is contained in:
David Anderson 2006-03-24 23:37:32 +00:00
parent e5a7f17f99
commit 85f11e0592
6 changed files with 105 additions and 6 deletions

View File

@ -3218,3 +3218,19 @@ Walt 23 Mar 2006
main.C
client/win
hostinfo_win.C
David 24 Mar 2006
- Let team founders get lists of team members
(including their email addresses) via XML RPC.
The URL is PROJECT/team_email_list.php?teamid=X&account_key=Y&xml=1
This feature lets cross-project teams more easily get their
combined email-address list.
It doesn't change BOINC's privacy policy;
team founders could always get member email addresses.
html/
inc/
xml.inc
user/
team_email_list.php

View File

@ -90,11 +90,11 @@ echo "
and copy the URL from your browser's address field).
</ol>
<center>
<a href=participate.php><b>More info</a>
<a href=participate.php><b><nobr>More info</nobr></a>
| <a href=download.php><b>Download</a>
| <a href=links.php><b>Web sites </a>
| <a href=links.php><b><nobr>Web sites</nobr></a>
| <a href=download_network.php><b>Add-ons</a>
| <a href=dev/><b>Message boards</a>
| <a href=dev/><b><nobr>Message boards</nobr></a>
</center>
</td></tr>

View File

@ -319,5 +319,40 @@ list_item("action",
);
list_end();
echo "
<h3>Get team member list</h3>
";
list_start();
list_item('URL',
'project/team_email_list.php?teamid=X&account_key=Y&xml=1'
);
list_item("input",
'teamid: database ID of team
<br>account_key: account key of team founder'
);
list_item("output",
html_text("<users>
<user>
<id>1</id>
<email_addr>pdq@usndathoople.edu</email_addr>
<cpid>232f381c79336f0bd8df02bbce2f2217</cpid>
<create_time>1076897105</create_time>
<name>David</name>
<country>United States</country>
<total_credit>9.907264</total_credit>
<expavg_credit>0.023264</expavg_credit>
<expavg_time>1142628426.48937</expavg_time>
<url>usndathoople.edu/~pdq</url>
<has_profile>1</has_profile>
</user>
[ ... ]
</users>")
);
list_item('action',
'Show list of team members.
Requires authentication by team founder.'
);
list_end();
page_tail();
?>

View File

@ -57,7 +57,7 @@ list_item(
If this bound is exceeded, the application will be aborted."
);
list_item(
"rsc_mem_bound",
"rsc_memory_bound",
"A bound on the virtual memory working set size.
The workunit will only be sent to hosts with
at least this much available RAM.

View File

@ -49,8 +49,8 @@ function show_user_xml($user, $show_hosts) {
<url>".htmlspecialchars($user->url)."</url>
<has_profile>$user->has_profile</has_profile>
";
$result = mysql_query("select * from host where userid=$user->id");
if ($show_hosts) {
$result = mysql_query("select * from host where userid=$user->id");
echo " <venue>$user->venue</venue>\n";
while ($host = mysql_fetch_object($result)) {
show_host_xml($host);
@ -60,6 +60,24 @@ echo"</user>
";
}
function show_team_member($user) {
$cpid = md5($user->cross_project_id.$user->email_addr);
echo "<user>
<id>$user->id</id>
<email_addr>$user->email_addr</email_addr>
<cpid>$cpid</cpid>
<create_time>$user->create_time</create_time>
<name>".htmlspecialchars($user->name)."</name>
<country>$user->country</country>
<total_credit>$user->total_credit</total_credit>
<expavg_credit>$user->expavg_credit</expavg_credit>
<expavg_time>$user->expavg_time</expavg_time>
<url>".htmlspecialchars($user->url)."</url>
<has_profile>$user->has_profile</has_profile>
</user>
";
}
function show_team_xml($team) {
echo "<team>
<id>$team->id</id>

View File

@ -7,9 +7,39 @@ require_once("../inc/team.inc");
db_init();
$user = get_logged_in_user();
$teamid = get_int("teamid");
$team = lookup_team($teamid);
function error($x) {
echo "<error>$x</error>
";
exit();
}
$xml = get_int('xml', true);
if ($xml) {
require_once("../inc/xml.inc");
xml_header();
if (!$team) {
error("no such team");
}
$account_key = get_str('account_key', true);
$user = lookup_user_auth($account_key);
if (!$user || $team->userid != $user->id) {
error("not founder");
}
echo "<users>
";
$result = mysql_query("select * from user where teamid=$team->id");
while ($user = mysql_fetch_object($result)) {
show_team_member($user);
}
echo "</users>
";
exit();
}
$user = get_logged_in_user();
require_founder_login($user, $team);
page_head("$team->name Email List");