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();