2006-07-11 03:44:14 +00:00
|
|
|
<?php
|
|
|
|
|
2006-07-11 19:24:12 +00:00
|
|
|
// stuff that's particular to the "BOINC user survey"
|
|
|
|
|
|
|
|
// miscellaneous field names
|
|
|
|
|
|
|
|
$run_boinc="run_boinc";
|
|
|
|
$factor_other_text = "factor_other_text";
|
|
|
|
$country = "country";
|
|
|
|
$lother_text = "lother_text";
|
|
|
|
$fother_text = "fother_text";
|
|
|
|
$wother_text = "wother_text";
|
|
|
|
$nother_text = "nother_text";
|
2006-07-12 23:18:57 +00:00
|
|
|
$cother_text = "cother_text";
|
|
|
|
$vother_text = "vother_text";
|
|
|
|
$improved = "improved_text";
|
2006-07-11 19:24:12 +00:00
|
|
|
|
2006-07-11 03:44:14 +00:00
|
|
|
$choice0 = array(
|
2009-01-26 23:52:27 +00:00
|
|
|
"text" => tra("Yes - I have been running BOINC on my computer for..."),
|
2006-07-11 03:44:14 +00:00
|
|
|
"rname" => "current",
|
2006-07-11 19:24:12 +00:00
|
|
|
"options" => array(
|
2009-01-26 23:52:27 +00:00
|
|
|
"tweek" => tra("less than a week"),
|
|
|
|
"tmonth" => tra("less than a month"),
|
|
|
|
"tyear" => tra("less than a year"),
|
|
|
|
"tmoreyear" => tra("more than a year"),
|
2006-07-11 03:44:14 +00:00
|
|
|
),
|
2006-07-11 19:24:12 +00:00
|
|
|
"radio_name" => "duration",
|
|
|
|
"other_name" => null,
|
2006-07-11 03:44:14 +00:00
|
|
|
);
|
|
|
|
$choice1 = array(
|
2009-01-29 00:01:54 +00:00
|
|
|
"text" => tra("No - I used to run BOINC, but..."),
|
2006-07-11 03:44:14 +00:00
|
|
|
"rname" => "lapsed",
|
2006-07-11 19:24:12 +00:00
|
|
|
"options" => array(
|
2009-01-26 23:52:27 +00:00
|
|
|
"linterest" => tra("I lost interest"),
|
|
|
|
"lcomplicated" => tra("it was too complicated"),
|
|
|
|
"lstopped" => tra("I stopped it and forgot to start again"),
|
|
|
|
"lproblems" => tra("it caused problems on my computer"),
|
|
|
|
"lpower" => tra("it used too much electricity"),
|
|
|
|
"lnonboinc" => tra("I switched to a non-BOINC computing project"),
|
2006-07-11 03:44:14 +00:00
|
|
|
),
|
2006-07-11 19:24:12 +00:00
|
|
|
"radio_name" => false,
|
|
|
|
"other_name" => "lother_text",
|
2006-07-11 03:44:14 +00:00
|
|
|
);
|
|
|
|
$choice2 = array(
|
2009-01-26 23:52:27 +00:00
|
|
|
"text" => tra("No - I tried running BOINC, but..."),
|
2006-07-11 03:44:14 +00:00
|
|
|
"rname" => "failed",
|
2006-07-11 19:24:12 +00:00
|
|
|
"options" => array(
|
2009-01-26 23:52:27 +00:00
|
|
|
"finstall" => tra("the software didn't install correctly"),
|
|
|
|
"ffigure" => tra("I couldn't figure out how to use the software"),
|
|
|
|
"fnetwork" => tra("I had network communication problems"),
|
|
|
|
"fattach" => tra("I couldn't attach to a project"),
|
|
|
|
"fwork" => tra("I attached to a project, but never got any work"),
|
2006-07-11 03:44:14 +00:00
|
|
|
),
|
2006-07-11 19:24:12 +00:00
|
|
|
"radio_name" => false,
|
|
|
|
"other_name" => "fother_text",
|
2006-07-11 03:44:14 +00:00
|
|
|
);
|
|
|
|
$choice3 = array(
|
2009-01-26 23:52:27 +00:00
|
|
|
"text" => tra("No - I never tried running BOINC, because..."),
|
2006-07-11 03:44:14 +00:00
|
|
|
"rname" => "never",
|
2006-07-11 19:24:12 +00:00
|
|
|
"options" => array(
|
2009-01-26 23:52:27 +00:00
|
|
|
"nsecurity" => tra("I was concerned about security"),
|
|
|
|
"nproject" => tra("I wasn't interested in any of the projects"),
|
|
|
|
"npermission" => tra("I don't have permission to run it on my computer"),
|
|
|
|
"nversion" => tra("No version was available for my computer"),
|
2006-07-11 03:44:14 +00:00
|
|
|
),
|
2006-07-11 19:24:12 +00:00
|
|
|
"radio_name" => false,
|
|
|
|
"other_name" => "nother_text",
|
2006-07-11 03:44:14 +00:00
|
|
|
);
|
|
|
|
|
2006-07-11 19:24:12 +00:00
|
|
|
$overall_choices = array($choice0, $choice1, $choice2, $choice3);
|
|
|
|
|
2006-07-11 03:44:14 +00:00
|
|
|
|
|
|
|
$comp_items = array(
|
|
|
|
array(
|
2009-01-26 23:52:27 +00:00
|
|
|
"text"=> tra("What kind of computers do you have running BOINC?"),
|
2006-07-11 19:24:12 +00:00
|
|
|
"options" => array(
|
2006-07-11 03:44:14 +00:00
|
|
|
"windows"=>"Windows",
|
|
|
|
"mac"=>"Macintosh",
|
|
|
|
"linux"=>"Linux",
|
|
|
|
),
|
2006-07-12 23:18:57 +00:00
|
|
|
"radio_name"=>false,
|
|
|
|
"other_name"=>"cother_text",
|
2006-07-11 03:44:14 +00:00
|
|
|
),
|
|
|
|
array(
|
2009-01-26 23:52:27 +00:00
|
|
|
"text"=> tra("Where are they?"),
|
2006-07-11 19:24:12 +00:00
|
|
|
"options" => array(
|
2009-01-26 23:52:27 +00:00
|
|
|
"home"=> tra("Home"),
|
|
|
|
"work"=> tra("Work"),
|
|
|
|
"school"=> tra("School"),
|
2006-07-11 03:44:14 +00:00
|
|
|
),
|
2006-07-12 23:18:57 +00:00
|
|
|
"radio_name"=>false,
|
|
|
|
"other_name"=>"vother_text",
|
2006-07-11 03:44:14 +00:00
|
|
|
),
|
|
|
|
array(
|
2006-07-11 19:24:12 +00:00
|
|
|
"radio_name"=>"ncomputers",
|
2009-01-26 23:52:27 +00:00
|
|
|
"text"=> tra("How many computers?"),
|
2006-07-11 19:24:12 +00:00
|
|
|
"options" => array(
|
2006-07-11 03:44:14 +00:00
|
|
|
"n1"=>"1",
|
|
|
|
"n2"=>"2-4",
|
|
|
|
"n59"=>"5-9",
|
2006-07-13 03:04:45 +00:00
|
|
|
"n10"=>"10-99",
|
|
|
|
"n100"=>"100+",
|
2006-07-11 03:44:14 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
array(
|
2006-07-11 19:24:12 +00:00
|
|
|
"radio_name"=>"turned_on",
|
2009-01-26 23:52:27 +00:00
|
|
|
"text"=> tra("On average, how many hours per day are they powered on?"),
|
2006-07-11 19:24:12 +00:00
|
|
|
"options" => array(
|
2006-07-11 03:44:14 +00:00
|
|
|
"t08"=>"0-8",
|
|
|
|
"t823"=>"8-23",
|
|
|
|
"t24"=>"24",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
|
|
|
|
$you_items = array(
|
|
|
|
array(
|
2006-07-11 19:24:12 +00:00
|
|
|
"radio_name"=>"age",
|
2009-01-26 23:52:27 +00:00
|
|
|
"text"=> tra("Age"),
|
2006-07-11 19:24:12 +00:00
|
|
|
"options"=>array(
|
2006-07-11 03:44:14 +00:00
|
|
|
"age019"=>"0-19",
|
|
|
|
"age2039"=>"20-39",
|
|
|
|
"age4059"=>"40-59",
|
|
|
|
"age60"=>"60+",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
array(
|
2006-07-11 19:24:12 +00:00
|
|
|
"radio_name"=>"sex",
|
2009-01-26 23:52:27 +00:00
|
|
|
"text"=> tra("Sex"),
|
2006-07-11 19:24:12 +00:00
|
|
|
"options"=>array(
|
2009-01-26 23:52:27 +00:00
|
|
|
"sexm"=> tra("Male"),
|
|
|
|
"sexf"=> tra("Female"),
|
2006-07-11 03:44:14 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
array(
|
2006-07-11 19:24:12 +00:00
|
|
|
"radio_name"=>"level",
|
2009-01-26 23:52:27 +00:00
|
|
|
"text"=> tra("Your level of computer expertise"),
|
2006-07-11 19:24:12 +00:00
|
|
|
"options"=>array(
|
2009-01-26 23:52:27 +00:00
|
|
|
"levb"=> tra("Beginner"),
|
|
|
|
"levi"=> tra("Intermediate"),
|
|
|
|
"leva"=> tra("Advanced"),
|
2006-07-11 03:44:14 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
|
2006-07-13 03:04:45 +00:00
|
|
|
$project_items = array(
|
2006-07-13 04:01:04 +00:00
|
|
|
array(
|
|
|
|
"name"=>"where",
|
2009-01-26 23:52:27 +00:00
|
|
|
"text"=> tra("Where did you learn about BOINC projects?"),
|
2006-07-13 04:01:04 +00:00
|
|
|
"options"=>array(
|
2009-01-26 23:52:27 +00:00
|
|
|
"wtv"=> tra("TV/radio/newspaper"),
|
|
|
|
"wpers"=> tra("From friends, relatives, or coworkers"),
|
|
|
|
"wteam"=> tra("Team message boards or web sites"),
|
|
|
|
"wboinc"=> tra("The BOINC web site"),
|
|
|
|
"wweb"=> tra("Other web sites"),
|
2006-07-13 04:01:04 +00:00
|
|
|
),
|
|
|
|
"radio_name" => false,
|
|
|
|
"other_name" => "wother_text",
|
|
|
|
),
|
2006-07-13 03:04:45 +00:00
|
|
|
array(
|
2009-01-26 23:52:27 +00:00
|
|
|
"text" => tra("Which are the most important factors when you decide whether to participate in a BOINC project?"),
|
2006-07-13 03:04:45 +00:00
|
|
|
"options" => array(
|
2009-01-26 23:52:27 +00:00
|
|
|
"factor_graphics"=> tra("Nice-looking screensaver graphics"),
|
|
|
|
"factor_credit_fair"=> tra("Fair and quick granting of credit for work done"),
|
|
|
|
"factor_credit_more"=> tra("Getting more credit from this project than from others"),
|
|
|
|
"factor_mb_friendly"=> tra("Helpful and friendly message boards"),
|
|
|
|
"factor_mb_staff"=> tra("Participation by project staff on the message boards"),
|
|
|
|
"factor_web_site"=> tra("Informative project web site"),
|
|
|
|
"factor_science_important"=> tra("The science is important and beneficial"),
|
|
|
|
"factor_science_public"=> tra("Non-profit, and results are public"),
|
|
|
|
"factor_recognize"=> tra("Personal recognition if my computer finds something"),
|
|
|
|
"factor_publish"=> tra("Publication by the project in scientific journals"),
|
|
|
|
"factor_email"=> tra("Periodic email newsletters from the project"),
|
2006-07-13 03:04:45 +00:00
|
|
|
),
|
|
|
|
"radio_name" => false,
|
|
|
|
"other_name" => "factor_other_text",
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
"radio_name"=>"nprojects",
|
2009-01-26 23:52:27 +00:00
|
|
|
"text"=> tra("How many BOINC projects do you participate in?"),
|
2006-07-13 03:04:45 +00:00
|
|
|
"options"=>array(
|
|
|
|
"p1"=>"1",
|
|
|
|
"p25"=>"2-5",
|
|
|
|
"p510"=>"5-10",
|
2006-07-22 18:24:01 +00:00
|
|
|
"pmore10"=>"11+",
|
2006-07-13 03:04:45 +00:00
|
|
|
),
|
2006-07-11 03:44:14 +00:00
|
|
|
),
|
2006-07-17 16:38:53 +00:00
|
|
|
array(
|
|
|
|
"radio_name"=>"ssaver",
|
2009-01-26 23:52:27 +00:00
|
|
|
"text"=> tra("Do you run BOINC as a screensaver?"),
|
2006-07-17 16:38:53 +00:00
|
|
|
"options"=>array(
|
2009-01-26 23:52:27 +00:00
|
|
|
"ss_yes"=> tra("Yes"),
|
|
|
|
"ss_no"=> tra("No"),
|
2006-07-17 16:38:53 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
"radio_name"=>"mboards",
|
2009-01-26 23:52:27 +00:00
|
|
|
"text"=> tra("Your usage of project messages boards:"),
|
2006-07-17 16:38:53 +00:00
|
|
|
"options"=>array(
|
2009-01-26 23:52:27 +00:00
|
|
|
"mboard_r"=> tra("to read information"),
|
|
|
|
"mboard_rw"=> tra("to read and post information"),
|
|
|
|
"mboard_none"=> tra("None"),
|
2006-07-17 16:38:53 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
array(
|
2009-01-26 23:52:27 +00:00
|
|
|
"text"=> tra("Where do you get information to help resolve problems with BOINC and/or BOINC projects?"),
|
2006-07-17 16:38:53 +00:00
|
|
|
"options"=>array(
|
2009-01-26 23:52:27 +00:00
|
|
|
"help_pmb"=> tra("The project message boards"),
|
|
|
|
"help_bmb"=> tra("The BOINC message boards"),
|
|
|
|
"help_bdoc"=> tra("The BOINC web site"),
|
|
|
|
"help_bmlist"=> tra("BOINC mailing lists"),
|
|
|
|
"help_wiki"=> tra("The Unofficial BOINC Wiki"),
|
|
|
|
"help_team"=> tra("Team web sites"),
|
|
|
|
"help_google"=> tra("Google or other search engines"),
|
2006-07-17 16:38:53 +00:00
|
|
|
),
|
|
|
|
"radio_name"=>false,
|
|
|
|
"other_name"=>help_other_text,
|
|
|
|
),
|
2006-07-11 03:44:14 +00:00
|
|
|
);
|
|
|
|
|
2006-07-11 19:24:12 +00:00
|
|
|
function parse_form() {
|
|
|
|
global $run_boinc;
|
|
|
|
global $overall_choices;
|
2006-07-13 03:04:45 +00:00
|
|
|
global $project_items;
|
2006-07-11 19:24:12 +00:00
|
|
|
global $comp_items;
|
|
|
|
global $you_items;
|
|
|
|
global $country;
|
|
|
|
global $improved;
|
|
|
|
$x = array();
|
|
|
|
$x[$run_boinc] = get_str($run_boinc);
|
|
|
|
$x = parse_form_choices($x, $overall_choices);
|
2006-07-13 03:04:45 +00:00
|
|
|
$x = parse_form_choices($x, $project_items);
|
2006-07-11 19:24:12 +00:00
|
|
|
$x = parse_form_choices($x, $comp_items);
|
|
|
|
$x = parse_form_choices($x, $you_items);
|
|
|
|
$x[$country] = get_str($country);
|
|
|
|
$x[$improved] = get_str($improved);
|
|
|
|
return $x;
|
|
|
|
}
|
|
|
|
|
|
|
|
function generate_xml($x) {
|
|
|
|
global $run_boinc;
|
|
|
|
global $overall_choices;
|
2006-07-13 03:04:45 +00:00
|
|
|
global $project_items;
|
2006-07-11 19:24:12 +00:00
|
|
|
global $comp_items;
|
|
|
|
global $you_items;
|
|
|
|
global $country;
|
|
|
|
global $improved;
|
|
|
|
$xml = "";
|
|
|
|
$xml .= "<$run_boinc>".$x[$run_boinc]."</$run_boinc>\n";
|
|
|
|
$xml .= gen_xml_choices($x, $overall_choices);
|
2006-07-13 03:04:45 +00:00
|
|
|
$xml .= gen_xml_choices($x, $project_items);
|
2006-07-11 19:24:12 +00:00
|
|
|
$xml .= gen_xml_choices($x, $comp_items);
|
|
|
|
$xml .= gen_xml_choices($x, $you_items);
|
2006-07-12 23:18:57 +00:00
|
|
|
$xml .= "<$country>".urlencode($x[$country])."</$country>\n";
|
|
|
|
$xml .= "<$improved>".urlencode($x[$improved])."</$improved>\n";
|
2006-07-11 19:24:12 +00:00
|
|
|
return $xml;
|
|
|
|
}
|
|
|
|
|
2006-07-11 03:44:14 +00:00
|
|
|
?>
|