include_once "../inc/prefs.inc"; include_once "../inc/prefs_project.inc"; check_get_args(array("subset", "venue", "confirmed", "cols", "tnow", "ttok")); $user = get_logged_in_user(); check_tokens($user->authenticator); $subset = get_str("subset"); $venue = get_str("venue"); $confirmed = get_str("confirmed", true); $columns = get_int("cols", true); $c = $columns ? "&cols={$columns}" : ""; if ($confirmed) { if ($subset == "global") { $main_prefs = prefs_parse_global($user->global_prefs); $main_prefs->{$venue} = null; global_prefs_update($user, $main_prefs); } else { $main_prefs = prefs_parse_project($user->project_prefs); $main_prefs->{$venue} = null; project_prefs_update($user, $main_prefs); } Header("Location: prefs.php?subset={$subset}{$c}"); } else { page_head(tra("Confirm delete preferences")); $tokens = url_tokens($user->authenticator); echo "<p>" . tra("Are you sure you want to delete your separate %1 preferences for %2?", subset_name($subset), $venue) . "</p><br><br>\n"; show_button("prefs_remove.php?subset={$subset}&venue={$venue}&confirmed=yes{$c}{$tokens}", tra("Yes"), tra("Remove preferences")); show_button("prefs.php?subset={$subset}{$c}", tra("Cancel"), tra("Cancel")); page_tail(); } $cvs_version_tracker[] = "\$Id\$"; //Generated automatically - do not edit
$error = prefs_resource_parse_form($new_prefs); if ($project_has_beta) { prefs_beta_parse_form($new_prefs); } if ($error != false || $project_error != false) { $title = "Edit " . subset_name($subset) . " preferences"; if ($venue) { $title = "{$title} for {$venue}"; } page_head($title); $x = $venue ? "&venue={$venue}" : ""; echo PREFS_FORM_ERROR_DESC; print_prefs_form("add", $subset, $venue, $user, $new_prefs, $columns, $error, $project_error); } else { $prefs->{$venue} = $new_prefs; project_prefs_update($user, $prefs); Header("Location: prefs.php?subset={$subset}&c"); } } } else { $title = "Add " . subset_name($subset) . " preferences for {$venue}"; page_head($title); if ($subset == "global") { $prefs = default_prefs_global(); } else { $prefs = default_prefs_project(); } print_prefs_form("add", $subset, $venue, $user, $prefs, $columns); } page_tail(); $cvs_version_tracker[] = "\$Id: add_venue.php 15758 2008-08-05 22:43:14Z davea \$";