*** empty log message ***

svn path=/trunk/boinc/; revision=11613
This commit is contained in:
David Anderson 2006-12-04 17:10:39 +00:00
parent 121ad788d0
commit 20211fd17e
20 changed files with 242 additions and 87 deletions

View File

@ -13087,3 +13087,9 @@ Bruce 4 Dec 2006
sched/
server_types.C
David 4 Dec 2006
- if browser contacts scheduler, link to homepage but don't redirect
sched/
main.C
server_types.C

View File

@ -45,15 +45,14 @@ To participate in a BOINC project:
<li> <a href=download.php>Download</a>,
install and run the BOINC client software.
<li>
When requested, enter the project's URL.
Click Join Project, or select the Attach Project menu item.
Enter the project's URL.
This is the address of the project's web site.
If you like, you can copy and paste it from your web browser.
<li>
When requested, enter your email address
and a password of your choosing.
Enter your email address and a password of your choosing.
<li>
BOINC will open a web page that allows you
to set other account data,
BOINC will open a web page that allows you to set other account data,
such as name, country, and preferences.
</ol>
<p>

View File

@ -28,19 +28,19 @@ and miscellaneous software
participants can get that from the BOINC web site).
Use
<pre>
./configure --disable_client
./configure --disable-client
</pre>
<li> If you're porting the BOINC client software to a new platform,
you need the client and miscellaneous components.
Use
<pre>
./configure --disable_server
./configure --disable-server
</pre>
<li> If you're developing or porting a BOINC application,
you need only the miscellaneous component.
Use
<pre>
./configure --disable_server --disable_client
./configure --disable-server --disable-client
</pre>
</ul>

View File

