From 20211fd17e2bc9579eacbf858071d4fed9278eec Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 4 Dec 2006 17:10:39 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=11613 --- checkin_notes | 6 ++++ doc/account.php | 9 +++--- doc/build_system.php | 6 ++-- doc/docutil.php | 3 +- doc/help_db.php | 35 ++++++++++++++++++-- doc/help_funcs.php | 7 ++-- doc/help_lang.php | 25 ++++++++++++--- doc/help_schema.sql | 7 ++-- doc/help_vol.php | 69 ++++++++++++++++++++++++++++++++++------ doc/help_vol_edit.php | 2 +- doc/help_volunteer.php | 6 ++-- doc/intro_user.php | 29 +++++++++++++++++ doc/links.php | 68 ++++++++++++++++++++++++++++----------- doc/participate.php | 6 ---- doc/poll_results.php | 4 +-- doc/spoken_languages.php | 12 ++++--- doc/stats_sites.php | 13 -------- doc/white.css | 5 +++ sched/main.C | 1 - sched/server_types.C | 16 +++++----- 20 files changed, 242 insertions(+), 87 deletions(-) diff --git a/checkin_notes b/checkin_notes index 648ed6a2f9..7491d6f1f9 100755 --- a/checkin_notes +++ b/checkin_notes @@ -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 diff --git a/doc/account.php b/doc/account.php index 7f80d57b13..d4f3d16bbb 100644 --- a/doc/account.php +++ b/doc/account.php @@ -45,15 +45,14 @@ To participate in a BOINC project:
  • Download, install and run the BOINC client software.
  • -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.
  • -When requested, enter your email address -and a password of your choosing. +Enter your email address and a password of your choosing.
  • -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.

    diff --git a/doc/build_system.php b/doc/build_system.php index 4be0c77f4c..670e705fb6 100644 --- a/doc/build_system.php +++ b/doc/build_system.php @@ -28,19 +28,19 @@ and miscellaneous software participants can get that from the BOINC web site). Use

    -./configure --disable_client
    +./configure --disable-client
     
  • If you're porting the BOINC client software to a new platform, you need the client and miscellaneous components. Use
    -./configure --disable_server
    +./configure --disable-server
     
  • If you're developing or porting a BOINC application, you need only the miscellaneous component. Use
    -./configure --disable_server --disable_client
    +./configure --disable-server --disable-client
     
    diff --git a/doc/docutil.php b/doc/docutil.php index a06a132dcb..ed22d75e74 100644 --- a/doc/docutil.php +++ b/doc/docutil.php @@ -89,7 +89,7 @@ function html_text($x) { } function list_start($attrs = 'width=100%') { - echo "

    \n"; + echo "

    \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 = "
    "; echo " diff --git a/doc/help_db.php b/doc/help_db.php index d117007d59..757f2c6d75 100644 --- a/doc/help_db.php +++ b/doc/help_db.php @@ -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; diff --git a/doc/help_funcs.php b/doc/help_funcs.php index daad306df2..41c061ab59 100644 --- a/doc/help_funcs.php +++ b/doc/help_funcs.php @@ -1,6 +1,7 @@ =0; $i--) { $text = ""; if ($i==0) $text="No"; if ($i==5) $text="Yes"; - $selected = ($val==$i)?"selected":""; + $checked = ($val==$i)?"checked":""; $x .= " -
    +
    $text "; } diff --git a/doc/help_lang.php b/doc/help_lang.php index 17ebe2d655..2015a193c2 100644 --- a/doc/help_lang.php +++ b/doc/help_lang.php @@ -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 " - id> + id> - $vol->nratings ratings + $vol->nratings ratings "; } function info($vol) { - $x = " Country: $vol->country\n"; + $x = " Country: $vol->country\n"; if ($vol->availability) { $x .= "
    Usual hours: $vol->availability"; } - if ($vol->specialities) { + if ($vol->specialties) { $x .= "
    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(); ?> diff --git a/doc/help_schema.sql b/doc/help_schema.sql index db8c9c5e21..86a67ef18e 100644 --- a/doc/help_schema.sql +++ b/doc/help_schema.sql @@ -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) ); diff --git a/doc/help_vol.php b/doc/help_vol.php index 92d17555b2..e31c705326 100644 --- a/doc/help_vol.php +++ b/doc/help_vol.php @@ -8,22 +8,54 @@ $volid = $_GET['volid']; $vol = vol_lookup($volid); +function show_info($vol) { + $x = " Country: $vol->country\n"; + if ($vol->availability) { + $x .= "
    Usual hours: $vol->availability"; + } + if ($vol->specialties) { + $x .= "
    Specialties: $vol->specialties"; + } + if ($vol->projects) { + $x .= "
    Projects: $vol->projects"; + } + if ($vol->lang2) { + $x .= "
    Primary language: $vol->lang1"; + $x .= "
    Secondary language: $vol->lang2"; + } + $x .= "

    "; + return $x; +} + function live_contact($vol, $rating) { $skypeid = $vol->skypeid; echo " -

    Contact $vol->name live using Skype

    +
    $x
    + Contact $vol->name on Skype + +

    "; if ($vol->voice_ok) { - echo " Call $vol->name on Skype + echo " Call (voice) "; } if ($vol->text_ok) { - echo "

    Chat with $vol->name on Skype + echo "

    Chat (text) "; } echo " +

    + Note: BOINC helpers are unpaid volunteers. + Their advise is not endorsed by BOINC + or the University of California.


    After the conversation is over, please give us your feedback: @@ -42,11 +74,13 @@ function live_contact($vol, $rating) { list_end(); echo " +
    "; } function email_contact($vol) { echo " +

    Contact $vol->name by email

    id\"> @@ -60,7 +94,9 @@ function email_contact($vol) { list_item("Message", textarea("message", "")); list_item("", ""); list_end(); - echo "
    \n"; + echo " +
    + "; } $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.

    @@ -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 "

    "; 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); } diff --git a/doc/help_vol_edit.php b/doc/help_vol_edit.php index 17c379c68d..3fcce0c87b 100644 --- a/doc/help_vol_edit.php +++ b/doc/help_vol_edit.php @@ -147,7 +147,7 @@ if ($create == 'OK') { list_item("Email address", input("email_addr", "")); list_item("Password
    If you forgot your password, leave this blank, and we'll email it to you.", - input("password", "") + password("password", "") ); list_item("", "" ); diff --git a/doc/help_volunteer.php b/doc/help_volunteer.php index caadfbd263..3e23c6e316 100644 --- a/doc/help_volunteer.php +++ b/doc/help_volunteer.php @@ -178,9 +178,11 @@ tell the caller that, and suggest that they call another volunteer or try the message boards.

    +If another Help Volunteer is online, you can try adding +them to the call using skype's 'conference' feature. +

    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. diff --git a/doc/intro_user.php b/doc/intro_user.php index 20a3c2223a..469edfdf62 100644 --- a/doc/intro_user.php +++ b/doc/intro_user.php @@ -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. + + +

    How the software works

    +

    +The BOINC client software looks and acts like a single program, +but it's actually made up of several separate programs : +
    +

    + +
    +
    +
      +
    • The core client (named boinc.exe on Windows) communicates +with external servers to get and report work. +It runs and controls applications. +
    • Applications are the programs that do scientific computing. +Several of them may run at the same time on a computer +with more than one CPU. +
    • The BOINC Manager, or GUI, (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. +
    • The screensaver 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. +
    "; page_tail(); diff --git a/doc/links.php b/doc/links.php index 84272d7431..ee30456662 100644 --- a/doc/links.php +++ b/doc/links.php @@ -48,38 +48,70 @@ $wiki_sites = array( page_head("Web resources for BOINC participants"); echo " -
    -

    Wikis

    +

    Contents

    + + +

    Credit statistics

    +

    +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 +here. +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 " + +

    Statistics signature images

    +

    +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 " + +

    Team statistics

    +"; +shuffle($team_stats_sites); +site_list($team_stats_sites); +echo " + +

    Wikis

    User-editable sites with information and documentation about BOINC. "; shuffle($wiki_sites); site_list($wiki_sites); echo " -

    Project status sites

    + +

    Project status sites

    Show if the servers of various projects are up or down. -

    Users of the Day

    + +

    Users of the Day

    -
    -

    Credit statistics

    -"; -shuffle($stats_sites); -site_list($stats_sites); -echo " -

    Team statistics

    -"; -shuffle($team_stats_sites); -site_list($team_stats_sites); -echo " -
    -

    Information, message boards, and teams

    + +

    Other BOINC-related web sites

    "; 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übeck, Germany)"), site( "http://www.boinc-forum.de/", "www.boinc-forum.de"), diff --git a/doc/participate.php b/doc/participate.php index 226cc0fe9c..fe02c2896d 100644 --- a/doc/participate.php +++ b/doc/participate.php @@ -39,12 +39,6 @@ echo "
  • Proxy servers (why BOINC doesn't have them).

    -

    Web sites

    - -

    Related projects

    If you're interested in donating your time (rather than computing power), check out diff --git a/doc/poll_results.php b/doc/poll_results.php index 5e4ff9a260..4e26de5959 100644 --- a/doc/poll_results.php +++ b/doc/poll_results.php @@ -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) { diff --git a/doc/spoken_languages.php b/doc/spoken_languages.php index 241e210bd2..804e8db0a0 100644 --- a/doc/spoken_languages.php +++ b/doc/spoken_languages.php @@ -1,8 +1,10 @@ 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(); - -?> diff --git a/doc/white.css b/doc/white.css index cb147de78d..0d542dc634 100644 --- a/doc/white.css +++ b/doc/white.css @@ -38,6 +38,11 @@ body , table , input , select { #font-size: small; } +table.box { + border: solid lightblue; + padding: 8; +} + body { background-color: white; color: black; diff --git a/sched/main.C b/sched/main.C index 67644fcb9b..a89b6db8a5 100644 --- a/sched/main.C +++ b/sched/main.C @@ -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; diff --git a/sched/server_types.C b/sched/server_types.C index 4b7f567cf6..bea13548dc 100644 --- a/sched/server_types.C +++ b/sched/server_types.C @@ -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, - "\n\n" - "You seem to be viewing this page in a WWW browser. Visit the main page.\n\n" - "(We will redirect your browser there in %d seconds).\n\n" + "Content-type: text/html\n\n" + "\n\n" + "This is a BOINC project scheduler, and is not " + "intended for viewing in a web browser." + " Visit the project's main page instead.\n\n" "\n", - delay_secs, "../", "../", delay_secs + config.master_url ); + return 0; } fprintf(fout, + "Content-type: text/plain\n\n" "\n" "%d\n", BOINC_MAJOR_VERSION*100+BOINC_MINOR_VERSION