2002-08-07 18:56:55 +00:00
|
|
|
<?php
|
2007-08-26 12:01:41 +00:00
|
|
|
$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit
|
2002-08-07 18:56:55 +00:00
|
|
|
|
2007-10-26 21:14:35 +00:00
|
|
|
require_once("../inc/boinc_db.inc");
|
2004-02-02 23:34:39 +00:00
|
|
|
require_once("../inc/util.inc");
|
2004-11-18 20:01:12 +00:00
|
|
|
require_once("../inc/email.inc");
|
2004-02-02 23:34:39 +00:00
|
|
|
require_once("../inc/team.inc");
|
2002-08-07 18:56:55 +00:00
|
|
|
|
2006-03-24 23:37:32 +00:00
|
|
|
$xml = get_int('xml', true);
|
|
|
|
if ($xml) {
|
|
|
|
require_once("../inc/xml.inc");
|
|
|
|
xml_header();
|
2006-09-06 20:56:55 +00:00
|
|
|
$retval = db_init_xml();
|
|
|
|
if ($retval) xml_error($retval);
|
|
|
|
$teamid = get_int("teamid");
|
2007-11-07 17:23:29 +00:00
|
|
|
$team = BoincTeam::lookup_id($teamid);
|
2006-03-24 23:37:32 +00:00
|
|
|
if (!$team) {
|
2006-09-06 20:56:55 +00:00
|
|
|
xml_error(-136);
|
2006-03-24 23:37:32 +00:00
|
|
|
}
|
|
|
|
$account_key = get_str('account_key', true);
|
|
|
|
$user = lookup_user_auth($account_key);
|
2007-11-16 00:26:48 +00:00
|
|
|
$show_email = ($user && is_team_founder($user, $team));
|
2007-08-26 12:01:41 +00:00
|
|
|
echo "<users>\n";
|
2007-11-25 20:57:34 +00:00
|
|
|
$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");
|
|
|
|
//$users = BoincUser::enum("teamid=$team->id");
|
2007-10-26 21:14:35 +00:00
|
|
|
foreach($users as $user) {
|
2006-03-30 00:45:24 +00:00
|
|
|
show_team_member($user, $show_email);
|
2006-03-24 23:37:32 +00:00
|
|
|
}
|
2007-08-26 12:01:41 +00:00
|
|
|
echo "</users>\n";
|
2006-03-24 23:37:32 +00:00
|
|
|
exit();
|
|
|
|
}
|
|
|
|
|
|
|
|
$user = get_logged_in_user();
|
2006-10-23 19:33:22 +00:00
|
|
|
$teamid = get_int("teamid");
|
2006-12-29 23:36:24 +00:00
|
|
|
$plain = get_int("plain", true);
|
2007-10-26 21:14:35 +00:00
|
|
|
$team = BoincTeam::lookup_id($teamid);
|
2007-11-07 17:23:29 +00:00
|
|
|
if (!$team) error_page("no such team");
|
2007-11-16 00:26:48 +00:00
|
|
|
require_founder_login($user, $team);
|
2007-10-26 21:14:35 +00:00
|
|
|
|
|
|
|
if ($plain) {
|
|
|
|
header("Content-type: text/plain");
|
|
|
|
} else {
|
|
|
|
page_head("$team->name Email List");
|
|
|
|
start_table();
|
2007-11-15 23:25:43 +00:00
|
|
|
table_header(array("Member list of ".$team->name, "colspan=\"6\""));
|
2007-11-16 21:31:43 +00:00
|
|
|
table_header("Name", "Email address", "Total credit", "Recent average credit", "Country");
|
2007-10-26 21:14:35 +00:00
|
|
|
}
|
2007-11-25 20:57:34 +00:00
|
|
|
$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");
|
2007-10-26 21:14:35 +00:00
|
|
|
foreach($users as $user) {
|
2006-12-29 23:36:24 +00:00
|
|
|
if ($plain) {
|
2007-11-16 21:31:43 +00:00
|
|
|
$e = $user->send_email?"<$user->email_addr>":"";
|
|
|
|
echo "$user->name $e\n";
|
2006-12-29 23:36:24 +00:00
|
|
|
} else {
|
2007-11-16 21:31:43 +00:00
|
|
|
$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);
|
2006-12-29 23:36:24 +00:00
|
|
|
}
|
2007-10-26 21:14:35 +00:00
|
|
|
}
|
|
|
|
if (!$plain) {
|
|
|
|
end_table();
|
|
|
|
echo "<p><a href=\"team_email_list.php?teamid=".$teamid."&plain=1\">Show as plain text</a></p>";
|
|
|
|
page_tail();
|
2006-10-23 19:33:22 +00:00
|
|
|
}
|
2002-08-07 18:56:55 +00:00
|
|
|
|
|
|
|
?>
|