@ -89,7 +89,7 @@ function html_text($x) {
}
function list_start($attrs = 'width=100%') {
echo "<p><table $attrs border=1 cellpadding=6>\n";
echo "<p><table $attrs border=0 cellpadding=6>\n";
}
function list_heading($x, $y, $z=null) {
@ -114,6 +114,7 @@ function list_heading_array($x) {
function list_item($x, $y, $z=null) {
global $light_blue;
if (!$x) $x = "<br>";
echo "
<tr>
<td bgcolor=$light_blue valign=top><b>$x</b></td>

View File

@ -10,6 +10,15 @@ function rating_insert($r) {
return mysql_query($query);
}
function rating_lookup($r) {
$auth = mysql_real_escape_string($r->auth);
$query = "select * from rating where volunteerid=$r->volunteerid and auth='$auth'";
$result = mysql_query($query);
$rating = mysql_fetch_object($result);
mysql_free_result($result);
return $rating;
}
function rating_update($r) {
$auth = mysql_real_escape_string($r->auth);
$comment = mysql_real_escape_string($r->comment);
@ -30,7 +39,10 @@ function ratings_get($volid) {
function rating_vol_auth($volid, $auth) {
$auth = mysql_real_escape_string($auth);
mysql_query("select * from rating where volunteerid=$vold and auth='$auth'");
$result = mysql_query("select * from rating where volunteerid=$volid and auth='$auth'");
$rating = mysql_fetch_object($result);
mysql_free_result($result);
return $rating;
}
function vol_insert($vol) {
@ -63,16 +75,33 @@ function vol_update($vol) {
return mysql_query($query);
}
function vol_update_rating($vol, $rating) {
function vol_update_rating($vol, $old_rating, $rating) {
$diff = $rating->rating - $old_rating->rating;
$query = "update volunteer set rating_sum=rating_sum+$diff where id=$vol->id";
return mysql_query($query);
}
function vol_new_rating($vol, $rating) {
$query = "update volunteer set nratings=nratings+1, rating_sum=rating_sum+$rating where id=$vol->id";
return mysql_query($query);
}
function vol_update_status($vol) {
$query = "update volunteer set last_check=$vol->last_check, last_online=$vol->last_online, status=$vol->status where id=$vol->id";
return mysql_query($query);
}
function get_vols($lang) {
$vols = array();
$result = mysql_query("select * from volunteer");
while ($vol = mysql_fetch_object($result)) {
$vols[] = $vol;
if ($lang) {
if ($vol->lang1 == $lang || $vol->lang2 == $lang) {
$vols[] = $vol;
}
} else {
$vols[] = $vol;
}
}
mysql_free_result($result);
return $vols;

View File

@ -1,6 +1,7 @@
<?php
// info is at: http://www.skype.com/share/buttons/advanced.html
// and https://developer.skype.com/Docs/Web?action=AttachFile&do=get&target=2006-06-06skypewebdevnotes.pdf
// and http://cvs.drupal.org/viewcvs/drupal/contributions/modules/skypesupport/skypesupport.inc?rev=1.2
function skype_status($skypeid) {
@ -83,14 +84,14 @@ function yesno($name, $val) {
function star_select($name, $val) {
$x = "";
for ($i=0; $i<6; $i++) {
for ($i=5; $i>=0; $i--) {
$text = "";
if ($i==0) $text="No";
if ($i==5) $text="Yes";
$selected = ($val==$i)?"selected":"";
$checked = ($val==$i)?"checked":"";
$x .= "
<br><input name=$name value=$i type=radio $selected>
<br><input name=$name value=$i type=radio $checked>
<img src=images/help/stars-$i-0.gif> $text
";
}

View File

@ -12,6 +12,20 @@ function vol_info($vol) {
return $x;
}
function order_vols($vols) {
$online = array();
$offline = array();
foreach ($vols as $vol) {
if (online($vol->status)) {
$online[] = $vol;
} else {
$offline[] = $vol;
}
}
shuffle($online);
return array_merge($online, $offline);
}
function vol_modes($vol) {
$x = "";
if ($vol->voice_ok && $vol->text_ok) {
@ -42,19 +56,19 @@ function rating_info($vol) {
else if ($x > 0.0) $img = "stars-0-5.gif";
else $img = "stars-0-0.gif";
return "
<a href=help_ratings.php?volid=$vol->id>
<nobr><a href=help_ratings.php?volid=$vol->id>
<img border=0 src=images/help/$img>
<font size=-2>
$vol->nratings ratings</font></a>
$vol->nratings ratings</font></a></nobr>
";
}
function info($vol) {
$x = "<font size=-2> Country: $vol->country\n";
$x = "<font size=-1> Country: $vol->country\n";
if ($vol->availability) {
$x .= "<br>Usual hours: $vol->availability";
}
if ($vol->specialities) {
if ($vol->specialties) {
$x .= "<br>Specialties: $vol->specialties";
}
if ($vol->projects) {
@ -65,7 +79,7 @@ function info($vol) {
}
function show_vol($vol) {
$status = skype_status($vol->skypeid);
$status = $vol->status;
$image = button_image($status);
list_item_array(array(
vol_info($vol),
@ -93,6 +107,7 @@ function show_vols($vols) {
page_head("Online Help in $lang");
$vols = get_vols($lang);
$vols = order_vols($vols);
show_vols($vols);
page_tail();
?>

View File

@ -8,14 +8,17 @@ create table volunteer (
skypeid char(64) not null,
lang1 char(32) not null,
lang2 char(32) not null,
specialties char(128) not null,
projects char(128) not null,
specialties varchar(255) not null,
projects varchar(255) not null,
availability char(128) not null,
voice_ok tinyint not null,
text_ok tinyint not null,
timezone integer not null,
nratings integer not null,
rating_sum integer not null,
last_online integer not null,
last_check integer not null,
status integer not null,
primary key(id)
);

View File

@ -8,22 +8,54 @@ $volid = $_GET['volid'];
$vol = vol_lookup($volid);
function show_info($vol) {
$x = "<font size=-1> Country: $vol->country\n";
if ($vol->availability) {
$x .= "<br>Usual hours: $vol->availability";
}
if ($vol->specialties) {
$x .= "<br>Specialties: $vol->specialties";
}
if ($vol->projects) {
$x .= "<br>Projects: $vol->projects";
}
if ($vol->lang2) {
$x .= "<br>Primary language: $vol->lang1";
$x .= "<br>Secondary language: $vol->lang2";
}
$x .= "</font><p>";
return $x;
}
function live_contact($vol, $rating) {
$skypeid = $vol->skypeid;
echo "
<h2>Contact $vol->name live using Skype</h2>
<table class=box cellpadding=8 width=100%><tr><td>
<font size=+2><b>Contact $vol->name on Skype</b></font>
<script>
if (navigator.userAgent.indexOf('MSIE') != -1) {
document.write(
\"<br>If requested, please enable ActiveX controls for this site.<br>\"
);
}
</script>
<p>
<script type=\"text/javascript\" src=\"http://download.skype.com/share/skypebuttons/js/skypeCheck.js\"></script>
";
if ($vol->voice_ok) {
echo "<a href=skype:$skypeid?call onclick=\"return skypeCheck();\"><img align=top border=0 src=images/help/phone_icon_green.gif> Call $vol->name on Skype</a>
echo "<a href=skype:$skypeid?call onclick=\"return skypeCheck();\"><img align=top border=0 src=images/help/phone_icon_green.gif> Call (voice)</a>
";
}
if ($vol->text_ok) {
echo "<p><a href=skype:$skypeid?chat onclick=\"return skypeCheck();\"><img align=top border=0 src=images/help/skype_chat_icon.png> Chat with $vol->name on Skype</a>
echo "<p><a href=skype:$skypeid?chat onclick=\"return skypeCheck();\"><img align=top border=0 src=images/help/skype_chat_icon.png> Chat (text)</a>
";
}
echo "
<p>
<font size=-1>Note: BOINC helpers are unpaid volunteers.
Their advise is not endorsed by BOINC
or the University of California.</font>
<hr>
After the conversation is over, please give us your
feedback:
@ -42,11 +74,13 @@ function live_contact($vol, $rating) {
list_end();
echo "
</form>
</td></tr></table>
";
}
function email_contact($vol) {
echo "
<p><table class=box width=100%><tr><td>
<h2>Contact $vol->name by email</h2>
<form action=help_vol.php>
<input type=hidden name=volid value=\"$vol->id\">
@ -60,7 +94,9 @@ function email_contact($vol) {
list_item("Message", textarea("message", ""));
list_item("", "<input type=submit name=send_email value=OK>");
list_end();
echo "</form>\n";
echo "</form>
</td></tr></table>
";
}
$send_email = $_GET['send_email'];
@ -94,7 +130,7 @@ if ($send_email) {
error_page("No such volunteer $volid");
}
$x = $_GET['rating'];
if (!$x) {
if ($x==null) {
error_page("no rating given");
}
$rating = (int) $x;
@ -109,18 +145,22 @@ if ($send_email) {
$r->comment = $comment;
$r->auth = $uid;
if ($uid) {
$retval = rating_update($r);
if (!$retval) {
$oldr = rating_lookup($r);
if ($oldr) {
$retval = rating_update($r);
if ($retval) vol_update_rating($vol, $oldr, $r);
} else {
$retval = rating_insert($r);
if ($retval) vol_new_rating($vol, $rating);
}
} else {
$retval = rating_insert($r);
if ($retval) vol_new_rating($vol, $rating);
}
if (!$retval) {
echo mysql_error();
error_page("database error");
}
vol_update_rating($vol, $rating);
page_head("Feedback recorded");
echo "Your feedback has been recorded. Thanks.
<p>
@ -128,15 +168,24 @@ if ($send_email) {
";
page_tail();
} else {
page_head("Contact $vol->name");
page_head("Help Volunteer: $vol->name");
echo show_info($vol);
$status = skype_status($vol->skypeid);
if ($status != $vol->status) {
$vol->status = $status;
$vol->last_check = time();
if (online($vol->status)) {
$vol->last_online = time();
}
vol_update_status($vol);
}
$image = button_image($status);
echo "
<script type=\"text/javascript\" src=\"http://download.skype.com/share/skypebuttons/js/skypeCheck.js\"></script>
<img src=images/help/$image><p>
";
if (online($status)) {
$rating = rating_vol_auth($vol, $uid);
$rating = rating_vol_auth($vol->id, $uid);
if (!$rating) $rating->rating = -1;
live_contact($vol, $rating);
}

View File

@ -147,7 +147,7 @@ if ($create == 'OK') {
list_item("Email address", input("email_addr", ""));
list_item("Password<br><font size=-2>If you forgot your password,
leave this blank, and we'll email it to you.</font>",
input("password", "")
password("password", "")
);
list_item("", "<input type=submit name=edit_form value=OK>"
);

View File

@ -178,9 +178,11 @@ tell the caller that,
and suggest that they call another volunteer
or try the message boards.
<p>
If another Help Volunteer is online, you can try adding
them to the call using skype's 'conference' feature.
<p>
If you get a call with a problem that you think you can solve
but need to do some research,
tell the caller that.
but need to do some research, tell the caller that.
Ask them to send you an email using the
web page they're looking at,
and to include their email address so that you can get back to them.

View File

@ -81,6 +81,35 @@ or uploading the output files).
In rare cases (e.g. if errors occur on one or more computers)
you may never receive credit for a computation.
</ul>
<a name=software></a>
<h2>How the software works</h3>
<p>
The BOINC client software looks and acts like a single program,
but it's actually made up of several separate programs :
<br>
<center>
<img src=client.png>
</center>
<br>
<ul>
<li> The <b>core client</b> (named boinc.exe on Windows) communicates
with external servers to get and report work.
It runs and controls applications.
<li> <b>Applications</b> are the programs that do scientific computing.
Several of them may run at the same time on a computer
with more than one CPU.
<li> The BOINC Manager, or <b>GUI</b>, (named boincmgr.exe on Windows)
provides a graphical interface that lets you control the core client -
for example, by telling it to suspend and resume applications.
The GUI communicates with the core client by a TCP connection.
Normally this is a local connection;
however, it's possible to control a core client remotely.
<li> The <b>screensaver</b> runs when you're away from the computer.
It communicates with the core client by local TCP,
instructing it to tell one of the applications to generate
screensaver graphics.
</ul>
";
page_tail();

View File

@ -48,38 +48,70 @@ $wiki_sites = array(
page_head("Web resources for BOINC participants");
echo "
<table cellpadding=8><tr><td valign=top>
<h2>Wikis</h2>
<h3>Contents</h3>
<ul>
<li> <a href=#stats>Credit statistics</a>
<li> <a href=#sigs>Credit-based signatures</a>
<li> <a href=#team_stats>Team statistics</a>
<li> <a href=#wiki>Wikis</a>
<li> <a href=#status>Project status</a>
<li> <a href=#uotd>User of the Day status</a>
<li> <a href=#sites>Other BOINC-related sites</a>
(Information, message boards, and teams)
</ul>
<a name=stats></a>
<h3>Credit statistics</h3>
<p>
The following web sites show statistics for one or more BOINC projects.
These sites use XML-format data exported by BOINC projects.
The format is described
<a href=http://boinc.berkeley.edu/stats.php>here</a>.
If you're interested in running your own site or
participating in the development efforts,
please contact the people listed below.
";
shuffle($stats_sites);
site_list($stats_sites);
echo "
<a name=sigs></a>
<h3>Statistics signature images</h3>
<p>
The following sites offer dynamically-generated
images showing your statistics in BOINC projects.
Use these in your email or message-board signature.
";
shuffle($sig_sites);
site_list($sig_sites);
echo "
<a name=team_stats></a>
<h3>Team statistics</h3>
";
shuffle($team_stats_sites);
site_list($team_stats_sites);
echo "
<a name=wiki></a>
<h3>Wikis</h3>
User-editable sites with information and documentation about BOINC.
";
shuffle($wiki_sites);
site_list($wiki_sites);
echo "
<h2>Project status sites</h2>
<a name=status></a>
<h3>Project status sites</h3>
Show if the servers of various projects are up or down.
<ul>
<li> <a href=http://www.esea.dk/esea/bos.asp>BOS (BOINC Online Schedulers></a>
<li> <a href=http://boincprojectstatus.ath.cx/>BOINC Project Status</a>
</ul>
<h2>Users of the Day</h2>
<a name=uotd></a>
<h3>Users of the Day</h3>
<ul>
<li> <a href=http://www.myboinc.com/>BOINC Users of the Day</a>
</ul>
</td><td valign=top>
<h2>Credit statistics</h2>
";
shuffle($stats_sites);
site_list($stats_sites);
echo "
<h2>Team statistics</h2>
";
shuffle($team_stats_sites);
site_list($team_stats_sites);
echo "
</td></tr></table>
<h2>Information, message boards, and teams</h2>
<a name=sites></a>
<h3>Other BOINC-related web sites</h3>
";
list_start();
echo "
@ -163,7 +195,7 @@ language("German", array(
site("http://www.bc-team.org/", "BOINC Confederation"),
site("http://www.boincfun.tk/", "BOINCfun"),
site("http://www.setigermany.de", "SETI.Germany"),
site("http://www.sar-hessen.de", "Team Science and Research Hessen"),
site("http://www.sar-hessen.org", "Team Science and Research Hessen"),
site("http://www.boinc.de/", "www.boinc.de"),
site( "http://www.boinc-lubeca.de/", "BOINC - LUBECA (L&uuml;beck, Germany)"),
site( "http://www.boinc-forum.de/", "www.boinc-forum.de"),

View File

@ -39,12 +39,6 @@ echo "
<li> <a href=proxy_server.php>Proxy servers</a> (why BOINC doesn't have them).
</ul>
<p>
<h3>Web sites</h3>
<ul>
<li> <a href=links.php>Web sites related to BOINC</a>
<li> <a href=stats_sites.php>BOINC statistics sites</a>
</ul>
<p>
<h3>Related projects</h3>
If you're interested in donating your time (rather than computing power),
check out

View File

@ -5,8 +5,8 @@ require_once('../html/inc/translation.inc');
$cachefile = "cache/poll_results_$language_in_use.html";
$cache_time = 0;
//$cache_time = 3600;
//$cache_time = 0;
$cache_time = 3600*24;
if (file_exists($cachefile)) {
$age = time() - filemtime($cachefile);
if ($age < $cache_time) {

View File

@ -1,8 +1,10 @@
<?php
// see http://en.wikipedia.org/wiki/List_of_languages_by_number_of_native_speakers
$spoken_languages = array(
'Arabic',
'Awadhi',
'Azerbaijani, South',
'Azeri',
'Bengali',
'Bhojpuri',
'Burmese',
@ -26,27 +28,29 @@ $spoken_languages = array(
'Javanese',
'Kannada',
'Korean',
'Lithuanian',
'Maithili',
'Malayalam',
'Marathi',
'Oriya',
'Panjabi, Eastern',
'Panjabi, Western',
'Punjabi',
'Persian',
'Polish',
'Portuguese',
'Romanian',
'Russian',
'Sunda',
'Sundanese',
'Serbo-Croatian',
'Sindi',
'Spanish',
'Tagalog',
'Tamil',
'Telugu',
'Thai',
'Turkish',
'Ukrainian',
'Urdu',
'Uzbek',
'Vietnamese',
'Yoruba',
);

View File

@ -1,12 +1,3 @@
<?php
require_once("docutil.php");
include("../html/inc/stats_sites.inc");
page_head("Web sites for BOINC statistics");
echo "
<p>
The following web sites show statistics for one or more BOINC projects:
";
shuffle($stats_sites);
@ -27,7 +18,3 @@ Use these in your email or message-board signature.
";
shuffle($sig_sites);
site_list($sig_sites);
page_tail();
?>

View File

@ -38,6 +38,11 @@ body , table , input , select {
#font-size: small;
}
table.box {
border: solid lightblue;
padding: 8;
}
body {
background-color: white;
color: black;

View File

@ -327,7 +327,6 @@ int main(int argc, char** argv) {
goto done;
}
log_request_info(length);
fprintf(stdout,"Content-type: text/plain\n\n");
if (use_files) {
struct stat statbuf;

View File

@ -416,23 +416,23 @@ int SCHEDULER_REPLY::write(FILE* fout) {
char buf[LARGE_BLOB_SIZE];
if (probable_user_browser) {
// User is probably trying to look at cgi output with a browser.
// Redirect them to the project home page.
// Have a seven second delay before the redirect
int delay_secs = 7;
fprintf(fout,
"<HTML><HEAD><META HTTP-EQUIV=Refresh CONTENT=\"%d;URL=%s\"></HEAD><BODY>\n\n"
"You seem to be viewing this page in a WWW browser. Visit the <a href=\"%s\">main page</a>.\n\n"
"(We will redirect your browser there in %d seconds).\n\n"
"Content-type: text/html\n\n"
"<HTML><BODY>\n\n"
"This is a BOINC project scheduler, and is not "
"intended for viewing in a web browser."
" Visit the project's <a href=\"%s\">main page</a> instead.\n\n"
"</BODY></HTML>\n",
delay_secs, "../", "../", delay_secs
config.master_url
);
return 0;
}
fprintf(fout,
"Content-type: text/plain\n\n"
"<scheduler_reply>\n"
"<scheduler_version>%d</scheduler_version>\n",
BOINC_MAJOR_VERSION*100+BOINC_MINOR_VERSION