function get_form_data() { $vol->name = stripslashes($_GET['volname']); if (!$vol->name) { boinc_error_page("Name must not be blank"); } if (strstr($vol->name, "<")) { boinc_error_page("No < allowed"); } $vol->password = stripslashes($_GET['password']); if (!$vol->password) { boinc_error_page("Password must not be blank"); } $vol->email_addr = stripslashes($_GET['email_addr']); if (!$vol->email_addr) { boinc_error_page("Email address must not be blank"); } $vol->skypeid = stripslashes($_GET['skypeid']); if (!$vol->skypeid) { boinc_error_page("Skype ID must not be blank"); } $vol->lang1 = stripslashes($_GET['lang1']); if (!$vol->lang1) { boinc_error_page("Primary language must not be blank"); } if (!is_spoken_language($vol->lang1)) { boinc_error_page("Not a language"); } $vol->lang2 = stripslashes($_GET['lang2']); if (!is_spoken_language($vol->lang2)) { boinc_error_page("Not a language"); } $vol->country = stripslashes($_GET['country']); if (!is_valid_country($vol->country)) { boinc_error_page("Bad country"); } $vol->specialties = stripslashes($_GET['specialties']); if (strstr($vol->specialties, "<")) { boinc_error_page("No < allowed"); } $vol->projects = stripslashes($_GET['projects']); if (strstr($vol->projects, "<")) { boinc_error_page("No < allowed"); } $vol->availability = stripslashes($_GET['availability']); if (strstr($vol->availability, "<")) { boinc_error_page("No < allowed"); } $vol->voice_ok = $_GET['voice_ok'] ? 1 : 0; $vol->text_ok = $_GET['text_ok'] ? 1 : 0; $vol->hide = $_GET['hide'] ? 1 : 0; return $vol; }
} function show_vol($vol) { $status = $vol->status; $image = button_image($status); list_item_array(array(vol_info($vol), vol_modes($vol), info($vol), rating_info($vol))); } function show_vols($vols) { echo "\n You can send email to a volunteer even if they're offline.\n To do so, click their name.\n <p>\n "; help_warning(); echo "\n <p>\n If you're setting up a BOINC project, this is not the place to get help.\n Instead, try the\n <a href=http://boinc.berkeley.edu/email_lists.php>boinc_projects</a>\n email list.\n "; list_start("border=0"); list_heading_array(array("Volunteer name<br><font size=2>click to contact</font>", "Voice/Text", "Info", "Feedback <br><font size=-2>Click to see comments</font>")); foreach ($vols as $vol) { show_vol($vol); } list_end(); } if ($lang) { if (!is_spoken_language($lang)) { boinc_error_page("Not a recognized language"); } page_head("Online Help in {$lang}"); } else { page_head("Online Help in all languages"); } $vols = get_vols($lang); $vols = order_vols($vols); show_vols($vols); page_tail();
} else { if ($platform == 'linux') { $x = $linux; } else { if ($platform == 'browser') { $x = $browser; } else { if ($platform == 'web') { $x = $web; } else { if ($platform == 'mobile') { $x = $mobile; } else { boinc_error_page('bad name'); } } } } } } $found = false; foreach ($x as $y) { if ($y[0] == $item) { show_item($y); $found = true; break; } } if (!$found) { boinc_error_page('bad item'); }
if ($pname && $version) { $p = $platforms[$pname]; if (!$p) { boinc_error_page("platform not found"); } $long_name = $p["name"]; $va = $p["versions"]; foreach ($va as $v) { if ($v['num'] == $version && $type_name == $v['type']) { page_head("BOINC version {$version} for {$long_name}"); show_detail($v); page_tail(); exit; } } boinc_error_page("version not found\n"); } if ($xml) { header('Content-type: text/xml'); echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n<versions>\n"; if (FALSE === strpos($client_info, '6.8.')) { foreach ($platforms as $short_name => $p) { show_platform_xml($short_name, $p, $dev); } } echo "\n</versions>\n"; } else { if ($pname) { $p = $platforms[$pname]; $name = $p['name']; page_head("Download BOINC client software for {$name}");
} } 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(); boinc_error_page("database error"); } page_head("Feedback recorded"); echo "Your feedback has been recorded. Thanks.\n <p>\n <a href=help.php>Return to BOINC Help</a>.\n "; page_tail(); } else { page_head("Help Volunteer: {$vol->name}"); skype_script(); echo show_info($vol); if (false) { $status = skype_status($vol->skypeid); if ($status != $vol->status) { $vol->status = $status; $vol->last_check = time(); if (online($vol->status)) { $vol->last_online = time();