2003-03-04 19:13:21 +00:00
|
|
|
<?php
|
2006-08-13 21:51:15 +00:00
|
|
|
$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit
|
2003-03-04 19:13:21 +00:00
|
|
|
|
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-04 19:13:21 +00:00
|
|
|
|
|
|
|
db_init();
|
|
|
|
|
2003-03-19 21:01:32 +00:00
|
|
|
$user = get_logged_in_user();
|
2007-01-29 18:15:16 +00:00
|
|
|
check_tokens($user->authenticator);
|
2003-03-04 19:13:21 +00:00
|
|
|
|
2006-08-13 21:51:15 +00:00
|
|
|
$subset = get_str("subset");
|
|
|
|
$venue = get_str("venue");
|
|
|
|
$confirmed = get_str("confirmed", true);
|
|
|
|
$columns = get_int("cols", true);
|
|
|
|
$c = $columns?"&cols=$columns":"";
|
2003-03-04 19:13:21 +00:00
|
|
|
|
2004-10-08 19:57:20 +00:00
|
|
|
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);
|
|
|
|
}
|
2006-08-13 21:51:15 +00:00
|
|
|
Header("Location: prefs.php?subset=$subset$c");
|
2003-03-04 19:13:21 +00:00
|
|
|
} else {
|
2004-10-08 19:57:20 +00:00
|
|
|
page_head("Confirm delete preferences");
|
2007-01-29 18:15:16 +00:00
|
|
|
$tokens = url_tokens($user->authenticator);
|
2004-10-08 19:57:20 +00:00
|
|
|
echo "
|
|
|
|
<p>
|
|
|
|
Are you sure you want to delete your separate ", subset_name($subset),
|
|
|
|
" preferences for $venue?
|
|
|
|
<br><br>
|
2007-01-29 18:15:16 +00:00
|
|
|
<a href=prefs_remove.php?subset=$subset&venue=$venue&confirmed=yes$c$tokens>Yes</a>
|
2006-08-13 21:51:15 +00:00
|
|
|
| <a href=prefs.php?subset=$subset$c>Cancel</a>
|
2004-10-08 19:57:20 +00:00
|
|
|
";
|
|
|
|
page_tail();
|
2003-03-04 19:13:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
?>
|