2003-03-06 00:42:18 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
include_once("db.inc");
|
|
|
|
include_once("util.inc");
|
|
|
|
include_once("prefs.inc");
|
|
|
|
|
|
|
|
db_init();
|
|
|
|
|
2003-03-19 21:01:32 +00:00
|
|
|
$user = get_logged_in_user();
|
2003-03-06 00:42:18 +00:00
|
|
|
|
|
|
|
$subset = $_GET["subset"];
|
|
|
|
$venue = $_GET["venue"];
|
|
|
|
|
|
|
|
$title = "Edit ".subset_name($subset)." preferences";
|
|
|
|
if ($venue) $title = "$title for $venue";
|
|
|
|
page_head($title, $user);
|
|
|
|
|
|
|
|
echo "<h3>$title</h3>\n";
|
|
|
|
|
|
|
|
if ($subset == "global") {
|
|
|
|
$prefs = prefs_parse_global($user->global_prefs);
|
|
|
|
if ($venue) {
|
|
|
|
$prefs = $prefs->$venue;
|
|
|
|
}
|
|
|
|
echo "
|
|
|
|
These preferences apply to all the BOINC projects
|
|
|
|
in which you participate.
|
|
|
|
<br>If you participate in multiple BOINC projects,
|
|
|
|
edit your preferences only one project's web site;
|
|
|
|
<br>otherwise edits may be overwritten.
|
|
|
|
";
|
|
|
|
} else {
|
|
|
|
$prefs = prefs_parse_project($user->project_prefs);
|
|
|
|
if ($venue) {
|
|
|
|
$prefs = $prefs->$venue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$x = $venue?"&\$venue=$venue":"";
|
|
|
|
echo "<form action=prefs_edit_action.php>
|
|
|
|
<input type=hidden name=subset value=$subset>
|
|
|
|
";
|
|
|
|
if ($venue) {
|
|
|
|
echo "<input type=hidden name=venue value=$venue>\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
start_table();
|
|
|
|
if ($subset == "global") {
|
|
|
|
prefs_form_global($user, $prefs);
|
|
|
|
} else {
|
|
|
|
prefs_form_resource($prefs);
|
|
|
|
prefs_form_project($prefs->project_specific);
|
|
|
|
if (!$venue) {
|
2003-03-20 02:05:25 +00:00
|
|
|
prefs_form_privacy($user);
|
2003-03-06 00:42:18 +00:00
|
|
|
venue_form($user);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-03-06 17:42:49 +00:00
|
|
|
row2("<br>", "<input type=submit value=\"Update preferences\">");
|
2003-03-06 00:42:18 +00:00
|
|
|
end_table();
|
|
|
|
echo "</form>\n";
|
|
|
|
|
|
|
|
echo "<a href=prefs.php?subset=$subset$x>Back to preferences</a>\n";
|
|
|
|
page_tail();
|
|
|
|
|
|
|
|
?>
|