2003-03-06 00:42:18 +00:00
|
|
|
<?php
|
|
|
|
|
2004-02-02 23:34:39 +00:00
|
|
|
include_once("../inc/db.inc");
|
|
|
|
include_once("../inc/util.inc");
|
|
|
|
include_once("../inc/prefs.inc");
|
2003-03-06 00:42:18 +00:00
|
|
|
|
|
|
|
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";
|
2004-05-11 22:49:23 +00:00
|
|
|
page_head($title);
|
2003-03-06 00:42:18 +00:00
|
|
|
|
|
|
|
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.
|
2004-12-16 19:37:26 +00:00
|
|
|
<br><br>
|
2003-03-06 00:42:18 +00:00
|
|
|
";
|
|
|
|
} 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);
|
|
|
|
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);
|
|
|
|
}
|
2006-07-05 21:38:08 +00:00
|
|
|
prefs_form_project($prefs->project_specific);
|
2003-03-06 00:42:18 +00:00
|
|
|
}
|
|
|
|
|
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();
|
|
|
|
|
|
|
|
?>
|