2003-03-04 19:13:21 +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-04 19:13:21 +00:00
|
|
|
|
|
|
|
$subset = $_GET["subset"];
|
|
|
|
$venue = $_GET["venue"];
|
|
|
|
|
|
|
|
if ($subset == "global") {
|
|
|
|
$main_prefs = prefs_parse_global($user->global_prefs);
|
|
|
|
if ($venue) $prefs = $main_prefs->$venue;
|
|
|
|
else $prefs = $main_prefs;
|
|
|
|
prefs_global_parse_form($prefs);
|
|
|
|
if ($venue) $main_prefs->$venue = $prefs;
|
|
|
|
else $main_prefs = $prefs;
|
|
|
|
global_prefs_update($user, $main_prefs);
|
|
|
|
} else {
|
|
|
|
$main_prefs = prefs_parse_project($user->project_prefs);
|
|
|
|
if ($venue) $prefs = $main_prefs->$venue;
|
|
|
|
else $prefs = $main_prefs;
|
2003-03-05 06:21:24 +00:00
|
|
|
|
|
|
|
prefs_project_parse_form($prefs);
|
|
|
|
prefs_resource_parse_form($prefs);
|
|
|
|
|
2003-03-20 02:05:25 +00:00
|
|
|
if ($venue) {
|
|
|
|
$main_prefs->$venue = $prefs;
|
|
|
|
} else {
|
|
|
|
$main_prefs = $prefs;
|
|
|
|
prefs_privacy_parse_form($user);
|
2003-03-05 06:21:24 +00:00
|
|
|
}
|
2003-03-20 02:05:25 +00:00
|
|
|
|
2003-03-04 19:13:21 +00:00
|
|
|
project_prefs_update($user, $main_prefs);
|
2003-03-05 06:21:24 +00:00
|
|
|
|
|
|
|
if (!$venue) {
|
|
|
|
venue_parse_form($user);
|
|
|
|
venue_update($user);
|
|
|
|
}
|
2003-03-04 19:13:21 +00:00
|
|
|
}
|
2003-06-04 23:12:55 +00:00
|
|
|
Header("Location: prefs.php?subset=$subset&updated=1");
|
2003-03-04 19:13:21 +00:00
|
|
|
|
|
|
|
?>
|