mirror of https://github.com/BOINC/boinc.git
parent
c2964b64aa
commit
b30f73a15c
|
@ -0,0 +1,36 @@
|
|||
<h3>Instructions for beta testers</h3>
|
||||
When you install and run the BOINC client,
|
||||
it will ask you for a project URL and account key.
|
||||
Then it should download two work units,
|
||||
process them, upload the results,
|
||||
and continue doing this forever.
|
||||
<p>
|
||||
If at any point BOINC is neither computing nor transferring files,
|
||||
something is probably wrong;
|
||||
submit a bug report (see below).
|
||||
<p>
|
||||
<b>Windows users</b>:
|
||||
The BOINC core client (accessable via its system tray icon)
|
||||
has tabs that let you see projects, file transfers,
|
||||
work in progress, and messages.
|
||||
If you experience bugs, look at the file <b>stderr.txt</b>
|
||||
in the BOINC directory.
|
||||
If it's nonempty please include it in your bug report.
|
||||
<p>
|
||||
<b>Unix and Mac OS/X users</b>:
|
||||
This version of the client has no GUI,
|
||||
and writes to stderr and stdout.
|
||||
Please include any suspicious-looking text in your bug reports.
|
||||
<p>
|
||||
<b>January 23, 2003</b><br>
|
||||
The <a href=http://maggie.ssl.berkeley.edu/ap_cgi/stripchart.cgi>stripchart diagnostic program</a> is now available for public use.
|
||||
Right now we only have 4 charts, but more will be added shortly.
|
||||
For more information, <a href=http://boinc.berkeley.edu/stripchart.html>read the documentation</a>.
|
||||
<p>
|
||||
<p>
|
||||
<b>January 16, 2003</b><br>
|
||||
BOINC 0.08 is released, which should fix some of the reported bugs.
|
||||
<p>
|
||||
Please report bugs by sending email to the boinc-beta mailing list on SourceForge.net.
|
||||
To join this list, go to <a href=http://lists.sourceforge.net/lists/listinfo/boinc-beta>http://lists.sourceforge.net/lists/listinfo/boinc-beta</a>.
|
||||
";
|
|
@ -1,52 +0,0 @@
|
|||
<?php
|
||||
|
||||
require_once("db.inc");
|
||||
require_once("edit.inc");
|
||||
require_once("util.inc");
|
||||
|
||||
$authenticator = init_session();
|
||||
db_init();
|
||||
$user = get_user_from_auth($authenticator);
|
||||
|
||||
page_head("Change Password");
|
||||
if (!$user) {
|
||||
print_login_form();
|
||||
exit();
|
||||
}
|
||||
if ($HTTP_POST_VARS["my_pass"] == $user->web_password) {
|
||||
if ($HTTP_POST_VARS["new_pass"] != $HTTP_POST_VARS["new_pass2"]) {
|
||||
printf(
|
||||
TABLE2."\n"
|
||||
."<tr><td>".DIFFPASS."</td></tr>\n"
|
||||
."</table>"
|
||||
);
|
||||
} else {
|
||||
$query = sprintf("update user set web_password='%s' where id=%d",
|
||||
$HTTP_POST_VARS["new_pass"], $user->id);
|
||||
$result = mysql_query($query);
|
||||
if ($result) {
|
||||
printf(
|
||||
TABLE2."\n"
|
||||
."<tr><td>Password changed successfully. Use your new password to\n"
|
||||
." <a href=login_form.php>login</a> to your account.</td></tr>\n"
|
||||
."</table>\n"
|
||||
);
|
||||
} else {
|
||||
printf(
|
||||
TABLE2."\n"
|
||||
."<tr><td>Password was unable to be changed. Continue using your old \n"
|
||||
."password to <a href=login_form.php>login</a> to your account. You can try \n"
|
||||
."changing your password again later.</td></tr>\n"
|
||||
."</table>"
|
||||
);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
printf(
|
||||
TABLE2."\n"
|
||||
."<tr>".TD2.BADPASS."</td></tr>\n"
|
||||
."</table>\n"
|
||||
);
|
||||
}
|
||||
page_tail();
|
||||
?>
|
|
@ -1,19 +0,0 @@
|
|||
<?php
|
||||
|
||||
require_once("db.inc");
|
||||
require_once("util.inc");
|
||||
require_once("edit.inc");
|
||||
|
||||
$authenticator = init_session();
|
||||
db_init();
|
||||
$user = get_user_from_auth($authenticator);
|
||||
|
||||
if ($user) {
|
||||
page_head("Change Password");
|
||||
print_change_password($user);
|
||||
page_tail();
|
||||
} else {
|
||||
print_login_form();
|
||||
}
|
||||
|
||||
?>
|
|
@ -1,92 +0,0 @@
|
|||
<?php
|
||||
|
||||
function print_change_password($user) {
|
||||
printf(
|
||||
"<form method=post action=change_pass_action.php>\n"
|
||||
.TABLE2."\n"
|
||||
. "<tr>".TD.LG_FONT."<b>Old Password:</b></font></td></tr>\n"
|
||||
."<tr><td><b>To change your password, please enter your old password below:</b></td></tr>\n"
|
||||
."<tr><td><input name=my_pass type=password></td></tr>\n"
|
||||
."<tr><td><br></td></tr>\n"
|
||||
."<tr>".TD.LG_FONT."<b>New Password:</b></font></td></tr>\n"
|
||||
."<tr><td><b>Next, enter your new password:</b></td></tr>\n"
|
||||
."<tr><td><input name=new_pass type=password></td></tr>\n"
|
||||
."<tr><td><b>Retype password to confirm:</td></tr>"
|
||||
."<tr><td></b><input name=new_pass2 type=password></td></tr>\n"
|
||||
."</table>\n"
|
||||
."<br><br>       <input type=submit value=\"Change Password\">\n"
|
||||
."</form>\n"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
function print_update_ok($e_ok) {
|
||||
if ($e_ok == EMAIL_EXISTS) {
|
||||
echo TABLE2."\n
|
||||
<tr><td>There's already an account with that email address.
|
||||
Click the <b>Back</b> button\n
|
||||
in your browser to edit your information,
|
||||
or <a href=login_form.php>login </a>to your \n
|
||||
".$project." account.</td></tr>\n
|
||||
<tr><td>Any other changes you've made,
|
||||
if any, were successfully updated.</td></tr>\n
|
||||
</table>\n";
|
||||
} else if ($e_ok == EMAIL_FAIL) {
|
||||
echo TABLE2."\n
|
||||
<tr><td>Your email address failed to be updated.
|
||||
Click the <b>Back</b> button\n
|
||||
in your browser to edit your information,
|
||||
or try again later.</td></tr>\n
|
||||
<tr><td>Any other changes you've made,
|
||||
if any, were successfully updated.</td></tr>\n
|
||||
</table>\n";
|
||||
} else if ($e_ok == EMAIL_UPDATED) {
|
||||
echo TABLE2."\n
|
||||
<tr><td>Your information was successfully updated.
|
||||
A new, temporary password will be sent to the\n
|
||||
email address you provided.
|
||||
You must use this new password the next time you login.
|
||||
</td></tr>\n</table>\n";
|
||||
} else {
|
||||
echo TABLE2."\n
|
||||
<tr><td>Your information was successfully updated.</td></tr>\n
|
||||
</table>\n";
|
||||
}
|
||||
}
|
||||
|
||||
function print_update_fail($e_ok) {
|
||||
if ($e_ok == EMAIL_EXISTS) {
|
||||
echo TABLE2."\n
|
||||
<tr><td>There's already an account with that email address.
|
||||
Click the <b>Back</b> button in your browser
|
||||
to edit your information,
|
||||
or <a href=login_form.php>login </a>to your \n
|
||||
".$project." account. </td></tr>\n
|
||||
<tr><td>Any other changes you've made, if any,
|
||||
failed to be updated. Please try again later.</td></tr>\n
|
||||
</table>\n";
|
||||
} else if ($e_ok == EMAIL_FAIL) {
|
||||
echo TABLE2."\n
|
||||
<tr><td>Your information failed to be updated.
|
||||
Click the <b>Back</b> button\n
|
||||
in your browser to edit your information,
|
||||
or try again later.</td></tr>\n
|
||||
</table>\n";
|
||||
} else if ($e_ok == EMAIL_UPDATED) {
|
||||
echo TABLE2."\n
|
||||
<tr><td>Your email address was successfully updated.
|
||||
A new, temporary password will be sent to the\n
|
||||
email address you provided.
|
||||
You must use this new password the next time you login.</td></tr>\n
|
||||
<tr><td>Any other changes you've made, if any,
|
||||
failed to be updated. Please try again later.</td></tr>\n
|
||||
</table>\n";
|
||||
} else {
|
||||
echo TABLE2."\n
|
||||
<tr><td>Your information failed to be updated.
|
||||
Please try again later.</td></tr>\n
|
||||
</table>\n";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
|
@ -0,0 +1,117 @@
|
|||
<?php
|
||||
|
||||
function location_form($host) {
|
||||
if ($host->venue == "home") $h = "selected";
|
||||
if ($host->venue == "work") $w = "selected";
|
||||
if ($host->venue == "school") $s = "selected";
|
||||
$x = "<form action=host_venue_action.php>
|
||||
<input type=hidden name=hostid value=$host->id>
|
||||
<select name=venue>
|
||||
<option value=home $h>Home
|
||||
<option value=work $w>Work
|
||||
<option value=school $s>School
|
||||
</select>
|
||||
<input type=submit value=Update>
|
||||
</form>
|
||||
";
|
||||
return $x;
|
||||
}
|
||||
|
||||
function show_host($host, $private) {
|
||||
start_table();
|
||||
row1("Host Information");
|
||||
if ($private) {
|
||||
row2("IP address", "$host->last_ip_addr<br>(same the last $host->nsame_ip_addr times)");
|
||||
row2("Domain name", $host->domain_name);
|
||||
$x = $host->timezone/3600;
|
||||
row2("Time zone", "UTC - $x hours");
|
||||
}
|
||||
row2("Created", time_str($host->create_time));
|
||||
row2("Total Credit", $host->total_credit);
|
||||
row2("Recent average credit", $host->expavg_credit);
|
||||
row2("CPU type", "$host->p_vendor $host->p_model");
|
||||
row2("Number of CPUs", $host->p_ncpus);
|
||||
row2("Operating System", "$host->os_name $host->os_version");
|
||||
$x = $host->m_nbytes/(1024*1024);
|
||||
$y = round($x, 2);
|
||||
row2("Memory", "$y MB");
|
||||
$x = $host->m_cache/1024;
|
||||
$y = round($x, 2);
|
||||
row2("Cache", "$y KB");
|
||||
|
||||
if ($private) {
|
||||
$x = $host->m_swap/(1024*1024);
|
||||
$y = round($x, 2);
|
||||
row2("Swap space", "$y MB");
|
||||
$x = $host->d_total/(1024*1024*1024);
|
||||
$y = round($x, 2);
|
||||
row2("Total disk space", "$y GB");
|
||||
$x = $host->d_free/(1024*1024*1024);
|
||||
$y = round($x, 2);
|
||||
row2("Free Disk Space", "$y GB");
|
||||
}
|
||||
$x = $host->p_fpops/(1000*1000);
|
||||
$y = round($x, 2);
|
||||
row2("Measured floating point speed", "$y million ops/sec");
|
||||
$x = $host->p_iops/(1000*1000);
|
||||
$y = round($x, 2);
|
||||
row2("Measured integer speed", "$y million ops/sec");
|
||||
$x = $host->p_membw/(1024*1024);
|
||||
$y = round($x, 2);
|
||||
row2("Measured memory bandwidth", "$y MB/sec");
|
||||
$x = $host->n_bwup/(1024);
|
||||
$y = round($x, 2);
|
||||
if ($y > 0) {
|
||||
row2("Average upload rate", "$y KB/sec");
|
||||
} else {
|
||||
row2("Average upload rate", "Unknown");
|
||||
}
|
||||
$x = $host->n_bwdown/(1024);
|
||||
$y = round($x, 2);
|
||||
if ($y > 0) {
|
||||
row2("Average download rate", "$y KB/sec");
|
||||
} else {
|
||||
row2("Average download rate", "Unknown");
|
||||
}
|
||||
if ($private) {
|
||||
row2("Number of times client has contacted server", $host->rpc_seqno);
|
||||
row2("Last time contacted server", time_str($host->rpc_time));
|
||||
row2("% of time client is on", 100*$host->on_frac." %");
|
||||
row2("% of time host is connected", 100*$host->connected_frac." %");
|
||||
row2("% of time user is active", 100*$host->active_frac." %");
|
||||
row2("Location", location_form($host));
|
||||
}
|
||||
echo "</table>\n";
|
||||
|
||||
}
|
||||
|
||||
function host_table_start($title) {
|
||||
start_table();
|
||||
row1($title, 6);
|
||||
echo "<tr>
|
||||
<th>Rank<br><font size=-2>Click for more info</font></th>
|
||||
<th>Owner</th>
|
||||
<th>Total credit</th>
|
||||
<th>Recent average credit</th>
|
||||
<th>CPU type</th>
|
||||
<th>Operating system</th>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
|
||||
function show_host_row($host, $i) {
|
||||
$result = mysql_query("select * from user where id = $host->userid");
|
||||
$user = mysql_fetch_object($result);
|
||||
mysql_free_result($result);
|
||||
echo "<tr>
|
||||
<td><a href=show_host_public.php?hostid=$host->id>$i</a></td>
|
||||
<td><a href=show_user.php?userid=$user->id>$user->name</a></td>
|
||||
<td>$host->total_credit</td>
|
||||
<td>$host->expavg_credit</td>
|
||||
<td>$host->p_vendor $host->p_model</td>
|
||||
<td>$host->os_name $host->os_version</td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
|
||||
?>
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
require_once("util.inc");
|
||||
require_once("host.inc");
|
||||
|
||||
$max_hosts_display = 100;
|
||||
db_init();
|
||||
$userid = $_GET["userid"];
|
||||
$result = mysql_query("select * from user where id=$userid");
|
||||
$user = mysql_fetch_object($result);
|
||||
mysql_free_result($result);
|
||||
host_table_start("Hosts belonging to $user->name");
|
||||
$i = 1;
|
||||
$result = mysql_query("select * from host where userid=$userid order by expavg_credit desc limit $max_hosts_display");
|
||||
while (($host = mysql_fetch_object($result)) && $max_hosts_display > 0) {
|
||||
show_host_row($host, $i);
|
||||
$max_hosts_display--;
|
||||
$i++;
|
||||
}
|
||||
mysql_free_result($result);
|
||||
echo "</table>\n";
|
||||
page_tail();
|
||||
?>
|
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
|
||||
define("PROJECT", "Astropulse");
|
||||
define("MASTER_URL", "http://maggie.ssl.berkeley.edu/ap/");
|
||||
|
||||
function project_intro() {
|
||||
echo"
|
||||
Astropulse uses your computer's idle time to
|
||||
analyze radio telescope signals, looking for
|
||||
<a href=http://www.planetary.org/html/UPDATES/seti/SETI@home/Update_110501.htm>black hole evaporation
|
||||
</a>
|
||||
and other phenomena.
|
||||
";
|
||||
|
||||
echo "<p><b>
|
||||
Astropulse is based on <a href=http://boinc.berkeley.edu>BOINC</a>,
|
||||
which is being beta-tested.
|
||||
We currently have enough volunteers for the beta test.
|
||||
Stay tuned for an expanded beta test in the upcoming months.</b>
|
||||
<p>
|
||||
Beta testers: click <a href=beta_test_instructions.html>here</a>
|
||||
for instructions and news.
|
||||
";
|
||||
}
|
||||
|
||||
function project_banner($user) {
|
||||
|
||||
echo "<table cellspacing=0 border=0 cellpadding=10 width=100%><tr>
|
||||
<td background=http://setiathome.berkeley.edu/images/outrspc3.gif>
|
||||
<font color=ffffff size=8 face='helvetica'>Astropulse</font>
|
||||
</td>
|
||||
<td valign=bottom align=right background=http://setiathome.berkeley.edu/images/outrspc3.gif>
|
||||
<font size=-1 color=ffffff>\n
|
||||
";
|
||||
|
||||
if ($user) {
|
||||
echo "Logged in as $user->name";
|
||||
} else {
|
||||
echo "<br>";
|
||||
}
|
||||
echo "</td></tr></table><hr>\n";
|
||||
}
|
||||
|
||||
?>
|
|
@ -1,86 +1,9 @@
|
|||
<?php
|
||||
require_once("util.inc");
|
||||
require_once("user.inc");
|
||||
require_once("db.inc");
|
||||
require_once("user.inc");
|
||||
require_once("host.inc");
|
||||
|
||||
function location_form($host) {
|
||||
if ($host->venue == "home") $h = "selected";
|
||||
if ($host->venue == "work") $w = "selected";
|
||||
if ($host->venue == "school") $s = "selected";
|
||||
$x = "<form action=host_venue_action.php>
|
||||
<input type=hidden name=hostid value=$host->id>
|
||||
<select name=venue>
|
||||
<option value=home $h>Home
|
||||
<option value=work $w>Work
|
||||
<option value=school $s>School
|
||||
</select>
|
||||
<input type=submit value=Update>
|
||||
</form>
|
||||
";
|
||||
return $x;
|
||||
}
|
||||
|
||||
function show_host($host) {
|
||||
start_table();
|
||||
row1("Host Information");
|
||||
row2("IP address", "$host->last_ip_addr<br>(same the last $host->nsame_ip_addr times)");
|
||||
row2("Domain name", $host->domain_name);
|
||||
$x = $host->timezone/3600;
|
||||
row2("Time zone", "UTC - $x hours");
|
||||
row2("Created", time_str($host->create_time));
|
||||
row2("Total Credit", $host->total_credit);
|
||||
row2("Recent average credit", $host->expavg_credit);
|
||||
row2("CPU type", "$host->p_vendor $host->p_model");
|
||||
row2("Number of CPUs", $host->p_ncpus);
|
||||
row2("Operating System", "$host->os_name $host->os_version");
|
||||
$x = $host->m_nbytes/(1024*1024);
|
||||
$y = round($x, 2);
|
||||
row2("Memory", "$y MB");
|
||||
$x = $host->m_cache/1024;
|
||||
$y = round($x, 2);
|
||||
row2("Cache", "$y KB");
|
||||
$x = $host->m_swap/(1024*1024);
|
||||
$y = round($x, 2);
|
||||
row2("Swap space", "$y MB");
|
||||
$x = $host->d_total/(1024*1024*1024);
|
||||
$y = round($x, 2);
|
||||
row2("Total disk space", "$y GB");
|
||||
$x = $host->d_free/(1024*1024*1024);
|
||||
$y = round($x, 2);
|
||||
row2("Free Disk Space", "$y GB");
|
||||
$x = $host->p_fpops/(1000*1000);
|
||||
$y = round($x, 2);
|
||||
row2("Measured floating point speed", "$y million ops/sec");
|
||||
$x = $host->p_iops/(1000*1000);
|
||||
$y = round($x, 2);
|
||||
row2("Measured integer speed", "$y million ops/sec");
|
||||
$x = $host->p_membw/(1024*1024);
|
||||
$y = round($x, 2);
|
||||
row2("Measured memory bandwidth", "$y MB/sec");
|
||||
$x = $host->n_bwup/(1024);
|
||||
$y = round($x, 2);
|
||||
if ($y > 0) {
|
||||
row2("Average upload rate", "$y KB/sec");
|
||||
} else {
|
||||
row2("Average upload rate", "Unknown");
|
||||
}
|
||||
$x = $host->n_bwdown/(1024);
|
||||
$y = round($x, 2);
|
||||
if ($y > 0) {
|
||||
row2("Average download rate", "$y KB/sec");
|
||||
} else {
|
||||
row2("Average download rate", "Unknown");
|
||||
}
|
||||
row2("Number of times client has contacted server", $host->rpc_seqno);
|
||||
row2("Last time contacted server", time_str($host->rpc_time));
|
||||
row2("% of time client is on", 100*$host->on_frac." %");
|
||||
row2("% of time host is connected", 100*$host->connected_frac." %");
|
||||
row2("% of time user is active", 100*$host->active_frac." %");
|
||||
row2("Location", location_form($host));
|
||||
echo "</table>\n";
|
||||
|
||||
}
|
||||
$authenticator = init_session();
|
||||
db_init();
|
||||
$user = get_user_from_auth($authenticator);
|
||||
|
@ -96,7 +19,7 @@ function show_host($host) {
|
|||
if ($host->userid != $user->id) {
|
||||
echo "Not your host\n";
|
||||
} else {
|
||||
show_host($host);
|
||||
show_host($host, true);
|
||||
}
|
||||
} else {
|
||||
echo "Couldn't find host or user.<p>";
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
require_once("util.inc");
|
||||
require_once("db.inc");
|
||||
require_once("user.inc");
|
||||
require_once("host.inc");
|
||||
|
||||
db_init();
|
||||
$hostid = $HTTP_GET_VARS["hostid"];
|
||||
if ($hostid) {
|
||||
page_head("Host stats");
|
||||
|
||||
$result = mysql_query("select * from host where id = $hostid");
|
||||
$host = mysql_fetch_object($result);
|
||||
mysql_free_result($result);
|
||||
|
||||
if ($host) {
|
||||
show_host($host, false);
|
||||
} else {
|
||||
echo "Couldn't find host.<p>";
|
||||
}
|
||||
} else {
|
||||
echo "Couldn't find host.<p>";
|
||||
}
|
||||
page_tail();
|
||||
?>
|
|
@ -5,15 +5,14 @@
|
|||
|
||||
init_session();
|
||||
db_init();
|
||||
$id = $HTTP_GET_VARS["id"];
|
||||
$id = $HTTP_GET_VARS["userid"];
|
||||
|
||||
$result = mysql_query("select * from user where id = $id");
|
||||
$user = mysql_fetch_object($result);
|
||||
mysql_free_result($result);
|
||||
|
||||
if ($user) {
|
||||
page_head("User stats for $user->name");
|
||||
echo("<h2>Account stats for $user->name</h2>");
|
||||
page_head("Account data for $user->name");
|
||||
start_table();
|
||||
show_user_stats($user);
|
||||
end_table();
|
||||
|
|
|
@ -4,38 +4,25 @@ require_once("util.inc");
|
|||
require_once("db.inc");
|
||||
require_once("sanitize_html.inc");
|
||||
|
||||
function show_team($team) {
|
||||
start_table();
|
||||
row2("ID", $team->id);
|
||||
row2("founder", $team->userid);
|
||||
row2("name", $team->name);
|
||||
row2("url", $team->url);
|
||||
row2("type", $team->type);
|
||||
row2("name_html", $team->name_html);
|
||||
row2("description", sanitize_html($team->description));
|
||||
}
|
||||
|
||||
function display_team_page($team) {
|
||||
page_head("$team->name");
|
||||
if ($team->name_html != null) {
|
||||
echo "<p>";
|
||||
echo "$team->name_html";
|
||||
}
|
||||
echo "<p>";
|
||||
echo "[<a href=team_join_form.php?id=$team->id><b>Join</b></a>] ";
|
||||
echo "[<a href=team_quit_form.php?id=$team->id><b>Quit</b></a>] ";
|
||||
echo "[<a href=team_edit_form.php?id=$team->id><b>Edit*</b></a>] ";
|
||||
echo "[<a href=team_remove_inactive_form.php?id=$team->id><b>Remove Inactive Members*</b></a>] ";
|
||||
echo "[<a href=team_disband_form.php?id=$team->id><b>Disband Team*</b></a>] ";
|
||||
echo "[<a href=team_email_list.php?id=$team->id><b>View Team Emails*</b></a>]";
|
||||
echo "<br><font size=2>* Team founder only</font>";
|
||||
|
||||
echo "<br>";
|
||||
echo "<p>";
|
||||
echo "<table border=0 width=580>";
|
||||
echo "<tr bgcolor=#708090><td colspan=2><font size=+1>";
|
||||
echo "<b>Team Info:</b></font></td></tr></table>";
|
||||
echo "<table>";
|
||||
echo "<p>
|
||||
[<a href=team_join_form.php?id=$team->id><b>Join</b></a>]
|
||||
[<a href=team_quit_form.php?id=$team->id><b>Quit</b></a>]
|
||||
[<a href=team_edit_form.php?id=$team->id><b>Edit*</b></a>]
|
||||
[<a href=team_remove_inactive_form.php?id=$team->id><b>Remove Inactive Members*</b></a>]
|
||||
[<a href=team_disband_form.php?id=$team->id><b>Disband Team*</b></a>]
|
||||
[<a href=team_email_list.php?id=$team->id><b>View Team Emails*</b></a>]
|
||||
<br><font size=2>* Team founder only</font>
|
||||
<br>
|
||||
<p>
|
||||
";
|
||||
start_table();
|
||||
row1("Team info");
|
||||
if (strlen($team->description)) {
|
||||
row2("Description", sanitize_html($team->description));
|
||||
}
|
||||
|
@ -44,52 +31,46 @@ function display_team_page($team) {
|
|||
}
|
||||
row2("Members", $team->nusers);
|
||||
|
||||
$query = sprintf(
|
||||
"select * from user where teamid = %d",
|
||||
$team->id
|
||||
);
|
||||
$result = mysql_query($query);
|
||||
$result = mysql_query("select * from user where teamid=$team->id");
|
||||
$total_credit = 0;
|
||||
for ($i = 0; $i < $team->nusers; $i++) {
|
||||
$user = mysql_fetch_object($result);
|
||||
$total_credit = $total_credit + $user->total_credit;
|
||||
}
|
||||
|
||||
row2("Total Credit", $total_credit);
|
||||
$query = sprintf(
|
||||
"select * from user where id = %d",
|
||||
$team->userid
|
||||
);
|
||||
$result = mysql_query($query);
|
||||
row2("Total credit", $total_credit);
|
||||
$result = mysql_query("select * from user where id=$team->userid");
|
||||
$user = mysql_fetch_object($result);
|
||||
row2("Founder", $user->name);
|
||||
row2("Founder", "<a href=show_user.php?userid=$user->id>$user->name</a>");
|
||||
row2("Country", $team->country);
|
||||
echo "</table>";
|
||||
echo "<p>";
|
||||
echo "<table border=0 width=580>";
|
||||
echo "<tr bgcolor=#708090><td colspan=2><font size=+1>";
|
||||
echo "<b>Team Members:</b></font></td></tr></table>";
|
||||
echo "<table border=1 cellpadding=2 width=40%><tr>";
|
||||
echo "<th>Name</th>";
|
||||
echo "<th>Total credit</th>";
|
||||
echo "<th>Recent average CPU<br>time per work unit</th>";
|
||||
echo "<th>Country</th>";
|
||||
echo "</tr>";
|
||||
start_table();
|
||||
row1("Team members", 4);
|
||||
echo "<tr>
|
||||
<th>Name</th>
|
||||
<th>Total credit</th>
|
||||
<th>Recent average credit</th>
|
||||
<th>Country</th>
|
||||
</tr>
|
||||
";
|
||||
|
||||
$query = sprintf(
|
||||
"select * from user where teamid = %d order by expavg_credit desc",
|
||||
$team->id
|
||||
);
|
||||
$result = mysql_query($query);
|
||||
$result = mysql_query("select * from user where teamid=$team->id order by expavg_credit desc");
|
||||
|
||||
for ($i = 0; $i < $team->nusers; $i++) {
|
||||
$j = 1;
|
||||
while (true) {
|
||||
$user = mysql_fetch_object($result);
|
||||
$j = $i+1;
|
||||
echo "<tr><td align=left>$j) $user->name";
|
||||
echo "<td align=center>$user->total_credit</td>";
|
||||
echo "<td align=center>$user->expavg_credit</td>";
|
||||
echo "<td align=center>$user->country</td>";
|
||||
echo "</tr>";
|
||||
if (!$user) break;
|
||||
echo "<tr>
|
||||
<td align=left>$j) <a href=show_user.php?userid=$user->id>$user->name</a>
|
||||
<td align=center>$user->total_credit</td>
|
||||
<td align=center>$user->expavg_credit</td>
|
||||
<td align=center>$user->country</td>
|
||||
</tr>
|
||||
";
|
||||
$j++;
|
||||
}
|
||||
mysql_free_result($result);
|
||||
echo "</table>";
|
||||
page_tail();
|
||||
}
|
||||
|
@ -117,4 +98,25 @@ function require_founder_login($user, $team) {
|
|||
}
|
||||
}
|
||||
|
||||
function team_table_start() {
|
||||
echo "<tr>
|
||||
<th>Name</th>
|
||||
<th>Members</th>
|
||||
<th>Average credit</th>
|
||||
<th>Total credit</th>
|
||||
<th>Country</th>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
|
||||
function show_team_row($team, $i) {
|
||||
echo "<tr>
|
||||
<td>$i) <a href=team_display.php?id=$team->id>$team->name</a></td>
|
||||
<td>$team->nusers</td>
|
||||
<td>$team->expavg_credit</td>
|
||||
<td>$team->total_credit</td>
|
||||
<td>$team->country</td>
|
||||
</tr>\n";
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -1,39 +1,17 @@
|
|||
<?php
|
||||
require_once("util.inc");
|
||||
require_once("user.inc");
|
||||
|
||||
function host_table_start() {
|
||||
echo <<<EOT
|
||||
<table border=1 cellpadding=6>
|
||||
<tr><th>Owner</th>
|
||||
<th>Total credit</th>
|
||||
<th>Recent average credit</th>
|
||||
<th>CPU type</th>
|
||||
</tr>
|
||||
EOT;
|
||||
}
|
||||
|
||||
function show_host_row($host) {
|
||||
$result = mysql_query("select * from user where id = $host->userid");
|
||||
$user = mysql_fetch_object($result);
|
||||
mysql_free_result($result);
|
||||
echo "<tr>
|
||||
<td><a href=show_user.php?id=$user->id>$user->name</a></td>
|
||||
<td>$host->total_credit</td>
|
||||
<td>$host->expavg_credit</td>
|
||||
<td>$host->p_vendor $host->p_model</td>
|
||||
</tr>";
|
||||
}
|
||||
require_once("host.inc");
|
||||
|
||||
$max_hosts_display = 100;
|
||||
db_init();
|
||||
page_head("Top hosts");
|
||||
echo "<h2>Top hosts</h2>\n";
|
||||
$result = mysql_query("select * from host order by expavg_credit desc limit $max_hosts_display");
|
||||
host_table_start();
|
||||
host_table_start("Top hosts");
|
||||
$i = 1;
|
||||
while (($host = mysql_fetch_object($result)) && $max_hosts_display > 0) {
|
||||
show_host_row($host);
|
||||
show_host_row($host, $i);
|
||||
$max_hosts_display--;
|
||||
$i++;
|
||||
}
|
||||
mysql_free_result($result);
|
||||
echo "</table>\n";
|
||||
|
|
|
@ -1,30 +1,19 @@
|
|||
<?php
|
||||
require_once("util.inc");
|
||||
require_once("user.inc");
|
||||
|
||||
function team_table_start() {
|
||||
echo VISTABLE."
|
||||
<tr><th>Name</th><th>Members</th><th>Average credit</th><th>Total credit</th>
|
||||
<th>Founded</th></tr>";
|
||||
}
|
||||
|
||||
function show_team_row($team) {
|
||||
echo "<tr>
|
||||
<td><a href=team_display.php?id=$team->id>$team->name</a></td>
|
||||
<td>$team->nusers</td>
|
||||
<td>$team->expavg_credit</td>
|
||||
<td>$team->total_credit</td>
|
||||
<td>".time_str($team->create_time)."</td>
|
||||
<tr>\n";
|
||||
}
|
||||
require_once("team.inc");
|
||||
|
||||
db_init();
|
||||
|
||||
page_head("Top teams");
|
||||
$result = mysql_query("select * from team order by expavg_credit desc, total_credit desc");
|
||||
start_table();
|
||||
row1("Teams", 5);
|
||||
team_table_start();
|
||||
$i = 1;
|
||||
while ($team = mysql_fetch_object($result)) {
|
||||
show_team_row($team);
|
||||
show_team_row($team, $i);
|
||||
$i++;
|
||||
}
|
||||
mysql_free_result($result);
|
||||
echo "</table>\n<p>\n";
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
|
||||
$authenticator = init_session();
|
||||
db_init();
|
||||
page_head("Top users");
|
||||
$result = mysql_query("select * from user order by expavg_credit desc,total_credit desc");
|
||||
$numusers = 100;
|
||||
page_head("Top $numusers users");
|
||||
$result = mysql_query("select * from user order by expavg_credit desc,total_credit desc limit $numusers");
|
||||
user_table_start();
|
||||
while ($user = mysql_fetch_object($result)) {
|
||||
show_user_row($user);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
function show_user_stats($user) {
|
||||
row1("Account statistics");
|
||||
row1("Account data for $user->name");
|
||||
$row = sprintf("%s User since", $project);
|
||||
row2($row, time_str($user->create_time));
|
||||
row2("Total credit", $user->total_credit);
|
||||
|
@ -13,6 +13,8 @@ function show_user_stats($user) {
|
|||
} else {
|
||||
row2("Team", "None");
|
||||
}
|
||||
row2("Country", $user->country);
|
||||
row2("Hosts", "<a href=hosts_user.php?userid=$user->id>Click to view</a>");
|
||||
}
|
||||
|
||||
function show_user_profile($user) {
|
||||
|
@ -71,18 +73,24 @@ function show_user_page_private($user) {
|
|||
function user_table_start() {
|
||||
start_table();
|
||||
echo "
|
||||
<tr><th>Name</th><th>Average credit</th><th>Total credit</th>
|
||||
<th>Participant since</th></tr>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Recent average credit</th>
|
||||
<th>Total credit</th>
|
||||
<th>Country</th>
|
||||
<th>Participant since</th>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
|
||||
function show_user_row($user) {
|
||||
echo "<tr>
|
||||
<td>$user->name</td>
|
||||
<td><a href=show_user.php?userid=$user->id>$user->name</a></td>
|
||||
<td>$user->expavg_credit</td>
|
||||
<td>$user->total_credit</td>
|
||||
<td>$user->country</td>
|
||||
<td>".time_str($user->create_time)."</td>
|
||||
<tr>\n";
|
||||
</tr>\n";
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -3,26 +3,6 @@
|
|||
require_once("db.inc");
|
||||
require_once("project.inc");
|
||||
|
||||
define("EMAIL_EXISTS", -1);
|
||||
define("EMAIL_UPDATED", 1);
|
||||
define("EMAIL_FAIL", -2);
|
||||
|
||||
define("LG_FONT", "<font size=+1>");
|
||||
define("SM_FONT", "<font size=-1>");
|
||||
|
||||
define("TD", "<td bgcolor=cccccc>");
|
||||
define("TD2", "<td colspan=2 bgcolor=cccccc>");
|
||||
define("TD3", "<td colspan=3 bgcolor=cccccc>");
|
||||
|
||||
define("TABLE", "<table cellpadding=10 cellspacing=4 border=0 width=100%>");
|
||||
define("VISTABLE", "<table cellpadding=2 cellspacing=0 border=1 width=100%>");
|
||||
define("TABLE2", "<table width=580 cellpadding=3>");
|
||||
|
||||
define("BG_COLOR", " bgcolor=ffffff ");
|
||||
define("TITLE_COLOR", " bgcolor=000000 ");
|
||||
define("TITLE_FONT", " <font color=ffffff> ");
|
||||
define("BODY_COLOR", " bgcolor=ffffff ");
|
||||
|
||||
// Sends the authenticator to the given email address
|
||||
//
|
||||
function send_auth_email($email_addr, $auth) {
|
||||
|
@ -70,7 +50,7 @@ function show_login($user) {
|
|||
}
|
||||
|
||||
function page_head($title, $user=null) {
|
||||
echo "<head><title>$title</title><body ".BG_COLOR.">\n";
|
||||
echo "<head><title>$title</title><body bgcolor=ffffff>\n";
|
||||
|
||||
project_banner($user);
|
||||
|
||||
|
@ -106,15 +86,15 @@ function time_str($x) {
|
|||
}
|
||||
|
||||
function start_table() {
|
||||
echo "<table width=600 border=1 cellpadding=5>";
|
||||
echo "<table border=1 cellpadding=5>";
|
||||
}
|
||||
|
||||
function end_table() {
|
||||
echo "</table>\n";
|
||||
}
|
||||
|
||||
function row1($x) {
|
||||
echo "<tr><td bgcolor=cccccc colspan=2><b>$x</b></td></tr>\n";
|
||||
function row1($x, $ncols=2) {
|
||||
echo "<tr><td bgcolor=cccccc colspan=$ncols><b>$x</b></td></tr>\n";
|
||||
}
|
||||
|
||||
function row2($x, $y) {
|
||||
|
@ -254,8 +234,4 @@ function split_munged_email_addr($addr, $string, &$email) {
|
|||
return true;
|
||||
}
|
||||
|
||||
// remove all HTML tags except vanilla formatting
|
||||
//
|
||||
function cleanse_html($text) {
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue