2003-03-04 19:13:21 +00:00
|
|
|
<?php
|
2004-02-02 23:34:39 +00:00
|
|
|
require_once("../inc/db.inc");
|
|
|
|
require_once("../inc/util.inc");
|
|
|
|
require_once("../inc/prefs.inc");
|
2003-03-04 19:13:21 +00:00
|
|
|
|
|
|
|
db_init();
|
|
|
|
|
2003-03-19 21:01:32 +00:00
|
|
|
$user = get_logged_in_user();
|
2003-03-04 19:13:21 +00:00
|
|
|
|
2005-02-13 06:13:33 +00:00
|
|
|
$venue = get_str("venue");
|
|
|
|
check_venue($venue);
|
|
|
|
$subset = get_str("subset");
|
|
|
|
check_subset($subset);
|
2003-03-04 19:13:21 +00:00
|
|
|
|
|
|
|
if ($subset == "global") {
|
|
|
|
$prefs = prefs_parse_global($user->global_prefs);
|
|
|
|
prefs_global_parse_form($new_prefs);
|
|
|
|
$prefs->$venue = $new_prefs;
|
|
|
|
$retval = global_prefs_update($user, $prefs);
|
|
|
|
} else {
|
|
|
|
$prefs = prefs_parse_project($user->project_prefs);
|
|
|
|
prefs_project_parse_form($new_prefs);
|
2003-03-05 06:21:24 +00:00
|
|
|
prefs_resource_parse_form($new_prefs);
|
2003-03-04 19:13:21 +00:00
|
|
|
$prefs->$venue = $new_prefs;
|
|
|
|
$retval = project_prefs_update($user, $prefs);
|
|
|
|
}
|
2003-03-06 00:42:18 +00:00
|
|
|
if ($retval) {
|
2003-03-04 19:13:21 +00:00
|
|
|
Header("Location: prefs.php?subset=$subset");
|
|
|
|
} else {
|
|
|
|
db_error_page();
|
|
|
|
}
|
|
|
|
?>
|